PDA

View Full Version : [How to] Change the time period for Visiting Members


djbaxter
07-23-2012, 12:40 AM
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