View Full Version : On/Off Boutons on sub Forums
Corbu
05-13-2002, 05:08 PM
hello,
I made this request one week ago and nobody send me a response : Thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=38362)
So, I'm searching to made it myself...
But I do not understand how is it made ... How vbuelltin know if there is a new message and how he made to change on.gif by off.gif ? Is there a template for this ?
Thanks for your help
scsa20
05-13-2002, 05:16 PM
the code itself is in a PHP file, don't know right now, but when I get home, I'll look it up ;)
scsa20
05-13-2002, 10:28 PM
here's a block of code that I found for you:
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
$forum['onoff']='on';
} else {
if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
$userlastvisit=$bbforumview[$forum['forumid']];
} else {
$userlastvisit=$bbuserinfo['lastvisit'];
}
if ($userlastvisit<$forum['lastpost']) {
$forum['onoff']='on';
} else {
$forum['onoff']='off';
}
}
if ((!$forumperms['canpostnew'] and $showlocks) or $forum['allowposting']==0) {
$forum['onoff'].='lock';
}
that can be found in index.php of the main dir.
this one can also be found in the same file:
if ($newpm['messages']==0) {
$lightbulb='off';
} else {
$lightbulb='on';
}
that's all I found for now, I'll look it up some more, but that should be it ;)
Corbu
05-15-2002, 05:06 PM
okayyy,
soo, I think, I can apply it into the sub forum index... hum hum...
Thank You very much
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.