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 started installing this and realized it puts those two queries system wide. Forum home is the way to go IMO. The permissions need to be worked out to. Great idea, the codes just not ready yet.
Neither thread nor post have an index on dateline, perhaps that would help performance?
I've been running my own version of this on the forumhome in my forumhome cache stats hack since before this came out. 1 query.
I am unable to find that line in the navbar template.....has anyone else had this problem? Copying it and pasting it elsewhere and then searching brings up nothing.
Tip - this is something I do, just copy part of the code and search for that, it may just be one character different, then if you do find it, just check the original code and the one you have in your navbar.
This hack does not work at all! It just says: "There have been threads and posts since your last visit!" And it does not update any counters (Vbulletin 3.0.5).
This hack does not work at all! It just says: "There have been threads and posts since your last visit!" And it does not update any counters (Vbulletin 3.0.5).
This hack does not work at all! It just says: "There have been threads and posts since your last visit!" And it does not update any counters (Vbulletin 3.0.5).