Sort topics by half day

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
teebling
Registered User
Posts: 113
Joined: Sat Apr 14, 2018 7:38 pm
Contact:

Sort topics by half day

Post by teebling »

By visiting this url" /viewforum.php?f=1?&st=1 I can load a forum that shows only topics in the last day.

How can I do the same but only for the last 12 hours? I've tried /viewforum.php?f=1?&st=0.5 but of course it doesn't work.

Where in the core files can I edit what the '1' integer stands for in time? I could very easily just change that to 12 hours rather than 24 hours, correct?
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Sort topics by half day

Post by 3Di »

Search for // Limit topics to certain time frame, obtain correct topic count in viewforum.php
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
teebling
Registered User
Posts: 113
Joined: Sat Apr 14, 2018 7:38 pm
Contact:

Re: Sort topics by half day

Post by teebling »

3Di wrote: Sat Sep 25, 2021 6:06 pm Search for // Limit topics to certain time frame, obtain correct topic count in viewforum.php
In viewforum.php I changed $min_post_time = time() - ($sort_days * 86400); to $min_post_time = time() - ($sort_days * 21600); - now when visiting the URL it displays topics from the last 6 hours, hooray! :D

Thank you for the clue.
Post Reply

Return to “phpBB Custom Coding”