Navigacija

Vartotojų tinkle

Prisijungusių svečių: 138
Prisijungusių narių: 0
Prisijungusių narių nėra

Registruoti nariai: 25,955
Naujausias narys: Johny

Naujausi straipsniai

Paskutiniai nariai

Johny 2 savaitės
Reikalas 3 savaitės
Jaunelis 9 savaitės
lanis10 savaitės
And2s10 savaitės
Memento Mori15 savaitės
ozzWANTED16 savaitės
Quwqkibor18 savaitės
asirija22 savaitės
tomeem24 savaitės
weberiz27 savaitės
mRokass29 savaitės
kartoonas30 savaitės
iaescortsmap31 savaitės
grunskiz33 savaitės
Bruksnys34 savaitės
illusion34 savaitės
ordo35 savaitės
Jurgaila35 savaitės
originalcs1635 savaitės

Informacija:


OS: Unknown
Naršyklė: Nežinoma
IP: 18.191.74.66
Naujienų: 529
Straipsnių: 235
Temų: 52,588
Postų: 522,528
Postų pask. parą: 0
Shout'ų pask. parą: 0
P.S.C. pask. parą: 0
Nuorodų kataloge: 13

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



Pamiršai slaptažodį?
Paprašyk naujo

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

Jaunelis
2024 Lie. 25 11:07:43
Oho vis dar veikia svetainė akinanti šypsen Šimtas metų, matau Šaukykloje nuostalgija. Smagu panaršyt po forumą ir pažiūrėt senas temas šypsosi

And2s
2024 Lie. 17 19:07:04
2008 pirmą kart čia patekau, man buvo 10m ir čia pramokau programavimo.. smagu skaityti senas žinutes, tokia nostalgija akinanti šypsen ačiū Ozz kad saugoji šitą kultūrinį reliktą šypsosi

ozzWANTED
2024 Sau. 17 01:01:00
Desperatiškus komentarus šaukykloje su accountu po mėnesio prasibuvimo, ištryniau. Pasaulis ir taip juodas. Įjungiam šviesą, prašviesės. šypsosi

Majakas
2023 Gru. 10 19:12:39
Negaliu patikėti jog žinutės/pranešimai visi yra nuo 2008 m akinanti šypsen

Žmogus
2023 Rugs. 7 21:09:14
O gal BloodKiller pasijungs?

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

Taip, bet yra ką taisyti (parašysiu komentaruose)

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
comments_include.php
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Bendri PHP-F klausimai

Autorius: Narysx Peržiūrų: 1262      Spausdinti temą
2008 Bal. 26 12:04:35          1 žinutė iš 5
Spausdinti pranešimą
Įsidėjau naują comments_include.php, kuriame rodo avatarus komentaruose. Viena problema - bet kurioje saito vietoje paspaudus "Komentarų valdymas" išmeta į news.php. Įdėjus originalų comments_include.php vėl viskas veikia.

Naujas c._include.php:

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email: simonpatterson@dsl.pipex.com
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

include LOCALE.LOCALESET."comments.php";

function showcomments($ctype,$cdb,$ccol,$cid,$clink) {

   global $settings,$locale,$userdata;
   
   if (isset($_POST['post_comment'])) {
      if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
      if (iMEMBER) {
         $comment_name = $userdata['user_id'];
      } elseif ($settings['guestposts'] == "1") {
         $comment_name = trim(stripinput($_POST['comment_name']));
         $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
         if (isNum($comment_name)) $comment_name="";
      }
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
      if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("INSERT INTO ".DB_PREFIX."comments VALUES('', '$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      }
      redirect($clink);
   }

   tablebreak();
   opentable($locale['c100']);
   $result = dbquery(
      "SELECT tcm.*,user_name,user_avatar FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );
   if (dbrows($result) != 0) {
      $i = 0;
      echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
      while ($data = dbarray($result)) {
         if ($data['user_avatar'] != "") {
            $avatar = "<center><a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'><img height='50' width='50' src='".IMAGES."avatars/".$data['user_avatar']."'></center>";
         } else {
            $avatar = "<center><img height='50' width='50' src='".IMAGES."avatars/noav.gif'";
         }
         echo "<tr><td class='".($i% 2==0?"tbl1":"tbl2")."'>".$avatar."</td>\n<td class='".($i% 2==0?"tbl1":"tbl2")."' valign='top'><span class='comment-name'>\n";
         if ($data['user_name']) {
            echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";
         } else {
            echo $data['comment_name'];
         }
         if ($data['comment_smileys'] == "1") {
            $comment_message = parsesmileys($data['comment_message']);
         } else {
            $comment_message = $data['comment_message'];
         }
         $comment_message = nl2br(parseubb($comment_message));
         echo "</span>\n<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>\n";
         echo $comment_message."</td>\n</tr>\n";
         $i++;
      }
      if (checkrights("C")) echo "<tr>\n<td colspan='2' align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php?ctype=$ctype&cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";
      echo "</table>\n";
   } else {
      echo $locale['c101']."\n";
   }
   closetable();
   tablebreak();
   opentable($locale['c102']);
   if (iMEMBER || $settings['guestposts'] == "1") {
      echo "<form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
      if (iGUEST) {
         echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='50' class='textbox' style='width:100%;'></td>
</tr>\n";
      }
      echo "<tr>
<td align='center'><textarea name='comment_message' rows='6' class='textbox' style='width:400px'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('comment_message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('comment_message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('comment_message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('comment_message', '
', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('comment_message', '[codas]', '[/codas]');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('comment_message', '
', '
');\">
<br><br>
".displaysmileys("comment_message")."
</tr>
<tr>
<td align='center'><input type='checkbox' name='disable_smileys' value='1'>".$locale['c107']."<br><br>
<input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td>
</tr>
</table>
</form>\n";
   } else {
      echo $locale['c105']."\n";
   }
   closetable();
}
?>








Senas:

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email: simonpatterson@dsl.pipex.com
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

include LOCALE.LOCALESET."comments.php";

function showcomments($ctype,$cdb,$ccol,$cid,$clink) {

   global $settings,$locale,$userdata,$aidlink;
   
   if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
      $flood = false;
      if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
      if (iMEMBER) {
         $comment_name = $userdata['user_id'];
      } elseif ($settings['guestposts'] == "1") {
         $comment_name = trim(stripinput($_POST['comment_name']));
         $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
         if (isNum($comment_name)) $comment_name="";
      }
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
      if ($comment_name != "" && $comment_message != "" && !preg_match("#\[url\](.*?)\[/url\]#si", $message)) {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".DB_PREFIX."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }
         if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      }
      redirect($clink);
   }

   tablebreak();
   opentable($locale['c100']);
   $result = dbquery(
      "SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );
   if (dbrows($result) != 0) {
      $i = 0;
      echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
      while ($data = dbarray($result)) {
         echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>\n";
         if ($data['user_name']) {
            echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'>".$data['user_name']."</a>";
         } else {
            echo $data['comment_name'];
         }
         if ($data['comment_smileys'] == "1") {
            $comment_message = parsesmileys($data['comment_message']);
         } else {
            $comment_message = $data['comment_message'];
         }
         $comment_message = nl2br(parseubb($comment_message));
         echo "</span>\n<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>\n";
         echo $comment_message."</td>\n</tr>\n";
         $i++;
      }
      if (checkrights("C")) echo "<tr>\n<td align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php".$aidlink."&amp;ctype=$ctype&amp;cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";
      echo "</table>\n";
   } else {
      echo $locale['c101']."\n";
   }
   closetable();
   tablebreak();
   opentable($locale['c102']);
   if (iMEMBER || $settings['guestposts'] == "1") {
      echo "<form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
      if (iGUEST) {
         echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='30' class='textbox' style='width:100%;'></td>
</tr>\n";
      }
      echo "<tr>
<td align='center'><textarea name='comment_message' rows='6' class='textbox' style='width:400px'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('comment_message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('comment_message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('comment_message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('comment_message', '
', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('comment_message', '[codas]', '[/codas]');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('comment_message', '
', '
');\">
<br><br>
".displaysmileys("comment_message")."
</tr>
<tr>
<td align='center'><input type='checkbox' name='disable_smileys' value='1'>".$locale['c107']."<br><br>
<input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td>
</tr>
</table>
</form>\n";
   } else {
      echo $locale['c105']."\n";
   }
   closetable();
}
?>





Kame reikals? ?|

2008 Bal. 26 12:04:13          2 žinutė iš 5
Spausdinti pranešimą
Atsidaryk savo nauja comments_include.php.

Rask 75 eilute :
if (checkrights("C")) echo "<tr>\n<td colspan='2' align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php?ctype=$ctype&cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";




Ir pakeisk i sita :
if (checkrights("C")) echo "<tr>\n<td align='right' class='".($i% 2==0?"tbl1":"tbl2")."'><a href='".ADMIN."comments.php".$aidlink."&amp;ctype=$ctype&amp;cid=$cid'>".$locale['c106']."</a></td>\n</tr>\n";




2008 Bal. 26 13:04:10          3 žinutė iš 5
Spausdinti pranešimą
Kai taip padarau, paspaudus "Komentarų valdymas" meta error:

Not Found

The requested URL /administration/comments.php&ctype=U&cid=1 was not found on this server


.
2008 Bal. 26 13:04:41          4 žinutė iš 5
Spausdinti pranešimą
Pamirsau dar parasyti kad reikia sektelti $aidlink`a.

Pradzioi rask sia eilute :
global $settings,$locale,$userdata;




Ir pekeisk i sia eilute :
global $settings,$locale,$userdata,$aidlink;




2008 Bal. 26 15:04:58          5 žinutė iš 5
Spausdinti pranešimą
Ačiū.merkia akį Veikia.merkia akį
Peršokti į forumą: