vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   [How to] Change the time period for Visiting Members (https://vborg.vbsupport.ru/showthread.php?t=285850)

djbaxter 07-23-2012 12:40 AM

[How to] Change the time period for Visiting Members
 
Now that the "Total members that have visited the forum" listing on the forum home has become part of the core vBulletin files, what do I need to change to customize the time period for visiting members?

Currently, the only options are Today (since midnight) or Last 24 Hours.

I need a custom time period for a niche forum.

kh99 07-23-2012 06:35 AM

You could do it with plugins. If you look in forum.php around line 660 you can see where it sets $cutoff and $description based on the "last 24 hours/today" setting. For example you could set $cutoff to TIMENOW - (3600 * X) to get the last X hours.

djbaxter 05-12-2013 01:49 PM

Previously edited the core file. Now after the upgrade to 4.2.1 had to redo those edits of course.

I'm not sure how to construct a plugin that modifies the calculated value from the core file without having the core file calculation override mine.

What would it look like? What hook would I use?

Lynne 05-12-2013 03:59 PM

You could try the hook location forumhome_whovisited_prelist


All times are GMT. The time now is 04:36 AM.

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.01069 seconds
  • Memory Usage 1,704KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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