Seditio ve Ldu hakkında sınırsız arama yapın
 
 
> 1 <

Etiketler: guestbook plugin

Author Message

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3275   2007-06-12 02:03 GMT      

Elinde olan paylaşabilir mi?

Kaan

Moderators


Online status

2,082 posts
http://www.ntka.org
Pagerank: 2

Location: Turkey
Occupation: Destek
Age: 25

#3287   2007-06-12 11:07 GMT      
Bekle upload edeyim Kurulumuda anlatayımmı ?

Edit : Download Ldu Guestbook

http://ntka.org/seditio/guestbook.rar

This post was edited by Kaan (2007-06-12 11:16 GMT, 489 Gün ago)

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3289   2007-06-12 14:12 GMT      

Saol kurdum ama 2 sorun var,

1.si $verifyimg = "<img src='plugins/extended/guestbook/inc/captcha.php' width='200' height='60' alt=''>"; olmasına rağmen gif cıkmıyor

2.si Guestbook sayfasında backround yok yani nasıl halletcem. guestbook.tpl'demi bir hata var?

Kaan

Moderators


Online status

2,082 posts
http://www.ntka.org
Pagerank: 2

Location: Turkey
Occupation: Destek
Age: 25

#3298   2007-06-12 16:14 GMT      
1. cisi dosya eksik olabilir kontrol et var oldugundan emin ol.
2.cisi nasıl yani backgourund yok derken resim mi eklemek istiyorsun.?
Daha ayrıntılı anlatırsan daha iyi yardımcı oluruz..

Arka plan olarak standart skin rengini kullanıyor..

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3299   2007-06-12 16:16 GMT      
İşte o çıkmıyor.Sanırım sen sed'den çevirmişsin bunu?

Kaan

Moderators


Online status

2,082 posts
http://www.ntka.org
Pagerank: 2

Location: Turkey
Occupation: Destek
Age: 25

#3301   2007-06-12 16:19 GMT      
sanmıyorum sed den cevirdiğimi orjinal olması lazım evde değilim su anda gidince kontrol ederim.
Ama eminim orjinalidir o Ldu için oLanı yani

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3303   2007-06-12 16:22 GMT      
captcha'nın gif'i çıkmıyor :S
Birde o skin'e bakarsan arkası boş sayfa olarak çıkıyor sadece headerdaki gifler gözüküyor.

Kaan

Moderators


Online status

2,082 posts
http://www.ntka.org
Pagerank: 2

Location: Turkey
Occupation: Destek
Age: 25

#3304   2007-06-12 16:38 GMT      
Al bunu dene Seditio olanı cevirdim Ldu ya

http://dosyam.net/?id=e6lowa

Dene bakalım çalışıcakmı.

buda seditio orjinal guest book http://neocrome.net/page.php?id=2079 resimli yazılı anlatımı var.

This post was edited by Kaan (2007-06-12 16:45 GMT, 489 Gün ago)

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3306   2007-06-12 16:51 GMT      

Warning: main(plugins/guestbook/inc/guestbook.functions.inc.php) [function.main]: failed to open stream: No such file or directory in /home/oyun/public_html/plugins/extended/guestbook/guestbook.php on line 32

Fatal error: main() [function.require]: Failed opening required 'plugins/guestbook/inc/guestbook.functions.inc.php' (include_path='.') in /home/oyun/public_html/plugins/extended/guestbook/guestbook.php on line 32


diğerindede bu hatalar var

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3307   2007-06-12 16:57 GMT      
gif burdaki bir kod eksikliginden dolayı cıkmıyor ama nerde,

Code:
<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_LDU]
File=plugins/guestbook/guestbook.php
Version=100a
Updated=2006-sep-07
Type=Plugin
Author=riptide
Description=A powerfull guestbook for your website
[END_LDU]

[BEGIN_LDU_EXTPLUGIN]
Code=guestbook
Part=main
File=guestbook
Hooks=standalone
Tags=
Order=10
[END_LDU_EXTPLUGIN]

==================== */

if ( !defined('LDU_CODE') OR !defined('LDU_PLUG') ) { die("Wrong URL."); }

$db_guestbook = "ldu_guestbook";

require_once("plugins/guestbook/inc/guestbook.functions.inc.php");
require_once("plugins/guestbook/inc/php-captcha.inc.php");

//Import the variables
$a  = cv('a','G','TXT');
$id  = cv('id','G','TXT');
$d  = cv('d','G','TXT');
$rtext  = cv('rtext','P','TXT');
$ruser  = cv('ruser','P','TXT');
$remail = cv('remail','P','TXT');
$rwebsite  = cv('rwebsite','P','TXT');
$rverify  = cv('rverify','P','TXT');
$del  = cv('del','P','STX');


$t-> assign(array(
"GUESTBOOK_TITLE" => $L['plu_title'],
        ));
$t->parse("MAIN.GUESTBOOK_TITLE");

if ($a == "send")
{
if ($cfg['plugin']['guestbook']['verify'] == 'Yes' && $usr['id'] == '0')
{
if (!PhpCaptcha::Validate($rverify))
            {
            $error_string .= $L['plu_notverified']."<br>";
            }
}

if ($ruser == "")
{
        $error_string .= $L['plu_noname']."<br>";
        }

if ($remail != "")
{
$error_string .= (strlen($remail) < 4 || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{2,})+$",$remail)) ? $L['plu_emailnotvalid']."<br />" : "";
}

if ($rwebsite != "")
{
$error_string .= (!eregi("[[:alpha:]]+://",$rwebsite)) ? $L['plu_websitenotvalid']."<br />" : "";
}

$error_string .= (strlen($rtext) < $cfg['plugin']['guestbook']['minchars']) ? $L['plu_entrytooshort']."<br>" : "";
$error_string .= (strlen($rtext) > $cfg['plugin']['guestbook']['maxchars']) ? $L['plu_entrytoolong']."<br>" : "";

if ($cfg['plugin']['guestbook']['multiposting'] == 'No')
    {
        $num = ldu_num_rows(ldu_query("SELECT gb_author FROM $db_guestbook WHERE (gb_author='$ruser')"));

        if ($num > 0)
            {
            $error_string .= $L['plu_nameinuse']."<br>";
            }
        }

    if ($usr['id'] == 0)
    {
    $num = ldu_num_rows(ldu_query("SELECT user_name FROM $db_users WHERE user_name='$ruser'"));

    if ($num > 0)
            {
            $error_string .= $L['plu_nameregistered']."<br>";
            }
    }

    if ($write == FALSE)
    {
        $error_string .= $L['plu_regonly']."<br>";
    }

if ($error_string == "")
{
$ruser = ldu_prep($ruser);
$rtext = ldu_prep($rtext);
$rdate = $sys['now_offset'];
$rwebsite = ($rwebsite != "http://") ? ldu_prep($rwebsite) : '';

$sql = ldu_query("INSERT INTO $db_guestbook (gb_author, gb_authorid, gb_text, gb_date, gb_email, gb_website) VALUES ('$ruser', '".$usr['id']."', '$rtext', '".$rdate."', '$remail', '$rwebsite')");

header("Location: plug.php?e=guestbook");
exit;
}
}

if ($a == "update" && $id != "")
{
$update = gb_checkupdaterights($id);

if ($del == TRUE && $update == TRUE)
{
$sql = ldu_query("DELETE FROM $db_guestbook WHERE gb_id='$id' ");
header("Location: plug.php?e=guestbook");
exit;
}

if($update == FALSE)
{
$error_string .= $L['plu_noupdaterights']."<br>";
}

if ($ruser == "")
{
        $error_string .= $L['plu_noname']."<br>";
        }

if ($remail != "")
{
$error_string .= (strlen($remail) < 4 || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{2,})+$",$remail)) ? $L['plu_emailnotvalid']."<br />" : "";
}

if ($rwebsite != "")
{
$error_string .= (!eregi("[[:alpha:]]+://",$rwebsite)) ? $L['plu_websitenotvalid']."<br />" : "";
}

$error_string .= (strlen($rtext) < $cfg['plugin']['guestbook']['minchars']) ? $L['plu_entrytooshort']."<br>" : "";
$error_string .= (strlen($rtext) > $cfg['plugin']['guestbook']['maxchars']) ? $L['plu_entrytoolong']."<br>" : "";

if ($error_string == "")
{
$ruser = ldu_prep($ruser);
$rtext = ldu_prep($rtext);
$rdate = $sys['now_offset'];
$rwebsite = ($rwebsite != "http://") ? ldu_prep($rwebsite) : '';

$sql = ldu_query("UPDATE $db_guestbook SET gb_author='$ruser', gb_text='$rtext', gb_email='$remail', gb_website='$rwebsite' WHERE gb_id='$id' ");

header("Location: plug.php?e=guestbook");
exit;
}
}

if (isset($error_string))
{
$t->assign("GUESTBOOK_ERROR_BODY",$error_string);
$t->parse("MAIN.GUESTBOOK_ERROR");
}

if ($a == "sign" OR $a == "send")
{
    $bbcodes = ($cfg['plugin']['guestbook']['bbcodes'] == 'Yes') ? ldu_build_bbcodes("guestbookentry", "rtext", $L['BBcodes']) : '';
$smilies = ($cfg['plugin']['guestbook']['smilies'] == 'Yes') ? ldu_build_smilies("guestbookentry", "rtext", $L['Smilies']) : '';

    $name = ($usr['id'] == 0) ? "<input type=\"text\" name=\"ruser\" value=\"".$ruser."\">" : "<input type=\"text\" name=\"ruser\" value=\"".$usr['name']."\" readonly>";
    $email = "<input type=\"text\" name=\"remail\" value=\"".$remail."\">";
    $website = ($rwebsite == "") ? "<input type=\"text\" name=\"rwebsite\" value=\"http://\">" : "<input type=\"text\" name=\"rwebsite\" value=\"".$rwebsite."\">";

$t->assign(array(
"GUESTBOOK_FORM_SEND" => "plug.php?e=guestbook&amp;a=send",
"GUESTBOOK_FORM_INTROTEXT" => $L['plu_addnewentry'],
"GUESTBOOK_FORM_AUTHOR_TITLE" => $L['plu_form_name'],
"GUESTBOOK_FORM_AUTHOR" => $name,
"GUESTBOOK_FORM_EMAIL_TITLE" => $L['plu_form_email'],
"GUESTBOOK_FORM_EMAIL" => $email,
"GUESTBOOK_FORM_WEBSITE_TITLE" => $L['plu_form_website'],
"GUESTBOOK_FORM_WEBSITE" => $website,
"GUESTBOOK_FORM_TEXT_TITLE" => $L['plu_form_text'],
"GUESTBOOK_FORM_SEND_BUTTON" => $L['plu_form_send'],
));

if ($cfg['plugin']['guestbook']['textboxer'] == "None")
{
$t->assign(array(
"GUESTBOOK_FORM_TEXT" => "<textarea name=\"rtext\" rows=\"8\" cols=\"64\">".$rtext."</textarea><br />".$bbcodes."&nbsp;&nbsp;".$smilies."&nbsp;&nbsp;",
));
}

if ($cfg['plugin']['guestbook']['textboxer'] == "V2")
        {
        require_once("plugins/guestbook/inc/guestbook.textboxer.inc.php");
        }

if ($cfg['plugin']['guestbook']['verify'] == 'Yes' && $usr['id'] == '0')
{
        $verifyimg = "<img src='plugins/guestbook/inc/captcha.php' width='200' height='60' alt=''>";
        $verifyinput = "<input name=\"rverify\" type=\"text\" id=\"rverify\" size=\"10\" maxlength=\"10\">";
       
$t->assign(array(
            "GUESTBOOK_FORM_VERIFYIMG" => $verifyimg,
            "GUESTBOOK_FORM_VERIFICATION_TITLE" => $L['plu_form_verification'],
            "GUESTBOOK_FORM_VERIFYINPUT" => $verifyinput,
));
               
        $t->parse("MAIN.GUESTBOOK_FORM_ADD.VERIFY");
        }
       
    $t->parse("MAIN.GUESTBOOK_FORM_ADD");
}

if ($a == "edit" OR $a == "update")
{
$update = gb_checkupdaterights($id);

if($update == FALSE)
{
header("Location: plug.php?e=guestbook");
exit;
}

$sql = ldu_query("SELECT * from $db_guestbook WHERE gb_id='$id' ");
$row = mysql_fetch_array($sql);

$ruser = lşdu_cc($row['gb_author']);
$ruserid = ldu_cc($row['gb_authorid']);
$remail = ldu_cc($row['gb_email']);
$rwebsite = ldu_cc($row['gb_website']);
$rtext = ldu_cc($row['gb_text']);

    $bbcodes = ($cfg['plugin']['guestbook']['bbcodes'] == 'Yes') ? ldu_build_bbcodes("guestbookentry", "rtext", $L['BBcodes']) : '';
$smilies = ($cfg['plugin']['guestbook']['smilies'] == 'Yes') ? ldu_build_smilies("guestbookentry", "rtext", $L['Smilies']) : '';

    $name = ($admin == TRUE) ? "<input type=\"text\" name=\"ruser\" value=\"".$ruser."\">" : "<input type=\"text\" name=\"ruser\" value=\"".$ruser."\" readonly>";
    $email = "<input type=\"text\" name=\"remail\" value=\"".$remail."\">";
    $website = ($rwebsite == "") ? "<input type=\"text\" name=\"rwebsite\" value=\"http://\">" : "<input type=\"text\" name=\"rwebsite\" value=\"".$rwebsite."\">";
$delete = "<input type=\"checkbox\" name=\"del\" value=\"TRUE\">";

$t->assign(array(
"GUESTBOOK_FORM_SEND" => "plug.php?e=guestbook&amp;a=update&amp;id=".$id."",
"GUESTBOOK_FORM_INTROTEXT" => $L['plu_editentry'],
"GUESTBOOK_FORM_AUTHOR_TITLE" => $L['plu_form_name'],
"GUESTBOOK_FORM_AUTHOR" => $name,
"GUESTBOOK_FORM_EMAIL_TITLE" => $L['plu_form_email'],
"GUESTBOOK_FORM_EMAIL" => $email,
"GUESTBOOK_FORM_WEBSITE_TITLE" => $L['plu_form_website'],
"GUESTBOOK_FORM_WEBSITE" => $website,
"GUESTBOOK_FORM_TEXT_TITLE" => $L['plu_form_text'],
"GUESTBOOK_FORM_DELETE_TITLE" => $L['plu_form_delete'],
"GUESTBOOK_FORM_DELETE" => $delete,
"GUESTBOOK_FORM_UPDATE_BUTTON" => $L['plu_form_update'],
));

if ($cfg['plugin']['guestbook']['textboxer'] == "None")
{
$t->assign(array(
"GUESTBOOK_FORM_TEXT" => "<textarea name=\"rtext\" rows=\"8\" cols=\"64\">".$rtext."</textarea><br />".$bbcodes."&nbsp;&nbsp;".$smilies."&nbsp;&nbsp;",
));
}

if ($cfg['plugin']['guestbook']['textboxer'] == "V2")
        {
        require_once("plugins/guestbook/inc/guestbook.textboxer.inc.php");
        }

$t->parse("MAIN.GUESTBOOK_FORM_EDIT");
}

if ($a == "")
{
if ($write == FALSE)
{
$gb_signguestbook = $L['plu_regonly'];
}
else
{
$gb_signguestbook = "<a href=\"plug.php?e=guestbook&amp;a=sign\">".$L['plu_signguestbook']."</a>";
        }

    $t->assign(array(
            "GUESTBOOK_SIGNGUESTBOOK" => $gb_signguestbook,
                ));
        $t->parse("MAIN.GUESTBOOK_SIGNGUESTBOOK");

if (empty($d)) { $d = '0'; }

    $sql = ldu_query("SELECT * from $db_guestbook ORDER BY gb_id DESC LIMIT $d, ".$cfg['plugin']['guestbook']['maxposts']."");
$sql1 = ldu_query("SELECT COUNT(*) FROM $db_guestbook ");

    $totalentries = mysql_result($sql1,0,"COUNT(*)");

    $totalpages = (ceil($totalentries / $cfg['plugin']['guestbook']['maxposts']) != 0) ? ceil($totalentries / $cfg['plugin']['guestbook']['maxposts']) : "1";
    $currentpage= ceil ($d / $cfg['plugin']['guestbook']['maxposts'])+1;

    unset($pageprev, $pagenext);

    if ($d > 0)
        {
        $prevpage = $d - $cfg['plugin']['guestbook']['maxposts'];
        if ($prevpage < 0)
            { $prevpage = 0; }
        $pageprev = "<a href=\"plug.php?e=guestbook&amp;d=$prevpage\">$ldu_img_left ".$L['plu_previous']."</a>";
        }

    if (($d + $cfg['plugin']['guestbook']['maxposts']) < $totalentries)
        {
        $nextpage = $d + $cfg['plugin']['guestbook']['maxposts'];
        $pagenext = "<a href=\"plug.php?e=guestbook&amp;d=$nextpage\">".$L['plu_next']." $ldu_img_right</a>";
        }


    $t-> assign(array(
    "GUESTBOOK_CURRENTPAGE" => $currentpage,
    "GUESTBOOK_TOTALPAGES" => $totalpages,
    "GUESTBOOK_PAGEPREV" => $pageprev,
    "GUESTBOOK_PAGENEXT" => $pagenext,
            ));
    $t->parse("MAIN.GUESTBOOK_PREVNEXT");

    $i=0;
    if ($totalentries > 0)
        {
        while ($row = mysql_fetch_array($sql) AND $i < $cfg['plugin']['guestbook']['maxposts'])
            {
            $gb_id = $row["gb_id"];
            $gb_author = stripslashes($row["gb_author"]);
            $gb_authorid = $row["gb_authorid"];
            $gb_text = stripslashes($row["gb_text"]);
            $gb_date = date($cfg['plugin']['guestbook']['formatdate'],$row["gb_date"] + $usr['timezone'] * 3600);
            $gb_time = date($cfg['plugin']['guestbook']['formattime'],$row["gb_date"] + $usr['timezone'] * 3600);
            $gb_email = stripslashes($row["gb_email"]);
            $gb_website = stripslashes($row["gb_website"]);

            $bbcodes = ($cfg['plugin']['guestbook']['bbcodes'] == 'Yes') ? "TRUE" : '';
            $smilies = ($cfg['plugin']['guestbook']['smilies'] == 'Yes') ? "TRUE" : '';

            $update = gb_checkupdaterights($gb_id);
           
            if($update == TRUE)
            {
            $gb_edit = "<a href='plug.php?e=guestbook&amp;a=edit&amp;id=".$gb_id."'><img src=\"plugins/guestbook/img/edit.gif\" alt=\"".$L['plu_edit']."\" /></a>&nbsp;&nbsp;";
            }
            else
            {
            $gb_edit = "";
            }
           
            $gb_authorlink = ($cfg['plugin']['guestbook']['authorlink'] == "Yes") ? ldu_build_user($gb_authorid, $gb_author) : $gb_author;
            $gb_email      = ($gb_email != "") ? "<a href='mailto:".$gb_email."'><img src=\"plugins/guestbook/img/email.gif\" alt=\"".$L['plu_email']."\" /></a>&nbsp;&nbsp;" : '';
            $gb_website    = ($gb_website != "") ? "<a href='".$gb_website."' target='_blank'><img src=\"plugins/guestbook/img/website.gif\" alt=\"".$L['plu_website']."\" /></a>" : '';

            $t-> assign(array(
                "GUESTBOOK_ROW_ID" => $gb_id,
                "GUESTBOOK_ROW_AUTHOR" => $gb_authorlink,
                "GUESTBOOK_ROW_AUTHORID" => $gb_authorid,
                "GUESTBOOK_ROW_TEXT" => ldu_parse($gb_text, $bbcodes, $smilies, 1),
                "GUESTBOOK_ROW_DATE" => $gb_date,
                "GUESTBOOK_ROW_TIME" => $gb_time,
                "GUESTBOOK_ROW_EMAIL" => $gb_email,
                "GUESTBOOK_ROW_WEBSITE" => $gb_website,
                "GUESTBOOK_ROW_EDIT" => $gb_edit,
                ));
            $t->parse("MAIN.GUESTBOOK_ROW");
            $i++;
            }
        }
        else
        {
        $t-> assign(array(
        "GUESTBOOK_EMPTYTEXT" => $L['plu_noentriesyet'],
                ));
        $t->parse("MAIN.GUESTBOOK_EMPTY");
        }
}



?>

Kaan

Moderators


Online status

2,082 posts
http://www.ntka.org
Pagerank: 2

Location: Turkey
Occupation: Destek
Age: 25

#3308   2007-06-12 17:20 GMT      
böyle sorunlarla karşılaşırsan

bul
require_once("plugins/guestbook/inc/guestbook.functions.inc.php");


degiştir
require_once("plugins/extended/guestbook/inc/guestbook.functions.inc.php");

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3309   2007-06-12 18:01 GMT      
ya şimdi ben ilk gönderdiğini kullanmak istiyorum ama baktım hepsine extended ekliycem ama hepsine eklemişsin.Uzantıları dogru ama cıkmıyor img.

Code:
<?PHP

/* ====================
Land Down Under - Website engine
Copyright Neocrome
http://www.neocrome.net

[BEGIN_LDU]
File=plugins/extended/guestbook/guestbook.php
Version=1.0
Updated=2006-jul-11
Type=Plugin
Author=schneebi (based on riptide's GB-plugin for Seditio)
Description=Main code for the guestbook
[END_LDU]

[BEGIN_LDU_EXTPLUGIN]
Code=guestbook
Part=main
File=guestbook
Hooks=standalone
Tags=
Order=10
[END_LDU_EXTPLUGIN]

==================== */

if ( !defined('LDU_CODE') OR !defined('LDU_PLUG') ) { die("Wrong URL."); }

$db_guestbook = "ldu_guestbook";

require_once("plugins/extended/guestbook/inc/guestbook.functions.inc.php");
require_once("plugins/extended/guestbook/inc/php-captcha.inc.php");

//Import the variables
$a  = cv('a','G','TXT');
$id  = cv('id','G','TXT');
$d  = cv('d','G','TXT');
$rtext  = cv('rtext','P','TXT');
$ruser  = cv('ruser','P','TXT');
$remail = cv('remail','P','TXT');
$rwebsite  = cv('rwebsite','P','TXT');
$rverify  = cv('rverify','P','TXT');

//Check the rights
$admin  = $usr['level'] > 39;
$write  = $usr['level'] >= $cfg['plugin']['guestbook']['gbwrite'];

$t-> assign(array(
"GUESTBOOK_TITLE" => $L['plu_title'],
        ));
$t->parse("MAIN.GUESTBOOK_TITLE");

if ($a == "send")
{
if ($cfg['plugin']['guestbook']['verify'] == 'Yes' && $usr['level'] == '0')
{
if (!PhpCaptcha::Validate($rverify))
            {
            $error_string .= $L['plu_notverified']."<br>";
            }
}

if ($ruser == "")
{
        $error_string .= $L['plu_noname']."<br>";
        }

if ($remail != "")
{
$error_string .= (strlen($remail) < 4 || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{2,})+$",$remail)) ? $L['plu_emailnotvalid']."<br />" : "";
}

if ($rwebsite != "")
{
$error_string .= (!eregi("[[:alpha:]]+://",$rwebsite)) ? $L['plu_websitenotvalid']."<br />" : "";
}

$error_string .= (strlen($rtext) < $cfg['plugin']['guestbook']['minchars']) ? $L['plu_entrytooshort']."<br>" : "";
$error_string .= (strlen($rtext) > $cfg['plugin']['guestbook']['maxchars']) ? $L['plu_entrytoolong']."<br>" : "";

if ($cfg['plugin']['guestbook']['multiposting'] == 'No')
    {
        $num = ldu_mysql_numrows(ldu_mysql_query("SELECT gb_author FROM $db_guestbook WHERE (gb_author='$ruser')"));

        if ($num > 0)
            {
            $error_string .= $L['plu_nameinuse']."<br>";
            }
        }

    if ($usr['id'] == 0)
    {
    $num = mysql_num_rows(ldu_mysql_query("SELECT user_name FROM $db_users WHERE user_name='$ruser'"));

    if ($num > 0)
            {
            $error_string .= $L['plu_nameregistered']."<br>";
            }
    }

    if ($write == FALSE)
    {
        $error_string .= $L['plu_regonly']."<br>";
    }

if ($error_string == "")
{
$ruser = ldu_addslashes($ruser);
$rtext = ldu_addslashes($rtext);
$rdate = $sys['now_offset'];
$rwebsite = ($rwebsite != "http://") ? ldu_addslashes($rwebsite) : '';

$sql = ldu_mysql_query("INSERT INTO $db_guestbook (gb_author, gb_authorid, gb_text, gb_date, gb_email, gb_website) VALUES ('$ruser', '".$usr['id']."', '$rtext', '".$rdate."', '$remail', '$rwebsite')");

header("Location: plug.php?e=guestbook");
exit;
}
}

if ($a == "update" && $id != "")
{
$update = gb_checkupdaterights($id);

if ($del == TRUE && $update == TRUE)
{
$sql = ldu_mysql_query("DELETE FROM $db_guestbook WHERE gb_id='$id' ");
header("Location: plug.php?e=guestbook");
exit;
}

if($update == FALSE)
{
$error_string .= $L['plu_noupdaterights']."<br>";
}

if ($ruser == "")
{
        $error_string .= $L['plu_noname']."<br>";
        }

if ($remail != "")
{
$error_string .= (strlen($remail) < 4 || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{2,})+$",$remail)) ? $L['plu_emailnotvalid']."<br />" : "";
}

if ($rwebsite != "")
{
$error_string .= (!eregi("[[:alpha:]]+://",$rwebsite)) ? $L['plu_websitenotvalid']."<br />" : "";
}

$error_string .= (strlen($rtext) < $cfg['plugin']['guestbook']['minchars']) ? $L['plu_entrytooshort']."<br>" : "";
$error_string .= (strlen($rtext) > $cfg['plugin']['guestbook']['maxchars']) ? $L['plu_entrytoolong']."<br>" : "";

if ($error_string == "")
{
$ruser = ldu_addslashes($ruser);
$rtext = ldu_addslashes($rtext);
$rdate = $sys['now_offset'];
$rwebsite = ($rwebsite != "http://") ? ldu_addslashes($rwebsite) : '';

$sql = ldu_mysql_query("UPDATE $db_guestbook SET gb_author='$ruser', gb_text='$rtext', gb_email='$remail', gb_website='$rwebsite' WHERE gb_id='$id' ");

header("Location: plug.php?e=guestbook");
exit;
}
}

if (isset($error_string))
{
$t->assign("GUESTBOOK_ERROR_BODY",$error_string);
$t->parse("MAIN.GUESTBOOK_ERROR");
}

if ($a == "sign" OR $a == "send")
{
    $bbcodes = ($cfg['plugin']['guestbook']['bbcodes'] == 'Yes') ? ldu_build_bbcodes("guestbookentry", "rtext", $L['BBcodes']) : '';
$smilies = ($cfg['plugin']['guestbook']['smilies'] == 'Yes') ? ldu_build_smilies("guestbookentry", "rtext", $L['Smilies']) : '';

    $name = ($usr['id'] == 0) ? "<input type=\"text\" name=\"ruser\" value=\"".$ruser."\">" : "<input type=\"text\" name=\"ruser\" value=\"".$usr['name']."\" readonly>";
    $email = "<input type=\"text\" name=\"remail\" value=\"".$remail."\">";
    $website = ($rwebsite == "") ? "<input type=\"text\" name=\"rwebsite\" value=\"http://\">" : "<input type=\"text\" name=\"rwebsite\" value=\"".$rwebsite."\">";

$t->assign(array(
"GUESTBOOK_FORM_SEND" => "plug.php?e=guestbook&amp;a=send",
"GUESTBOOK_FORM_INTROTEXT" => $L['plu_addnewentry'],
"GUESTBOOK_FORM_AUTHOR_TITLE" => $L['plu_form_name'],
"GUESTBOOK_FORM_AUTHOR" => $name,
"GUESTBOOK_FORM_EMAIL_TITLE" => $L['plu_form_email'],
"GUESTBOOK_FORM_EMAIL" => $email,
"GUESTBOOK_FORM_WEBSITE_TITLE" => $L['plu_form_website'],
"GUESTBOOK_FORM_WEBSITE" => $website,
"GUESTBOOK_FORM_TEXT_TITLE" => $L['plu_form_text'],
"GUESTBOOK_FORM_SEND_BUTTON" => $L['plu_form_send'],
));

if ($cfg['plugin']['guestbook']['textboxer'] == "None")
{
$t->assign(array(
"GUESTBOOK_FORM_TEXT" => "<textarea name=\"rtext\" rows=\"8\" cols=\"64\">".$rtext."</textarea><br />".$bbcodes."&nbsp;&nbsp;".$smilies."&nbsp;&nbsp;",
));
}

if ($cfg['plugin']['guestbook']['textboxer'] == "V2")
        {
        require_once("plugins/extended/guestbook/inc/guestbook.textboxer.inc.php");
        }

if ($cfg['plugin']['guestbook']['verify'] == 'Yes' && $usr['level'] == '0')
{
        $verifyimg = "<img src='plugins/extended/guestbook/inc/captcha.php' width='200' height='60' alt=''>";
        $verifyinput = "<input name=\"rverify\" type=\"text\" id=\"rverify\" size=\"10\" maxlength=\"10\">";
       
$t->assign(array(
            "GUESTBOOK_FORM_VERIFYIMG" => $verifyimg,
            "GUESTBOOK_FORM_VERIFICATION_TITLE" => $L['plu_form_verification'],
            "GUESTBOOK_FORM_VERIFYINPUT" => $verifyinput,
));
               
        $t->parse("MAIN.GUESTBOOK_FORM_ADD.VERIFY");
        }
       
    $t->parse("MAIN.GUESTBOOK_FORM_ADD");
}

if ($a == "edit" OR $a == "update")
{
$update = gb_checkupdaterights($id);

if($update == FALSE)
{
header("Location: plug.php?e=guestbook");
exit;
}

$sql = ldu_mysql_query("SELECT * from $db_guestbook WHERE gb_id='$id' ");
$row = mysql_fetch_array($sql);

$ruser = ldu_cc($row['gb_author']);
$ruserid = ldu_cc($row['gb_authorid']);
$remail = ldu_cc($row['gb_email']);
$rwebsite = ldu_cc($row['gb_website']);
$rtext = ldu_cc($row['gb_text']);

    $bbcodes = ($cfg['plugin']['guestbook']['bbcodes'] == 'Yes') ? ldu_build_bbcodes("guestbookentry", "rtext", $L['BBcodes']) : '';
$smilies = ($cfg['plugin']['guestbook']['smilies'] == 'Yes') ? ldu_build_smilies("guestbookentry", "rtext", $L['Smilies']) : '';

    $name = ($admin == TRUE) ? "<input type=\"text\" name=\"ruser\" value=\"".$ruser."\">" : "<input type=\"text\" name=\"ruser\" value=\"".$ruser."\" readonly>";
    $email = "<input type=\"text\" name=\"remail\" value=\"".$remail."\">";
    $website = ($rwebsite == "") ? "<input type=\"text\" name=\"rwebsite\" value=\"http://\">" : "<input type=\"text\" name=\"rwebsite\" value=\"".$rwebsite."\">";
$delete = "<input type=\"checkbox\" name=\"del\" value=\"TRUE\">";

$t->assign(array(
"GUESTBOOK_FORM_SEND" => "plug.php?e=guestbook&amp;a=update&amp;id=".$id."",
"GUESTBOOK_FORM_INTROTEXT" => $L['plu_editentry'],
"GUESTBOOK_FORM_AUTHOR_TITLE" => $L['plu_form_name'],
"GUESTBOOK_FORM_AUTHOR" => $name,
"GUESTBOOK_FORM_EMAIL_TITLE" => $L['plu_form_email'],
"GUESTBOOK_FORM_EMAIL" => $email,
"GUESTBOOK_FORM_WEBSITE_TITLE" => $L['plu_form_website'],
"GUESTBOOK_FORM_WEBSITE" => $website,
"GUESTBOOK_FORM_TEXT_TITLE" => $L['plu_form_text'],
"GUESTBOOK_FORM_DELETE_TITLE" => $L['plu_form_delete'],
"GUESTBOOK_FORM_DELETE" => $delete,
"GUESTBOOK_FORM_UPDATE_BUTTON" => $L['plu_form_update'],
));

if ($cfg['plugin']['guestbook']['textboxer'] == "None")
{
$t->assign(array(
"GUESTBOOK_FORM_TEXT" => "<textarea name=\"rtext\" rows=\"8\" cols=\"64\">".$rtext."</textarea><br />".$bbcodes."&nbsp;&nbsp;".$smilies."&nbsp;&nbsp;",
));
}

if ($cfg['plugin']['guestbook']['textboxer'] == "V2")
        {
        require_once("plugins/extended/guestbook/inc/guestbook.textboxer.inc.php");
        }

$t->parse("MAIN.GUESTBOOK_FORM_EDIT");
}

if ($a == "")
{
if ($write == FALSE)
{
$gb_signguestbook = $L['plu_regonly'];
}
else
{
$gb_signguestbook = "<a href=\"plug.php?e=guestbook&amp;a=sign\">".$L['plu_signguestbook']."</a>";
        }

    $t->assign(array(
            "GUESTBOOK_SIGNGUESTBOOK" => $gb_signguestbook,
                ));
        $t->parse("MAIN.GUESTBOOK_SIGNGUESTBOOK");

if (empty($d)) { $d = '0'; }

    $sql = ldu_mysql_query("SELECT * from $db_guestbook ORDER BY gb_id DESC LIMIT $d, ".$cfg['plugin']['guestbook']['maxposts']."");
$sql1 = ldu_mysql_query("SELECT COUNT(*) FROM $db_guestbook ");

    $totalentries = mysql_result($sql1,0,"COUNT(*)");

    $totalpages = (ceil($totalentries / $cfg['plugin']['guestbook']['maxposts']) != 0) ? ceil($totalentries / $cfg['plugin']['guestbook']['maxposts']) : "1";
    $currentpage= ceil ($d / $cfg['plugin']['guestbook']['maxposts'])+1;

    unset($pageprev, $pagenext);

    if ($d > 0)
        {
        $prevpage = $d - $cfg['plugin']['guestbook']['maxposts'];
        if ($prevpage < 0)
            { $prevpage = 0; }
        $pageprev = "<a href=\"plug.php?e=guestbook&amp;d=$prevpage\">$ldu_img_left ".$L['plu_previous']."</a>";
        }

    if (($d + $cfg['plugin']['guestbook']['maxposts']) < $totalentries)
        {
        $nextpage = $d + $cfg['plugin']['guestbook']['maxposts'];
        $pagenext = "<a href=\"plug.php?e=guestbook&amp;d=$nextpage\">".$L['plu_next']." $ldu_img_right</a>";
        }


    $t-> assign(array(
    "GUESTBOOK_CURRENTPAGE" => $currentpage,
    "GUESTBOOK_TOTALPAGES" => $totalpages,
    "GUESTBOOK_PAGEPREV" => $pageprev,
    "GUESTBOOK_PAGENEXT" => $pagenext,
            ));
    $t->parse("MAIN.GUESTBOOK_PREVNEXT");

    $i=0;
    if ($totalentries > 0)
        {
        while ($row = mysql_fetch_array($sql) AND $i < $cfg['plugin']['guestbook']['maxposts'])
            {
            $gb_id = $row["gb_id"];
            $gb_author = stripslashes($row["gb_author"]);
            $gb_authorid = $row["gb_authorid"];
            $gb_text = stripslashes($row["gb_text"]);
            $gb_date = date($cfg['plugin']['guestbook']['formatdate'],$row["gb_date"] + $usr['timezone'] * 3600);
            $gb_time = date($cfg['plugin']['guestbook']['formattime'],$row["gb_date"] + $usr['timezone'] * 3600);
            $gb_email = stripslashes($row["gb_email"]);
            $gb_website = stripslashes($row["gb_website"]);

            $bbcodes = ($cfg['plugin']['guestbook']['bbcodes'] == 'Yes') ? "TRUE" : '';
            $smilies = ($cfg['plugin']['guestbook']['smilies'] == 'Yes') ? "TRUE" : '';

            $update = gb_checkupdaterights($gb_id);
           
            if($update == TRUE)
            {
            $gb_edit = "<a href='plug.php?e=guestbook&amp;a=edit&amp;id=".$gb_id."'><img src=\"plugins/extended/guestbook/img/edit.gif\" alt=\"".$L['plu_edit']."\" /></a>&nbsp;&nbsp;";
            }
            else
            {
            $gb_edit = "";
            }
           
            $gb_authorlink = ($cfg['plugin']['guestbook']['authorlink'] == "Yes") ? ldu_build_user($gb_authorid, $gb_author) : $gb_author;
            $gb_email      = ($gb_email != "") ? "<a href='mailto:".$gb_email."'><img src=\"plugins/extended/guestbook/img/email.gif\" alt=\"".$L['plu_email']."\" /></a>&nbsp;&nbsp;" : '';
            $gb_website    = ($gb_website != "") ? "<a href='".$gb_website."' target='_blank'><img src=\"plugins/extended/guestbook/img/website.gif\" alt=\"".$L['plu_website']."\" /></a>" : '';

            $t-> assign(array(
                "GUESTBOOK_ROW_ID" => $gb_id,
                "GUESTBOOK_ROW_AUTHOR" => $gb_authorlink,
                "GUESTBOOK_ROW_AUTHORID" => $gb_authorid,
                "GUESTBOOK_ROW_TEXT" => ldu_parse($gb_text, $bbcodes, $smilies, 1),
                "GUESTBOOK_ROW_DATE" => $gb_date,
                "GUESTBOOK_ROW_TIME" => $gb_time,
                "GUESTBOOK_ROW_EMAIL" => $gb_email,
                "GUESTBOOK_ROW_WEBSITE" => $gb_website,
                "GUESTBOOK_ROW_EDIT" => $gb_edit,
                ));
            $t->parse("MAIN.GUESTBOOK_ROW");
            $i++;
            }
        }
        else
        {
        $t-> assign(array(
        "GUESTBOOK_EMPTYTEXT" => $L['plu_noentriesyet'],
                ));
        $t->parse("MAIN.GUESTBOOK_EMPTY");
        }
}



?>

Kaan

Moderators


Online status

2,082 posts
http://www.ntka.org
Pagerank: 2

Location: Turkey
Occupation: Destek
Age: 25

#3310   2007-06-12 18:27 GMT      

img ler burda

Code:
$gb_authorlink = ($cfg['plugin']['guestbook']['authorlink'] == "Yes") ? ldu_build_user($gb_authorid, $gb_author) : $gb_author;
            $gb_email      = ($gb_email != "") ? "<a href='mailto:".$gb_email."'><img src=\"plugins/extended/guestbook/img/email.gif\" alt=\"".$L['plu_email']."\" /></a>&nbsp;&nbsp;" : '';
            $gb_website    = ($gb_website != "") ? "<a href='".$gb_website."' target='_blank'><img src=\"plugins/extended/guestbook/img/website.gif\" alt=\"".$L['plu_website']."\" /></a>" : '';[/
b]

üye girişi yapıpda denedin mi guest olarak göstermeye bilir.

Sender

Bilgili Üye


Online status

336 posts

Location: Turkey
Occupation:
Age:

#3311   2007-06-12 18:36 GMT      
üye girişinde ztn göstermior plugın özelligi o sadece guestlerde gösteriyor

Kaan

Moderators


Online status

2,082 posts
http://www.ntka.org
Pagerank: 2

Location: Turkey
Occupation: Destek
Age: 25

#3328   2007-06-13 17:41 GMT      
üye girşini ve giğer ayarları admin panelden yapıcaksın ve ayriyetten denedim ben gayet iyi çalışıyor ilk eklediğim plugin..

İşde burada
> 1 <

Benzer konular (Similar topics) #BETA

Keywords (beta):

Forum Arşiv (beta):

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] [189] [190] [191] [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203] [204] [205] [206] [207] [208] [209] [210] [211] [212] [213] [214] [215] [216] [217] [218] [219] [220] [221] [222] [223] [224] [225] [226] [227] [228] [229] [230] [231] [232] [233] [234] [235]