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

Reply
 
Thread Tools
X newposts in Y threads Details »»
X newposts in Y threads
Version: 2.00, by Mr Blunt Mr Blunt is offline
Developer Last Online: Sep 2006 Show Printable Version Email this Page

Version: 3.5.0 Beta 3 Rating:
Released: 06-29-2005 Last Update: Never Installs: 12
Uses Plugins Template Edits
 
No support by the author.

##############################################
##############################################

THIS HACK CHANGED TOO MUCH!!
IT'S NO LONGER A PLUGIN!!
New Thread ... New File!!
Old removed to help eliminate confusion!!
Please visit the new thread!!!


https://vborg.vbsupport.ru/showthread.php?t=95264

I'll leave this old post and thread here for reference purposes.

##############################################
##############################################

I'm sure this is worked to death already, but I make mine a little differently. It grabs the new posts (via dateline time) but it grabs the threads (via lastpost time). This makes it slightly more intuative as it will show the number of posts found in "X threads" instead of "X newthreads".


Ohhh, and this one doesn't use a phrase.
So if you don't like english I guess you shouldn't use this.


Contents:
One plugin to upload (runs two queries in global).
One line of code to add to navbar template.

The line of code and instructions are in the included readme file.


updated to v2 already
----------------------------
Now uses Link14716's single query, but I added a conditional to set 0 if no new posts.

Also added screenshot

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 06-30-2005, 07:18 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you only want the amount of new posts and the amount of threads those posts where in, it can be done with only one query.
Reply With Quote
  #3  
Old 06-30-2005, 07:20 AM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bring it on bro!!
I'm all ears!!
I love constructive critisism and/or being taught!!
That's how amateurs like me learn best...
Reply With Quote
  #4  
Old 06-30-2005, 07:28 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me see if I can get this right on my first try.
PHP Code:
$getnewposts $db->query_read("SELECT COUNT(*) AS posts, threadid
                                FROM " 
TABLE_PREFIX "post
                                WHERE visible = 1 AND dateline >= '
{$vbulletin->userinfo['lastvisit']}'
                                GROUP BY threadid"
);
while (
$getnewpost $db->fetch_array($getnewposts)) {
    
$newposts += $getnewpost['posts'];
    
$newthreads++;

Reply With Quote
  #5  
Old 06-30-2005, 08:47 AM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rock on .... file is updated.

I noticed no new posts reflected empty so I added a conditional to set as 0 if not set.
Thanks Link14716 .... I now see the light!!
Reply With Quote
  #6  
Old 06-30-2005, 08:52 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr Blunt
Rock on .... file is updated.

I noticed no new posts reflected empty so I added a conditional to set as 0 if not set.
Thanks Link14716 .... I now see the light!!
Ah, yeah, forgot to make them 0.
Reply With Quote
  #7  
Old 06-30-2005, 09:11 AM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Only thing it will screw up is like a vote in a poll.
Some boards set the admincp so new votes "up" the thread which adds to it's dateline.

But I like the one query better!!

Someday the vb staff should change that feature so a vote adds to the post count too (for boards that set that feature), but I suppose that gets complex as most boards ... even if they use the feature .... would still not want post counts to actually be raised by a vote.

Guess this is why I released what some would call a duplicate hack.
Fact is there's lots of strokes for different folks this is a very tweakable little area.
....So why not ... I said to myself.
Reply With Quote
  #8  
Old 06-30-2005, 01:24 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

an screen please
Reply With Quote
  #9  
Old 06-30-2005, 02:55 PM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There ya go Allan.
Screenshot posted.
Reply With Quote
  #10  
Old 07-06-2005, 07:23 AM
Azhrialilu's Avatar
Azhrialilu Azhrialilu is offline
 
Join Date: Aug 2003
Location: Stretton, Derbyshire
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works lovely
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 03: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.04624 seconds
  • Memory Usage 2,294KB
  • Queries Executed 24 (?)
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
  • (1)bbcode_php
  • (1)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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