View Full Version : Last posts since last visit!
xGriffin
09-07-2008, 12:08 AM
I really need this mod for 3.7 or 3.6 if it will work on 3.7. It's a little thing under your PM's saying:
xxx Posts since last visit
Does anyone have this please? thanks. :):cool:
Opserty
09-07-2008, 08:22 AM
Search and you will find ;)
Display Unread Posts and New Reputation Comments (https://vborg.vbsupport.ru/showthread.php?t=168303&highlight=unread+posts)
xGriffin
09-19-2008, 07:23 AM
I've tried this one so many times, it doens't show up new posts for me
Elizabeth_1977
12-02-2009, 09:07 PM
I've tried this one so many times, it doens't show up new posts for me
Yeah, it never seems to work for me either. (I use 3.7.)
ChopSuey
12-03-2009, 12:39 AM
You have to set the settings correctly lol.
Elizabeth_1977
12-03-2009, 02:13 AM
You have to set the settings correctly lol.
Actually, I did and it still wouldn't work. I've used the mod a couple of years ago on another forum I had that operated on vBulletin 3.6 and it worked just fine then.
BBR-APBT
12-03-2009, 03:24 AM
AdminCP --> Plugins & Products --> Add New Plugin
Product: vBulletin
Hook Location: global_start
Title: New post on top of forums
Plugin PHP Code:
$newposts = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post AS post " . iif($vbulletin->options['threadmarking'], 'LEFT JOIN ' . TABLE_PREFIX . 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' . $vbulletin->userinfo['userid'] . ')') . " WHERE dateline >= " . $vbulletin->userinfo['lastvisit'] . iif($vbulletin->options['threadmarking'], ' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)'));
$newposts = vb_number_format($newposts['count']);
Plugin is Active: yes
Then put this where ever you want it in a template:
$vbphrase[new_posts] since your last visit: <a href="search.php?$session[sessionurl]do=getnew">$newposts</a>
I put mine at the very end of navbar. This should work on 3.7 and 3.8.
Braders
12-08-2009, 06:59 AM
Having battled with this for longer than I care to remember as my members really wanted this back on the navbar and not in notifications, I have to say a massive 'THANKS' to you BBR-APBT as want you recommended worked a treat with 3.8.4.
If I dare to push the boat out what code would I need to implement to get the 'New rep since last visit' working in the same place?
I'm somewhat of a novice with this stuff, hence why I'm asking.
Thanks again!
AdminCP --> Plugins & Products --> Add New Plugin
Product: vBulletin
Hook Location: global_start
Title: New post on top of forums
Plugin PHP Code:
$newposts = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post AS post " . iif($vbulletin->options['threadmarking'], 'LEFT JOIN ' . TABLE_PREFIX . 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' . $vbulletin->userinfo['userid'] . ')') . " WHERE dateline >= " . $vbulletin->userinfo['lastvisit'] . iif($vbulletin->options['threadmarking'], ' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)'));
$newposts = vb_number_format($newposts['count']);
Plugin is Active: yes
Then put this where ever you want it in a template:
$vbphrase[new_posts] since your last visit: <a href="search.php?$session[sessionurl]do=getnew">$newposts</a>
I put mine at the very end of navbar. This should work on 3.7 and 3.8.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.