vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Last posts since last visit! (https://vborg.vbsupport.ru/showthread.php?t=190221)

xGriffin 09-06-2008 11:08 PM

Last posts since last visit!
 
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 07:22 AM

Search and you will find ;)

Display Unread Posts and New Reputation Comments

xGriffin 09-19-2008 06: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

Quote:

Originally Posted by xGriffin (Post 1625481)
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

Quote:

Originally Posted by ChopSuey (Post 1924437)
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:
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:

Code:

$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!

Quote:

Originally Posted by BBR-APBT (Post 1924515)
AdminCP --> Plugins & Products --> Add New Plugin

Product: vBulletin
Hook Location: global_start
Title: New post on top of forums
Plugin PHP Code:
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:

Code:

$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.



All times are GMT. The time now is 12:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01939 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete