Gbook

Nevíte někdo prosím, jak mohu na sránkách vytvořit Gbook?
pockej az dodelam web .. a zatim muzes pouzivat treba blueboard :-D
blueboard? seznam mě s tím prosím tě :-) dík
Jak se udělá ten blueboard?
http://www.blueboard.cz/
dik punkie
jo a ještě jedna věc..už mám blueboard akorád mi tam nejdou vkládat přízpěvky..neví někdo jak na to?
udelej si vlastni.....
tady mas moji tridu, az se naucis mysql nebude problem si to predelat:

<?php

class File_System {

var $filename = "";
var $filemod = "a";
var $string = '';
var $tmp_name = "no.tmp";

function secure($xstring)
{
$xstring = htmlspecialchars($xstring);
$xstring = str_replace("\n", "<br>", $xstring);
$xstring = str_replace("\r", "", $xstring);
$xstring = str_replace("|", "-", $xstring);
$xstring = trim($xstring);
return $xstring;
}

function s_num_rows()
{
if (!@file_exists($this->filename))
fopen($this->filename, "w");

return count(file($this->filename));
}

function s_save()
{
$arg = func_get_args();
$indexs = func_num_args();
$this->string = $this->s_num_rows()."|";
for($i = 0; $i < $indexs; $i++) {
$this->string .= $this->secure($arg[$i]);
if ($i < $indexs-1)
$this->string .= "|";
}
while(file_exists($this->tmp_name));
fclose(fopen($this->tmp_name, "w"));
$fp = fopen($this->filename, $this->filemod);
$this->string .= "\n";
fwrite($fp, $this->string);
fflush($fp);
fclose($fp);
unlink($this->tmp_name);
}

function s_load($rowid = -1)
{
static $pointer = 0;
if (!@file_exists($this->filename))
fopen($this->filename, "w");

$row = file($this->filename);
$row = array_reverse($row);

if ($pointer >= count($row)) {
return 0;
}
if ($rowid > -1) {
$arg = explode("|", $row[$rowid]);
}
else {
$arg = explode("|", $row[$pointer]);
$pointer++;
}
return $arg;
}
}


/* Example:

$FS = new File_System;

// Save into file
$datum = time();
$name = "Projector";
$email = "max.p@maildomain.cz";
$text = "Project down";
$FS->s_save($datum, $name, $email, $text); // unlimited arguments


// Read from file
while ($row = $FS->s_load()) {
echo "$row[0] - $row[1] - $row[2] - $row[3] ...";
}

// or: $row = $FS->s_load(5); - read only row with index 5

*/
?>
teda tu tridu samozrejme predelavat nebudes rozhodne bych ti to neschvalil.... muzes si z ni maximalne vzit priklad udelat novou svoji...
tim predelanim jsem ale myslel knihu do mysql.....

BTW: nechci slyset nevim jak to pouzit..... chces delat stranky tak se snaz a uc se, nikdo za tebe nic delat nebude a kdyz tak zustanes amater level 1 forever!
nakonci jak vidis je example (ukazaka jak to pouzit...) tak se snaz, jsi na to sam
Šetřil bych slovama "nebudeš" čim víc ho použiješ tím víc to bude nutit udělat to .. znáš to..
Ondra >> no, jestli se nechceš patlat hodiny s vlastní knihou, je ten BlueBoard naprosto optimální. Jejich Superknihu si můžeš s pomocí CSS předělat k nepoznání a chytré hlavy z toho snadno vyndají i reklamní banner...
jedna vec je upravit vzhled.. druha dat to do framu/do tabulky/otevrit to v novym okne

jestli mate tabulkovy design a do toho se mi kniha otevre na novou stranku je to desny....
oddelavat banner nekomu proto ze je to to jedinne co chce za to ze pouzivate jeho product je svinstvo
Master >> Je to svinstvo. Ale v té knize je oněch reklamních prvků mnohem víc, a ty už oddělat nejdou.

Tahle Superkniha je dobrá v tom, že máte přístup k jejímu zdrojáku, takže s troškou práce by z toho šla uplácat i stránka, která má tabulkový design a menu zabudované přímo v sobě. Otvírání v novém okně není vůbec potřeba. Stejně by to myslím šlo zvládnout i v css pozicovaném designu. Přesně na tohle se teď v nejbližší době chystám, tak mi držte palce....
Freya: a neni lepsi si udelat vlastni knihu?
je, když umíš s MySQL ;-)
moment.. tim jako chces rict ze se ti neco nelibi na moji tride?
:))))))
Teda ja tomu moc nerozumim...ale guestbook muze fungovat i bez MySQL, nebo ne?
Samozřejmě, že cokoliv lze vytvořit v mysql, lze vytvořit i bez mysql!
Akorát musíte trochu víc programovat...
Master >> ne-e, tim chci rict, ze tvoji tride nerozumim ani ň a kdybych se treba ja pokousela neco takovyho sama napsat a pouzivat, byla by to katastrofa
JJ v poho, díky, už mám Gbook a hlasování..
Freya: coze? ty mi chces rict ze memu examplu nerozumis?:
Autor: Master (---.sbone.cz)
Datum: 03. 11. 2003 21:34

udelej si vlastni.....
tady mas moji tridu, az se naucis mysql nebude problem si to predelat:

<?php

class File_System {

var $filename = "";
var $filemod = "a";
var $string = '';
var $tmp_name = "no.tmp";

function secure($xstring)
{
$xstring = htmlspecialchars($xstring);
$xstring = str_replace("\n", "<br>", $xstring);
$xstring = str_replace("\r", "", $xstring);
$xstring = str_replace("|", "-", $xstring);
$xstring = trim($xstring);
return $xstring;
}

function s_num_rows()
{
if (!@file_exists($this->filename))
fopen($this->filename, "w");

return count(file($this->filename));
}

function s_save()
{
$arg = func_get_args();
$indexs = func_num_args();
$this->string = $this->s_num_rows()."|";
for($i = 0; $i < $indexs; $i++) {
$this->string .= $this->secure($arg[$i]);
if ($i < $indexs-1)
$this->string .= "|";
}
while(file_exists($this->tmp_name));
fclose(fopen($this->tmp_name, "w"));
$fp = fopen($this->filename, $this->filemod);
$this->string .= "\n";
fwrite($fp, $this->string);
fflush($fp);
fclose($fp);
unlink($this->tmp_name);
}

function s_load($rowid = -1)
{
static $pointer = 0;
if (!@file_exists($this->filename))
fopen($this->filename, "w");

$row = file($this->filename);
$row = array_reverse($row);

if ($pointer >= count($row)) {
return 0;
}
if ($rowid > -1) {
$arg = explode("|", $row[$rowid]);
}
else {
$arg = explode("|", $row[$pointer]);
$pointer++;
}
return $arg;
}
}


/* Example:

$FS = new File_System;

// Save into file
$datum = time();
$name = "Projector";
$email = "max.p@maildomain.cz";
$text = "Project down";
$FS->s_save($datum, $name, $email, $text); // unlimited arguments


// Read from file
while ($row = $FS->s_load()) {
echo "$row[0] - $row[1] - $row[2] - $row[3] ...";
}

// or: $row = $FS->s_load(5); - read only row with index 5

*/


dyt lepe uz to ukazat neslo..
Master >> ó, díky :-) Ale už jsem si zprovoznila Phorum ;-)
ono se mi to sem vlozilo nejak podivuhodne.. tohle jsem sem dat nechtel