View Full Version : Click icon to get all new posts in each forum
SirSteve
10 Nov 2001, 23:02
I would like this hack that is on the home page. Can it be posted? :)
Thanks in advance.
In index.php, find this:
// 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';
}
}
and replace it with this:
// do light bulb
if ($bbuserinfo['lastvisitdate']=='Never') {
$forum['onoff']='on';
$forum['getnews']="<a href=\"search.php?s=$session[sessionhash]&action=getnew&forumid=$forum[forumid]\">";
$forum['getnewe']='</a>';
} 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';
$forum['getnews']="<a href=\"search.php?s=$session[sessionhash]&action=getnew&forumid=$forum[forumid]\">";
$forum['getnewe']='</a>';
} else {
$forum['onoff']='off';
$forum['getnews']='';
$forum['getnewe']='';
}
}
Now in forumhome_forumbit_levelX_post templates replace this:
<img src="{imagesfolder}/$forum[onoff].gif" border="0" alt="">
with this:
$forum['getnews']<img src="{imagesfolder}/$forum[onoff].gif" border="0" alt="">$forum['getnewe']
That's it I think... this will only work if you have v2.2.0.
SirSteve
11 Nov 2001, 14:50
Can you double check the code?
This is mine:
<img src="{imagesfolder}/$forum[onoff].gif" border="0" alt="">
not this:
<img src="images/$forum[onoff].gif" border="0" alt="">
Even so, I made the changes with adding the {imagesfolder} to your replacement code and I get errors.
SirSteve, remove ' in second code.
$forum[getnews]<img src="{imagesfolder}/$forum[onoff].gif" border="0" alt="">$forum[getnewe]
vBulletin® v3.8.12, Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC.