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
  #2  
Old 06-11-2004, 10:54 AM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Funnily enough, just made the same modification myself because it didn't have that info and didn't want the welcome panel hack. I'm sure others would find it useful. Good job.
Reply With Quote
  #3  
Old 06-11-2004, 12:39 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You notice that this will add two extra queries on every single page?
Reply With Quote
  #4  
Old 06-11-2004, 01:24 PM
reteep reteep is offline
 
Join Date: Mar 2004
Location: Germany
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep and those 2 more queries hurt. If you got a populated forum this hack will lag it to death.

Nice idea but it results into a too heavy load :/
Reply With Quote
  #5  
Old 06-11-2004, 01:43 PM
gamesxposed gamesxposed is offline
 
Join Date: Mar 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I get some time I'll move the second query.

EDIT - I just moved the index query to index.php, so now there is only one global query added, I'll try get rid of the index.php query tomorrow after some sleep.

Nite' people! :squareeyed:
Reply With Quote
  #6  
Old 06-12-2004, 08:24 PM
GamerJunk.net's Avatar
GamerJunk.net GamerJunk.net is offline
 
Join Date: Jan 2004
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work!
Reply With Quote
  #7  
Old 06-18-2004, 03:31 AM
gamesxposed gamesxposed is offline
 
Join Date: Mar 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man.
Reply With Quote
  #8  
Old 07-22-2004, 03:20 PM
aHMET aHMET is offline
 
Join Date: Mar 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any other version?
Reply With Quote
  #9  
Old 08-13-2004, 12:15 AM
Symbian.info Symbian.info is offline
 
Join Date: Nov 2001
Location: Netherlands
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Only use the new threads function and thats works great
Reply With Quote
  #10  
Old 08-24-2004, 06:48 PM
Ian Emu-UK Ian Emu-UK is offline
 
Join Date: Jul 2002
Location: UK
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack, is there a way to exclude private forums from the search?

Or better still, base them on each users priviledges (Probably server intensive and not worth the bother )

Thanks for the hack anyway.
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 05:48 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.04456 seconds
  • Memory Usage 2,312KB
  • Queries Executed 23 (?)
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)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
  • (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