Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
kaip pakeist tą panel, kad rodytu ne viso forumo naujausius pranešimus, o tam tikros kategorijos? Gal yra koks modas?
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
Negi niekas nežino?
|
Vilme
Narys
Kapitonas
Pranešimai: 670
Įstojęs: 2008 Vas. 17 21:02:35
|
Imesk koda...
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
kurį? ta panele 4.php turi
|
Vilme
Narys
Kapitonas
Pranešimai: 670
Įstojęs: 2008 Vas. 17 21:02:35
|
forum_threads_list_panel
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
va
<?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, 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 ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
echo "<tr>\n";
if ($theme_width == "100%") {
echo "<td width='45%' class='$row_color'><span class='small'>".$data['forum_name']."</span></td>
<td width='55%' 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></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']." (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 30)."</a></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."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a></span></td>
<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();
}
?>
ramon: smiley off.
|
ramon
Narys
Ekspertas
Pranešimai: 2977
Įstojęs: 2006 Gru. 18 11:12:50
|
Uzklausos galas turetu atroditi mazdauk taip :
where forum_id=*skaicius*");
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
prieš closetable? ar kur?
|
MAnjack
Garbės narys
Legenda
Pranešimai: 11821
Įstojęs: 2006 Kov. 2 20:03:58
|
Tas pats. Svrbu, kad būtų užklausoj.
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
va kaip atsakė:
Parse error: syntax error, unexpected T_STRING in
|
MAnjack
Garbės narys
Legenda
Pranešimai: 11821
Įstojęs: 2006 Kov. 2 20:03:58
|
in kur?
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
MAnjack parašė:
in kur?
ten kur rašiau toje line ir rašo error bandžiau prieš pat closetable gavau line 51, rezultatuose dar irgi line 20
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
Padėsit kas?
|
Creatium
Administratorius
Viršesnis už Dievą
Pranešimai: 5868
Įstojęs: 2007 Rugp. 9 17:08:20
|
tai gal parasei where forum_id=*2*"); ?
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
Death parašė:
tai gal parasei where forum_id=*2*"); ?
bandžiau ir where forum_id=*2*"); ir where forum_id=2"); tas pats :|
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
Tai kaip nieks nežinot?
|
Enzo
Narys
Tankas
Pranešimai: 2397
Įstojęs: 2007 Lie. 30 22:07:24
|
forum_id="2"
gal toks?
FCBarcelona
mes que un club |
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
hm kai rašau WHERE forum_id="2" lygiai tas pats, kad ir kur dėčiau-error, o pabandžiau pakeist forum_access į forum_id="2" tai visiškai nieko nepasikeitė-visų kategorijų rodo.
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
negi niekas nežinot?
|
kiskiss
Narys
Terminatorius
Pranešimai: 1545
Įstojęs: 2006 Rugs. 11 17:09:58
|
Paryškintą skaičių keisk į savo.
<?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, 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')." AND forum_id=4 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 ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
echo "<tr>\n";
if ($theme_width == "100%") {
echo "<td width='45%' class='$row_color'><span class='small'>".$data['forum_name']."</span></td>
<td width='55%' 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></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']." (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 30)."</a></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."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a></span></td>
<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();
}
?>
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
Dabar kažkas naujo negaunu error, bet ir panel dingo tiesiog išnyko, kad ir koki skaičių dėčiau.
|
kiskiss
Narys
Terminatorius
Pranešimai: 1545
Įstojęs: 2006 Rugs. 11 17:09:58
|
Man viskas veikia...
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
nu nežinau arti tikslo, bet neveikia vietoj paneles yra užrašas: ļ»æ
|
MAnjack
Garbės narys
Legenda
Pranešimai: 11821
Įstojęs: 2006 Kov. 2 20:03:58
|
Pasikeisk skaičių paryškintą į savo forumo id ir užseivink normalia koduote.
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
MAnjack parašė:
Pasikeisk skaičių paryškintą į savo forumo id ir užseivink normalia koduote.
Koduotė kaip ir buvo ANSI o skaičius 2 nes ir forumo kategorija antra.
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
Kur dar gali problema būti?
|
MAnjack
Garbės narys
Legenda
Pranešimai: 11821
Įstojęs: 2006 Kov. 2 20:03:58
|
Kad visiem veikia.
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
nesuprantu kame čia reikals
|
Creatium
Administratorius
Viršesnis už Dievą
Pranešimai: 5868
Įstojęs: 2007 Rugp. 9 17:08:20
|
Tai gal toje vietoje tai ir palikai koda
forum_id=[ color=red]4[/ color]
|
Valuediz
Narys
Buldozeris
Pranešimai: 242
Įstojęs: 2008 Kov. 30 20:03:44
|
juokauji? :) Žinoma, kad ne ir tada mestu errora
Va vėl tas failas su idėtu kodu:
<?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, 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')." AND forum_id=2 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 ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; }
echo "<tr>\n";
if ($theme_width == "100%") {
echo "<td width='45%' class='$row_color'><span class='small'>".$data['forum_name']."</span></td>
<td width='55%' 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></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']." (".$data['forum_name'].")'>".trimlink($data['thread_subject'], 30)."</a></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."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a></span></td>
<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();
}
?>
nematot klaidų? ?|
Redagavo bad_user 2008 Geg. 7 20:05:24 |