PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 38936
Šiandien: 13
Prisijungę nariai
» Svečių: 5
» Narių: 0

» Viso narių: 10,235
» Naujausias: ruslanas tuk

Prisijungimų istorija:
tabux10:49:42
sanpernepamenu
Zbigniew@nepamenu
CepelinasXnepamenu
VV91DDnepamenu
Minusnepamenu
priezilviciunepamenu
EdvinasG1337nepamenu
rolandas94nepamenu
Edis2nepamenu
klubogerbejasnepamenu
Miskinisnepamenu
Pask. modai
Prisijungti
Vardas

Slaptažodis



Dar ne narys?
Registruotis.

Pamiršai slaptažodį?
Prašyk naujo!.

Naujausi prašymai
[L] testas
Narių apklausa
Ar dar kuriate tinklalapius?

Ne
Ne
0% [0 Balsai]

Taip
Taip
88% [7 Balsai]

Naudojuosi socialiniais tinklais
Naudojuosi socialiniais tinklais
13% [1 Balsas]

Balsai: 8
Kad galėtum balsuoti, turi prisijungti.
Pradėta: 2022-05-29 19:54
Shoutbox
You must login to post a message.

2026-03-21 19:07

2025-07-13 17:07
svx, smagu kad dar atsiranda naujų narių Šypsosi2

2024-03-07 22:13
Oj Tabux… apkabinčiau už tą moderatorių 😁

2024-02-22 17:40
Šypsosi2 jo buvo laikai.. Senukai jau mes. Bega laikas greiciau nei noretusi. Smagu matyti kad uzsuka seni nariai, ne as vienas Šypsosi

2024-02-20 22:18
Zodziu.. Nostalgija. Sorry Tabux uz spam’a, netelpa viskas i viena shout’a. 😁

Shoutbox Archive
Peržiūrėti temą
 Spausdinti temą
v7 V7 Komentarai
deiwis1985
#1 Spausdinti pranešimą
parašyta 2011-01-03 02:46
Naujokas



Reputacija: 0

Pranešimai: 19
Įstojo: 2010-07-21

Sveiki, taigi. pas man ajax komentarai, bet paspaudus redagoti komentarus numeta belenkur

http://*********.lt/administration/comments.php?aid=ff156eb302120e84&action=edit&comment_id=2647&ctype=U&cid=28

komentara eina redagoti, tik kad numeta belenkur, o anksciau toi pacioi vietoi redagavo kur ir rasyti komentara.

galima tai pakeisti?


\includes\comments\show_comments.php

kodas


Download source  Code
/*-------------------------------------------------------+
| Ajax Comments mSF For PHP-Fusion 7.xx v.1.0
| Copyright 2008-2009 Powered by .:MeF:.
| URL: http://x-iweb.ru/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
include LOCALE.LOCALESET.\"comments.php\";

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

   global $settings, $locale, $userdata, $aidlink, $id, $c_start;
   
$link = FUSION_SELF.(FUSION_QUERY ? \"?\".FUSION_QUERY : \"\");
$link = preg_replace(\"^(&|\?)c_action=(edit|delete)&comment_id=\d*^\", \"\", $link);

   echo \"\";
   $c_rows = dbcount(\"(comment_id)\", DB_COMMENTS, \"comment_item_id='$cid' AND comment_type='$ctype'\");
   if (!isset($c_start) || !isnum($c_start)) { $c_start = 0; }
$result = dbquery(\"SELECT tcm.*,user_name, user_avatar, user_id, user_posts,
user_joined, user_location, user_lastvisit FROM \".DB_COMMENTS.\" tcm LEFT JOIN
\".DB_USERS.\" tcu ON tcm.comment_name=tcu.user_id WHERE comment_item_id='$cid'
AND comment_type='$ctype' ORDER BY comment_datestamp ASC LIMIT \".$c_start.\",10\"
   );
   if (dbrows($result)) {
      $i = $c_start+1;
      if ($c_rows > 10) {
         echo \"
\".makecommentnav($c_start, 10, $c_rows, 3, $clink.\"&\").\"
\n\";
      }
      
echo \"\n\";

while ($data = dbarray($result)) {
echo \"\";
echo \"\";

echo \"\n\n
\";

if ((iADMIN && checkrights(\"C\")) || (iMEMBER && $data['comment_name'] == $userdata['user_id']
&& isset($data['user_name']))) {
      echo \"
\n\";
      echo \"
\";
      echo \"\";
        echo \"\";
      echo \"\";
      echo \"\";
      echo \"\n\";   
      echo \"
\n\";
      echo \">\".$locale['c109'].\"\n
\n\";
}
echo \" name='c\".$data['comment_id'].\"'>#\".$i.\" | \";


if ($data['user_name']) {
echo \"\".$data['user_name'].\"\n\";
} else {
echo \"\".$data['comment_name'].\"\n\";
}
echo \"\".$locale['global_071'].showdate(\"longdate\", $data['comment_datestamp']).\"\n\";

echo \"
\";

if ($data['user_avatar'] && file_exists(IMAGES.\"avatars/\".$data['user_avatar']))
{
echo \"
\n\";
echo \" alt='\".$locale['c110'].\"' />
\n\";
echo \"\n\";
} else {
echo \"
\n\";
echo \"'\".$locale['c110'].\"'
\n\";
}

echo \"
\".nl2br(parseubb(parsesmileys($data['comment_message']))).\"\";
$i++;
}

      echo \"
\";

echo \"
\";
      
      if (iADMIN && checkrights(\"C\")) {
         echo \"\n\";
      }
      if ($c_rows > 10) {
         echo \"
\".makecommentnav($c_start, 10, $c_rows, 3, $clink.\"&\").\"
\n\";
      }
   } else {
      
      echo \"
\";
      
      echo $locale['c101'].\"\n\";
   }
}

function makecommentnav($start, $count, $total, $range = 0, $link) {

   global $locale;

   $pg_cnt = ceil($total / $count);
   if ($pg_cnt <= 1) { return \"\"; }

   $idx_back = $start - $count;
   $idx_next = $start + $count;
   $cur_page = ceil(($start + 1) / $count);

   $res = $locale['global_092'].\" \".$cur_page.$locale['global_093'].$pg_cnt.\": \";
   if ($idx_back >= 0) {
      if ($cur_page > ($range + 1)) {
         $res .= \"1...\";
      }
   }
   $idx_fst = max($cur_page - $range, 1);
   $idx_lst = min($cur_page + $range, $pg_cnt);
   if ($range == 0) {
      $idx_fst = 1;
      $idx_lst = $pg_cnt;
   }
   for ($i = $idx_fst; $i <= $idx_lst; $i++) {
      $offset_page = ($i - 1) * $count;
      if ($i == $cur_page) {
         $res .= \"\".$i.\"\";
      } else {
         $res .= \"\".$i.\"\";
      }
   }
   if ($idx_next < $total) {
      if ($cur_page < ($pg_cnt - $range)) {
         $res .= \"...\".$pg_cnt.\"\n\";
      }
   }

   return \"
\n\".$res.\"
\n\";
}
   
?>



Redagavo deiwis1985 2011-01-03 02:48
 
PM
Peršokti į forumą: