Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New Posts & Threads x2 Details »»
New Posts & Threads x2
Version: 1.00, by gamesxposed gamesxposed is offline
Developer Last Online: Mar 2011 Show Printable Version Email this Page

Version: 3.0.1 Rating:
Released: 06-10-2004 Last Update: Never Installs: 5
 
No support by the author.

All this does is simply retrieve the amount of new posts, so I made it add the count in Navbar, and in Statistics down the bottom.

In the navbar it is global, you can see it next to "New Posts". I also made it so if there is more then one post it add's the "S" at the end, note the "[snos]". It is also found down the bottom of your page in "Statistics". Hope you like it. There is also a "New threads" feature in the statistics part, where it shows new threads.

Index.php
find:
PHP Code:
// ### BOARD STATISTICS ################################################# 
After add:
PHP Code:
//
//START NEW THREADS AND POSTS
//
$newthreads $DB_site->query_first("SELECT count(*) AS count FROM " TABLE_PREFIX "thread WHERE lastpost > 

'
$bbuserinfo[lastvisit]'");


if (
$newthreads[count] == 1)
{
    
$newthreads[snos] = "";
}
else
{
    
$newthreads[snos] = "s";
}
//
//END NEW THREADS AND POSTS
// 
Style manager >> Your style >> PHP include templates >> phpinclude_start

Add:
PHP Code:
$newposts $DB_site->query_first("SELECT count(*) AS count FROM " TABLE_PREFIX "post WHERE dateline > '$bbuserinfo[lastvisit]'"); 

if (
$newposts[count] == 1

    
$newposts[snos] = ""

else 

    
$newposts[snos] = "s"

Style manager >> Your style >> Navigation / Breadcrumb Templates > navbar

Find:
PHP Code:
<a href="search.php?$session[sessionurl]do=getnew">$vbphrase[new_posts_nav]</a
Replace with:
PHP Code:
<a href="search.php?$session[sessionurl]do=getnew">$vbphrase[new_posts_nav] ($newposts[count])</a
Style manager >> Your style >> Forum home templates > FORUMHOME

Find:
PHP Code:
<div>$vbphrase[threads]: $totalthreads$vbphrase[posts]: $totalposts$vbphrase[members]: $numbermembers</div>
            <
div><phrase 1="member.php?$session[sessionurl]u=$newuserid2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div
After add:
PHP Code:
<a href="search.php?$session[sessionurl]do=getnew">$newposts[count]</a> New post$newposts[snoswithin <a href="search.php?$session[sessionurl]do=getnew">$newthreads[count]</athread$newthreads[snossince you last visited
Should be all working, any questions feel free to ask. I will provide support, also any bugs found, or any ideas for improvment please don't hesitate to share your comment.

Statistics screenshot: http://64.5.56.7/images/stats.jpg
Navbar screenshot: http://64.5.56.7/images/navbar.jpg

Enjoy!

Update 12:53 AM EST. - Moved uneeded global query to index.php.

Show Your Support

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

Comments
  #12  
Old 05-06-2005, 10:22 AM
Ian Cunningham Ian Cunningham is offline
 
Join Date: Feb 2002
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to implement this on a big board? i.e 1Mil+ posts?

I tried it and it REALLY slowed things down :ermm:
Reply With Quote
  #13  
Old 05-07-2005, 04:21 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

You could try adding an Index to the two fields it uses.
Reply With Quote
  #14  
Old 05-07-2005, 12:46 PM
Ian Cunningham Ian Cunningham is offline
 
Join Date: Feb 2002
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
You could try adding an Index to the two fields it uses.
You'll have to excuse my newbie ignorance... how would I do that?
Reply With Quote
  #15  
Old 12-15-2006, 11:18 PM
cyberphr's Avatar
cyberphr cyberphr is offline
 
Join Date: Jul 2006
Location: Hell
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack, and coincidentally I am a GX member!
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:30 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.04013 seconds
  • Memory Usage 2,265KB
  • Queries Executed 19 (?)
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
  • (7)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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