Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Posts Last X Hours Details »»
Posts Last X Hours
Version: 1.1, by Dismounted Dismounted is offline
Developer Last Online: Apr 2023 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.6.x Rating:
Released: 01-04-2007 Last Update: 09-18-2007 Installs: 36
Uses Plugins Template Edits
 
No support by the author.

Posts Last X Hours

Description:
This mod shows the number of posts created in the last X hours. 'X' is user-specified in the options.

Request Thread:
https://vborg.vbsupport.ru/showthread.php?t=135557

Installation:
All the installation information is in the package.

Changes:
1 Template Edit
1 Plugin
6 Phrases

Change Log:
19/09/2007 - Version 1.1
- Automatic Template Edits
- Updated ReadMe

5/01/2007 - Version 1.0
- Initial Release

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 01-10-2007, 12:06 PM
red-dna red-dna is offline
 
Join Date: Mar 2006
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed.

One question, is it possible to have it in another page e.g. online.php ?
Reply With Quote
  #13  
Old 01-11-2007, 03:47 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, just do the following.

1) Change the location of the plugin 'Get Info' to global_start.
2) Add the following code where you want it displayed.
Code:
<!-- Start Posts Last X Hours Hack -->
<if condition="$vboptions['posts_last_x_hours_enabled'] == 1">
<div>
$posts_last_x_hours
</div>
</if>
<!-- End Posts Last X Hours Hack -->
Done!
Reply With Quote
  #14  
Old 01-12-2007, 01:47 AM
jarosciak jarosciak is offline
 
Join Date: Apr 2005
Location: Toronto
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I changed it just a little bit on my forum, so it shows something like this:

There have been x posts in the last 24 hours, which resolves in estimated average of x posts/month or x posts/year.

Check it out live at: www.goldenretrieverforum.com, at the bottom of the front page.

All I added was this line to xml, right above where it say: $posts_last_x_hours = construct_phrase....:

PHP Code:
    $in_one_month $posts_last_x_hours 30;
    
$in_one_year $posts_last_x_hours 365
and changed the line below to:

PHP Code:
    $posts_last_x_hours construct_phrase($vbphrase['posts_last_x_hours'], $posts_last_x_hours$vbulletin->options['posts_last_x_hours_numhours'], $in_one_month$in_one_year); 
And then on a display line, again in the same product xml I changed it to:

PHP Code:
<phrase name="posts_last_x_hours" date="0" username="" version=""><![CDATA[There have been {1posts in the last {2hourswhich resolves in estimated average of {3posts/month or {4posts/year.]]></phrase
This change will only work assuming you will always use 24 hour config setting.
Joe
Reply With Quote
  #15  
Old 09-19-2007, 06:40 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hack Updated!

19/09/2007 - Version 1.1
- Automatic Template Edits
- Updated ReadMe
Reply With Quote
  #16  
Old 09-13-2008, 12:54 AM
glorify's Avatar
glorify glorify is offline
 
Join Date: Aug 2004
Posts: 376
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works in 3.7
Reply With Quote
  #17  
Old 02-16-2009, 10:30 AM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for a great hack Dismounted!

Could you please tell me how I could position this in another place ie. the template code edit? I'd prefer not to have it done automatically as our forum stats are custom-made to appear in the header instead with the template we are using.

Cheers in advance
Reply With Quote
  #18  
Old 02-17-2009, 05:23 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will need to change the plugin to run at global_start, and then place this into your header template:
Code:
<phrase 1="$posts_last_x_hours" 2="$vboptions[posts_last_x_hours_numhours]">$vbphrase[posts_last_x_hours]</phrase>
Reply With Quote
  #19  
Old 05-19-2010, 04:25 PM
ericgray ericgray is offline
 
Join Date: Aug 2006
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please invent for 4.0.3!!!
Reply With Quote
  #20  
Old 08-21-2010, 01:43 AM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgray View Post
please invent for 4.0.3!!!
+1... for all versions of 4.0
Reply With Quote
  #21  
Old 09-30-2011, 11:44 PM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BUMP! Still waiting for a re-release for 4.0+
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 07:12 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.10373 seconds
  • Memory Usage 2,315KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_code
  • (3)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
  • (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