Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Forumo temu sarasas
Parašė VeNoM· 2008 Bal. 3 21:04:49
#1
Sveiki dabar pas mane puslapyje forumo temu sarasas atrodo taip:
Kaip matote jame yra
5 temos.
As noriu kad butu ne
5 temos o tik
4! Jaigu kas gali padeti tai stai mano temu sarasas
(forum_threads_list_panel):
<?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
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id,user_name,user_level, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."posts tp USING(thread_id)
INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
);
if (dbrows($result) != 0) {
$i = 0;
opentable($locale['025']);
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
if ($theme_width == "100%") echo "<td class='tbl2'><span class='small'><b>".$locale['030']."</b></span></td>\n";
echo "<td class='tbl2'><span class='small'><b>".$locale['031']."</b></span></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['033']."</b></span></td>
<td align='center' colspan='2' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><b>".$locale['034']."</b></span></td>
</tr>\n";
while ($data = dbarray($result)) {
if ($data[user_level] == "103") {
$userx = "<font color='red'>".$data[user_name]."</font>";
}else if ($data[user_level] == "102") {
$userx = "<font color='#B5DE21'>".$data[user_name]."</font>";
}else if ($data[user_level] == "101") {
$userx = "<font color='#000000'>".$data[user_name]."</font>";
}else if ($data['user_status'] == "1") {
$userx = "<font color='gray'>".$data[user_name]."</font>";
}
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
echo "<tr>\n";
if ($theme_width == "100%") {
echo "<td width='55%' class='$row_color'><span class='small'>".$data['forum_name']."</span></td>
<td width='45%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)."' (".trimlink($data['forum_name'], 30).")</span></td>\n";
} else {
echo "<td width='100%' class='$row_color'><span class='small'><a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 30)."</a> (".trimlink($data['forum_name'], 30).")</span></td>\n";
}
echo "<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".($data['count_posts']-1)."</span></td>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'><a href='".BASEDIR."narys,".$data['thread_lastuser']."'>$userx</a>
<td align='center' width='1%' class='$row_color' style='white-space:nowrap'><span class='small'>".showdate("forumdate", $data['thread_lastpost'])."</span></td>
</tr>\n";
$i++;
}
if (iMEMBER) {
echo "<tr>\n<td align='center' colspan='5' class='tbl1'><span class='small'><a href='".INFUSIONS."forum_threads_list_panel/my_threads.php'>".$locale['026']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/my_posts.php'>".$locale['027']."</a> |
<a href='".INFUSIONS."forum_threads_list_panel/new_posts.php'>".$locale['028']."</a></span></td>\n</tr>\n";
}
echo "</table>\n";
closetable();
}
?>
Parašė MAnjack· 2008 Bal. 3 21:04:17
#2
LIMIT 0,5 keisk į LIMIT 0,4
Parašė VeNoM· 2008 Bal. 3 21:04:04
#3
As nerandu
LIMIT 0,5. As radau tik :
LIMIT 0,".$settings['numofthreads'] , Kai bandau sita keist i :
LIMIT 0,4 Man tada meta errora...
Parašė MAnjack· 2008 Bal. 3 21:04:01
#4
Kokį?
Parašė VeNoM· 2008 Bal. 3 21:04:41
#5
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/venomas/godlike.lt/infusions/forum_threads_list_panel/forum_threads_list_panel.php on line 23
Parašė MAnjack· 2008 Bal. 3 21:04:15
#6
Šitą:
0,".$settings['numofthreads']
Keisk į:
0,4"
Parašė VeNoM· 2008 Bal. 3 21:04:35
#7
Aciu, viskas veikia galit rakint tema :]
Parašė MAnjack· 2008 Bal. 3 21:04:24
#8
Nerakinsim, nes kam nors dar gali kilt klausimų.