Version: 1.00, by Gary King
Developer Last Online: Jun 2020
Version: 3.0.0
Rating:
Released: 01-02-2004
Last Update: Never
Installs: 172
No support by the author.
PLEASE CLICK ON THE INSTALL BUTTON IF YOU INSTALLED THIS! THANKS!
What does this hack do?
This hack basically shows the number of new threads and posts since your last visit, in the navbar (under your nick.) Check out the attached screenshot for more information
Installation
This is a pretty simple hack to install.
Instructions are as follows:
FILE MODIFICATIONS
global.php
TEMPLATE MODIFICATIONS
navbar
PHRASES
navbar_sincelastvisit
OPEN global.php AND FIND
PHP Code:
echo "End call of global.php: $aftertime\n";
echo "\n<hr />\n\n";
}
(NOTE: If you want old threads with new posts to count as a new thread, then skip this next step)
UNDER IT, ADD
PHP Code:
# SINCE YOUR LAST VISIT
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM ".TABLE_PREFIX."thread WHERE lastpost > '".$bbuserinfo['lastvisit']."'");
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM ".TABLE_PREFIX."post WHERE dateline > '".$bbuserinfo['lastvisit']."'");
(NOTE: If you did the step above, then skip this next step)
UNDER IT, ADD
PHP Code:
# SINCE YOUR LAST VISIT
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM ".TABLE_PREFIX."thread WHERE dateline > '".$bbuserinfo['lastvisit']."'");
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM ".TABLE_PREFIX."post WHERE dateline > '".$bbuserinfo['lastvisit']."'");
i'm new to vb and i wanna try to add hacks and stuff to my board. i found the global.php file on the server but i couldn't find the navbar template file. to make things easier for me, is there a site or list somewhere showing where all the files are installed into which folder or whatever? oh yeah, will this work for vb3 gamma?
i'm new to vb and i wanna try to add hacks and stuff to my board. i found the global.php file on the server but i couldn't find the navbar template file. to make things easier for me, is there a site or list somewhere showing where all the files are installed into which folder or whatever? oh yeah, will this work for vb3 gamma?
the templates are located in your admin control panel under
Style Manager
in the dropdown menu click edit templates and you will see them all
Wouldn't it be better to have it so that new threads only showed up when there actually were new threads? You could do that by selecting the id from thread table where createdate is newer than last visit.
SELECT threadid FROM thread WHERE dateline > $pmlastvisit
i'm new to vb and i wanna try to add hacks and stuff to my board. i found the global.php file on the server but i couldn't find the navbar template file. to make things easier for me, is there a site or list somewhere showing where all the files are installed into which folder or whatever? oh yeah, will this work for vb3 gamma?
Yep it should work with vB 3 Gamma, you can try anyways, it's a very quick install and uninstall if required