vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Display count of unread posts in welcome box (https://vborg.vbsupport.ru/showthread.php?t=96522)

Paul M 09-17-2005 10:00 PM

Display count of unread posts in welcome box
 
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.

Boofo 09-18-2005 10:59 PM

Nice mod but you might want to remove the echo query out of the xml file or some newbies are really going to be confused. ;)

Paul M 09-18-2005 11:16 PM

Yeah, I suppose so.

Since it was commented out it wouldn't actually do anything, but removed anyway. :)

Boofo 09-18-2005 11:27 PM

Quote:

Originally Posted by Paul M
Yeah, I suppose so.

Since it was commented out it wouldn't actually do anything, but removed anyway. :)

Just trying to save you tons of "why does it run 2 queries that are the same" questions you were bound to get. ;)

Kirk Y 09-18-2005 11:47 PM

Nice to know you think so highly of us Boofo. Ha ha... great idea.

* acidburn0520 clicks install

Boofo 09-19-2005 01:33 AM

Quote:

Originally Posted by acidburn0520
Nice to know you think so highly of us Boofo. Ha ha... great idea.

* acidburn0520 clicks install

I was hoping I didn't have to classify you as "newbie", but if you insist. ;)

geoff4787 09-19-2005 03:32 AM

Where do I upload "products"? I have no product manager in my admin panel and I am running the latest version of VB.

Boofo 09-19-2005 05:37 AM

Before anyone jumps in here, I have talked to this gentlemen in another thread and explained the differences between 3.0 and 3.5. 'Nuff said. ;)

GoNz00 09-19-2005 06:40 AM

was hoping this worked on rc2 :( oh well.

geoff4787 09-19-2005 06:40 AM

edit...nevermind.

trancetopia 09-19-2005 08:57 AM

I've installed this product but the "new post" bit has not appeared

Using RC3.

Any ideas why this wont work?

Thanks,
Paul

GrendelKhan{TSU 09-19-2005 09:58 AM

works great thx!
(RC2)

<< clicks install

dookie 09-19-2005 10:34 AM

Works on RC3 *install*

GoNz00 09-19-2005 10:44 AM

i installed on rc2 to but didnt get the new posts count

Paul M 09-19-2005 12:04 PM

trancetopia & GoNz00 (and anyone else).

It will work on any 3.5 version, however, did you read all the smallprint ?

1. Are you using a custom style (specifically the navbar template) ?

2. Are you using the database based thread marking system - if not then it won't work.

trancetopia 09-19-2005 12:09 PM

Quote:

Originally Posted by Paul M
trancetopia & GoNz00 (and anyone else).

It will work on any 3.5 version, however, did you read all the smallprint ?

1. Are you using a custom style (specifically the navbar template) ?

2. Are you using the database based thread marking system - if not then it won't work.

Hi Paul, thanks for getting back.

Ahhhh, i'm not using the databased thread marking system so there is my problem. Going to switch it over and give it a try.

Many thanks.

trancetopia 09-19-2005 12:12 PM

Sweet it's working now. Great mod.

GoNz00 09-19-2005 12:12 PM

Quote:

Originally Posted by Paul M
trancetopia & GoNz00 (and anyone else).

It will work on any 3.5 version, however, did you read all the smallprint ?

1. Are you using a custom style (specifically the navbar template) ?

2. Are you using the database based thread marking system - if not then it won't work.

thanks it works now :)

for those wondering where to look

admin cp / vBulletin Options > General Settings > Thread/Forum Read Marking Type > set to database

Paul M 09-19-2005 02:47 PM

I've highlighted the requirement in bold to make it slightly more obvious.

JJR512 09-19-2005 03:06 PM

This hack adds a line under the "Welcome, user" line in the right edge of the navbar. This might not be noticed by some people, especially those already used to using the "New Posts" link (between Calendar and Search). I'm thinking this might be better if, instead of the new line, if the existing "New Posts" link was changed to either say, "X New Posts" (X is the number), or "No New Posts". What do you think?

Paul M 09-19-2005 03:13 PM

I'm happy with the link where it is (as this is how we do it on our forum) so thanks for the idea, but I don't intend to change it. :) You are of course free to alter it as you want if you plan to use it on your own forum, however, I can only support it as supplied. :)

utw-Mephisto 09-19-2005 04:42 PM

Everybody has allways "1 unread post" and when clicking it it say "no unread posts" ;(

Huijting 09-19-2005 05:41 PM

:squareeyed: Got it working now :squareeyed:

But :rolleyes: :-) is there a cmps version.

In my forum it's working great but on my homepage it isn't redirected to my vbul folder.

Thnx in advance,

Rob

Paul M 09-19-2005 10:12 PM

Quote:

Originally Posted by utw-Mephisto
Everybody has allways "1 unread post" and when clicking it it say "no unread posts" ;(

Do you have a forum where "Index New Posts in Search Engine" is set to 'no' ? - this would be my guess as 3.5 currently excludes these from a GetNew display.

(I reported this as a bug and it's fixed in the next version - RC4 ?).

Paul M 09-19-2005 10:17 PM

Quote:

Originally Posted by Huijting
:squareeyed: Got it working now :squareeyed:

But :rolleyes: :-) is there a cmps version.

In my forum it's working great but on my homepage it isn't redirected to my vbul folder.

Thnx in advance,

Rob

Sorry - I don't have or use cmps.

utw-Mephisto 09-19-2005 10:24 PM

Quote:

Originally Posted by Paul M
Do you have a forum where "Index New Posts in Search Engine" is set to 'no' ? - this would be my guess as 3.5 currently excludes these from a GetNew display.

(I reported this as a bug and it's fixed in the next version - RC4 ?).

I found it .. I have a hidden (Archive) forum .. there was one post in there :)

Boofo 09-20-2005 12:38 AM

Quote:

Originally Posted by Paul M
Do you have a forum where "Index New Posts in Search Engine" is set to 'no' ? - this would be my guess as 3.5 currently excludes these from a GetNew display.

(I reported this as a bug and it's fixed in the next version - RC4 ?).

How can that be a bug? That would make sense on how it should work.

Paul M 09-20-2005 01:21 AM

Quote:

Originally Posted by Boofo
How can that be a bug? That would make sense on how it should work.

Not really - excluding posts from the search index is to stop people searching for them with a text search - it has nothing to do GetNew (or GetDaily) which are for finding all the new posts since your visit (or today).

Huijting 09-20-2005 06:48 AM

Quote:

Originally Posted by Paul M
Sorry - I don't have or use cmps.

Fixed it , hope U don't mind , made a minor change :

Changed
<a href='search.php?do=getnew'>
to
<a href='http://www.huijting.nl/vbul/search.php?do=getnew'>

Rob

Paul M 10-03-2005 10:52 PM

Quote:

Originally Posted by Huijting
Fixed it , hope U don't mind , made a minor change

Nope, I don't mind, you can change it as you see fit on your forum. :)

TygerTyger 10-04-2005 10:54 AM

Works very well except it counts my own post as an unread post, and it's quite annoying. By this I mean I make a post and the unread count goes up to 1, I click on unread posts and it goes back to zero. Is there any way to stop this?

Using it on 3.5 Gold.

Paul M 10-04-2005 01:06 PM

Quote:

Originally Posted by TygerTyger
Works very well except it counts my own post as an unread post, and it's quite annoying. By this I mean I make a post and the unread count goes up to 1, I click on unread posts and it goes back to zero. Is there any way to stop this?

It's a feature of the way vB and the database marking system works atm - basically when you create a new thread/post it is initially considered to be unread, even by you. Therefore when you are taken back to the thread display, the post is counted as unread, of course it then becomes marked as read (by yourself) so the display will update when you click on unread posts.

thc34 10-04-2005 04:14 PM

thank

TygerTyger 10-05-2005 10:27 AM

Quote:

Originally Posted by Paul M
It's a feature of the way vB and the database marking system works atm - basically when you create a new thread/post it is initially considered to be unread, even by you. Therefore when you are taken back to the thread display, the post is counted as unread, of course it then becomes marked as read (by yourself) so the display will update when you click on unread posts.

Interesting. I guess there's not really much motivation for the vB guys to fix that as it's only really a problem for mods, so is there any chance of a workaround/fix?

Paul M 10-05-2005 05:02 PM

Quote:

Originally Posted by TygerTyger
Interesting. I guess there's not really much motivation for the vB guys to fix that as it's only really a problem for mods, so is there any chance of a workaround/fix?

I reported it as a bug and Jelsoft have fixed it for new threads [in the next release] but they won't do it for posts, as there could be other unread posts in between you viewing a thread and replying (I'm still not entirely sure why this would be a problem).

I suppose it would be possible to add some plugin code to mark them as read as part of this hack, and i'll look at it sometime in the future, but it's not a big priority for me atm.

TygerTyger 10-05-2005 05:05 PM

Np, thanks for taking the time. Don't quite understand the distinction either, there could just as easily be a new thread as a new post in that time.

shungo 10-06-2005 07:36 AM

weird, but after installing it on gold version, i dont see options in user CP :o

Paul M 10-06-2005 07:48 AM

Um, there are no options to see in usercp, what are you expecting ?

shungo 10-07-2005 09:53 AM

Sorry, i confused between acp and usercp when reading above :D

shungo 10-07-2005 09:57 AM

BTW, it's no possible to have phrase like these: xxx posts since your last visit (date time) ?


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

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.01343 seconds
  • Memory Usage 1,819KB
  • 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
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete