View Full Version : need help with this code
squawell
03-04-2003, 02:50 PM
i have problem with below code:
i put this code in phpincloud template:
if ($thread['replycount'] >10 and $thread['views'] >100){
$hot='HotTopic';}
and i put $hot in forumdisplaybit template but it not show up
so~~does this code wrong??
thankz~ :bunny:
Xenon
03-04-2003, 02:53 PM
because $thread is never defined in phpinclude or before.
you have to put that code into forumdiplay.php into the while loop
squawell
03-04-2003, 02:56 PM
so which place should i put it in that file??
or i can put that in everywhere in forumdiplay.php ??
Xenon
03-04-2003, 02:59 PM
after this part: while ($thread=$DB_site->fetch_array($threads)) { // and $counter++<$perpage) {
$thread['movedprefix'] = '';
$thread['typeprefix'] = '';
squawell
03-04-2003, 03:06 PM
Originally posted by Xenon
after this part: while ($thread=$DB_site->fetch_array($threads)) { // and $counter++<$perpage) {
$thread['movedprefix'] = '';
$thread['typeprefix'] = '';
thakz Xenon~~~
now it show up .............:D:D:D:D
Xenon
03-04-2003, 03:08 PM
:)
you're welcome :)
squawell
03-04-2003, 03:27 PM
Originally posted by Xenon
:)
you're welcome :)
Xenon i have another question~~~
about above code if i want to add attach file download times
variable what name is that?$thread[counter]??or......
thankz again~~
Xenon
03-04-2003, 03:35 PM
nope, just the ammount of announcements is saved in the threadtable, not the ammount of downloads.
i wouldn't do this, because you have to add a query per thread in aerage then...
squawell
03-04-2003, 03:39 PM
Originally posted by Xenon
nope, just the ammount of announcements is saved in the threadtable, not the ammount of downloads.
i wouldn't do this, because you have to add a query per thread in aerage then...
oh~~i see!! :rambo:
Xenon thankz again!!:D:D:D
squawell
03-07-2003, 06:09 AM
i use this code and it work well but i want it more different
if ($thread['forumid']== x){
$hacktext='<br>XXX';}
elseif($thread['forumid']==x){
$hacktext='ZZZ';}
this is what i want it to:
if the thread starter online show XXXif offline show ZZZ
how can i do that??
thankz..............
squawell
03-08-2003, 09:52 AM
ANYONE can help that plz??
squawell
03-17-2003, 12:23 AM
sorry bump my post.....but still need help.....
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.