Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Display count of unread posts in welcome box Details »»
Display count of unread posts in welcome box
Version: 1.02, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 09-17-2005 Last Update: 05-14-2006 Installs: 234
 
No support by the author.

This modification is no longer available or supported.

* This hack only works if you use the new database thread marking system, if you don't, then you probably should be. *

With the new marking system I have found a simple count of the new posts since your last visit to be less informative and useful than it used to be - esp as the GetNew function now excludes threads you have read, but includes threads from before your last visit. Therefore I decided to try a new system that counts the actual number of posts that are still considered unread by you, and will show up in a GetNew search.

In fact this hack gives you two options (with a new setting in the vBulletin Options > General Settings). If set to yes, it will only count the unread posts since your last visit, if set to no it will count all posts considered unread. This setting reflects the divider in the GetNew display.

To install this hack simply download the xml file to your pc and then import it into vbulletin as a product - then alter the ACP setting to your preferred option (the default is 'no' (i.e. all unread posts).

Note: This hack injects the result direct into the navbar template during page construction, thus avoiding the need for a template edit. This requires that a certain text combination exists in your template. This will be fine for most boards that use a navbar based on the vB default, but you should bear this in mind if you have a totally custom navbar.



History:

v1.01 : First Release.
v1.02 : Minor changes, no update necessary.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #162  
Old 07-05-2006, 12:34 AM
Murty's Avatar
Murty Murty is offline
 
Join Date: Dec 2005
Location: South Australia
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, i reckon something that would be really good for this mod would be:

to make it so users can choose what particular forums they want to know how many unread posts are in it. So say they choose forum A, forum D, forum M; then when they next come back online it will say 'XX Unread Posts', then they can click that and it will show unread posts like 'search.php?do=getnew' does, but just from the selected forums.

What do you reckon? to hard to do?
Reply With Quote
  #163  
Old 07-06-2006, 12:46 AM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found finally a way to opt out forumIDs

find
Code:
		AND post.dateline > IF(threadread.readtime IS NULL, $cutoff, threadread.readtime)
		AND post.dateline > IF(forumread.readtime IS NULL, $cutoff, forumread.readtime)
		AND post.dateline > $cutoff
in the plugin and below add

Code:
AND thread.forumid NOT IN (xx,xx)
with xx = forumids you want to opt out ..
Reply With Quote
  #164  
Old 08-06-2006, 07:04 PM
firstrebel's Avatar
firstrebel firstrebel is offline
 
Join Date: Dec 2005
Location: West London
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Now that vb 3.6 has been released, there will be no further updates to this modification.
Support will be continued until around the end of 2006 - after that this will be come unsupported.
Is there a 3.6 version of this then?

Bob
Reply With Quote
  #165  
Old 08-06-2006, 07:37 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not yet.
Reply With Quote
  #166  
Old 08-07-2006, 08:52 PM
IrPr IrPr is offline
 
Join Date: Mar 2005
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Paul !

I'm using this plugin with "Opt-Out Forums from Get New Posts" by Andreas and i had trouble when i exclude some forums from Get New Posts, then i had modified Paul's Hack to make integration with

Find:
PHP Code:
$xforum_ids array_keys($vbulletin->forumcache); 
Below that, Add:
PHP Code:
$exclude explode(",",$vbulletin->userinfo['excludeforumsgnp']); 
Now Find:
PHP Code:
if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch'])) 
Replace with:
PHP Code:
if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id$exclude))) 
Reply With Quote
  #167  
Old 08-10-2006, 01:38 AM
RaceJunkie RaceJunkie is offline
 
Join Date: Jun 2005
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

probably the most missed mod on my site.. Can't wait untill 3.6 is out
Reply With Quote
  #168  
Old 08-10-2006, 01:52 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RaceJunkie
probably the most missed mod on my site.. Can't wait untill 3.6 is out
The 3.6 specific release will probably be over the weekend, I have a few minor changes to make (internal, nothing visible). If you really want, then there is no reason I can see that you cannot install this 3.5 version on a 3.6 forum, and then update it later.
Reply With Quote
  #169  
Old 08-10-2006, 02:05 AM
RaceJunkie RaceJunkie is offline
 
Join Date: Jun 2005
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
The 3.6 specific release will probably be over the weekend, I have a few minor changes to make (internal, nothing visible). If you really want, then there is no reason I can see that you cannot install this 3.5 version on a 3.6 forum, and then update it later.
Paul I can wait.. Thank you anyway though
Reply With Quote
  #170  
Old 08-13-2006, 06:08 AM
testpig's Avatar
testpig testpig is offline
 
Join Date: Apr 2004
Location: Australia
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Paul.
I have the vB Advanced issue (and know you dont use it - got that bit).
I added the absolute path to the plugin but to no avail.
I then uninstalled the plugin but it still shows in my forum and vBA hhomepage no matter how hard I F5 my screen! The absolute path is definately in the plugin so its got me stumped.

Why would this plugin still show if its uninstalled? I couldnt see it in the navbar template so its got me stumped.
Reply With Quote
  #171  
Old 11-21-2006, 01:48 PM
JohnBee JohnBee is offline
 
Join Date: Oct 2004
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by IrPr View Post
Thanks Paul !

I'm using this plugin with "Opt-Out Forums from Get New Posts" by Andreas and i had trouble when i exclude some forums from Get New Posts, then i had modified Paul's Hack to make integration with

Find:
PHP Code:
$xforum_ids array_keys($vbulletin->forumcache); 
Below that, Add:
PHP Code:
$exclude explode(",",$vbulletin->userinfo['excludeforumsgnp']); 
Now Find:
PHP Code:
if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch'])) 
Replace with:
PHP Code:
if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id$exclude))) 
Thats great IrPr
I added your code to our own forum and it works maginificently.
I tried to take it a bit futher by modifying Andreas's Opt-Out Forums from Get New/Get Daily MOD with default forum exclusions. Which works however the Display count of unread posts in welcome box still picks up new posts, although it will not list them.

I was hoping perhaps someone here could help figure out what changes need to be done for it to work fully with the modifications.


Code:
PHP Code:
$xforum_ids = array_keys($vbulletin->forumcache); 

Below that, Add:

PHP Code:
$exclude = explode(",",$vbulletin->userinfo['excludeforumsgnp']); 

Now Find:

PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms & 

$vbulletin->bf_ugp_forumpermissions['cansearch'])) 

Replace with:

PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms & 

$vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id, $exclude)))
Opt-Out Forums from Get New Daily changes:
To have one specific forum thats will not show up at all in new posts
ACP / Plugin System / Plugin Manager. Locate the Plugin on Hook search_getnew_start for this Hack, click edit.

Find and edit
Code:
The comma-separated list of excluded forums - add your ID to it.
$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' . $vbulletin->userinfo['excludeforumsgnp']) . ',8';
With the forum id being 8

This only kicks in if the user has defined custom excludes as well.
If you want it to be always active, undo the edit and place

Code:
$vbulletin->GPC['exclude'] .= ',8';
below the }

*** all of these changes work nicely however the Display unread will only filter out excluded forums completely if it is done via the user control panel. Otherwise(this method) it partially filters out the new posts. ex: it shows a new post(no.) but will not display them when clicked on.

Anyone know what needs to be done to get the Display to filter out the excluded forums completely?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07201 seconds
  • Memory Usage 2,336KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (8)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete