vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - Posts Last X Hours (https://vborg.vbsupport.ru/showthread.php?t=135609)

Dismounted 01-04-2007 10:00 PM

Posts Last X Hours
 
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

Dismounted 01-05-2007 08:42 AM

/me Reserves

buileminh 01-05-2007 10:25 AM

Nice! Thanks :)! I am the first, right?

Snake 01-05-2007 03:00 PM

Thanks for creating this hack. I was hoping if someone could make this. :)

Bounce 01-05-2007 06:27 PM

Nice one - Installed :cool:

Artificial_Alex 01-05-2007 08:11 PM

Thank you for fulfilling my request :P

lovelypk 01-06-2007 12:24 AM

thanks for this kool hack.

Devil Woman 01-06-2007 05:07 AM

Thanks for this, have been looking for something like this as it can determine how much your site is being used in a way I suppose.

Thanks again

BoYagoob 01-06-2007 04:23 PM

installed

AdamB 01-10-2007 04:11 AM

Works great, thank you!

red-dna 01-10-2007 12:06 PM

Installed.

One question, is it possible to have it in another page e.g. online.php ?

Dismounted 01-11-2007 03:47 AM

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! :)

jarosciak 01-12-2007 01:47 AM

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

Dismounted 09-19-2007 06:40 AM

Hack Updated!

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

glorify 09-13-2008 12:54 AM

Works in 3.7 :)

RedTrinity 02-16-2009 10:30 AM

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 :)

Dismounted 02-17-2009 05:23 AM

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>

ericgray 05-19-2010 04:25 PM

please invent for 4.0.3!!!

RedTrinity 08-21-2010 01:43 AM

Quote:

Originally Posted by ericgray (Post 2039962)
please invent for 4.0.3!!!

+1... for all versions of 4.0 :)

RedTrinity 09-30-2011 11:44 PM

BUMP! Still waiting for a re-release for 4.0+ :)


All times are GMT. The time now is 04:56 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.01264 seconds
  • Memory Usage 1,757KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete