![]() |
Search By Day Instead of From Day
Search By Day Instead of From Day
By: Ming Keong Inspiration: https://vborg.vbsupport.ru/showthread.php?t=64172 Estimated Installation Time: 1-5 mins File changes: 1 PHP History 31May04:Initial creation 01Jun04:Added option to retain original getdaily functionality by using getdailyfrom instead Comments I'm not sure how many of you will find this useful, but I'll just post it anyway so that it'll benefit anyone who wants it. It's a simple hack that will probably be useful for people who run news sites. Description Converts 'getdaily' searches to retrieve posts for the particular day, instead of from the particular day. getdaily -> Gets all posts X days ago getdailyfrom -> Gets all posts from X days ago till now Example Usage http://www.pdatrends.com/search.php?...ys=1&forumid=6 -> Get News 1 Day Ago http://www.pdatrends.com/search.php?...ys=3&forumid=6 -> Get News 3 Days Ago http://www.pdatrends.com/search.php?...ys=1&forumid=6 -> Get News From 1 Day Ago Till Now http://www.pdatrends.com/search.php?...ys=3&forumid=6 -> Get News From 3 Days Ago Till Now Code Modifications In search.php: Find: PHP Code:
PHP Code:
Optional, if you want to retain the previous getdaily functionality: Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Known Limitations - Retrieves x days ago relative to current time. Eg, it cannot retrieve posts for 28 May 2004. If the current time is 12pm on 29 May 2004, retrieving 1 day ago will search for all posts from 28 May 2004 12pm till 29 May 2004 12pm. |
Can you please put this in a text file for those who want to download the hack and keep a backup of it also? Thank you. ;)
And I guess I'm still not exactly clear on what this does. Does it get the posts from 3 days ago and only for that day? |
Quote:
2 days ago from today would only get those posts not all posts from two days ago up until today so it limits posts to particular days instead of the usual way all posts from 2 days ago till today i guess its better filtering and in depth searching the option to have both types is more appealing |
msimplay is correct with regards to the usage.
I've added a txt attachment and the option to retain the getdaily functionality by using getdailyfrom. :) |
All times are GMT. The time now is 03:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|