PDA

View Full Version : Search (without user or words)


sv1cec
11-18-2004, 10:00 PM
Being the admin of my forums, I always try to check all new threads (or at least I want to). Some times, I go to the site and forget to check the "New threads". Spend some time there, then either leave the computer and do other chores or whatever. When I go back a couple of hours later, there are no new threads to see.

vBulletin's search has an option, which would allow you to see all threads since various periods of time (like: since yesterday, since one week ago etc.), BUT it does not work on its own. It has to be combined with a user name or a word for which to search. If you try to just define that you want the threads since yesterday, you get an error message.

So, today I decided it was time to do something about it. After searching the code a bit, I figure it out. So, if you too want to be able to see all posts since 2 weeks ago (or whatever is allowed there), do the following:

Edit file search.php and find:


if (empty($query) AND empty($searchuser) AND empty($replyless))


Replace that with:


if (empty($query) AND empty($searchuser) AND empty($replyless) AND empty($searchdate))


Voila, search with only the dates you are interested in.

Rgds
-------------
John

HarryBO
11-19-2004, 02:37 PM
I have make the Changes, but I see no Modifikation!

Can you post a screenshot before and after installing?

Red Blaze
11-19-2004, 02:55 PM
It doesn't change anything. When you do a search for date, you use to get an error message.

Once with this minor addition installed, you can search for dates as well, right?

Andreas
11-19-2004, 02:55 PM
You won't see any visual differences.
Go to the search form, select only a time period and hit search.
Now try this with and without this hack installed.

Btw: One could also use search.php?do=getdaily&days=x to get posts since the last x days

HarryBO
11-19-2004, 03:26 PM
Ah thx! Now I´ve checked this little "Add On"

sv1cec
11-19-2004, 03:47 PM
That's correct, you would not see any changes, it just allows you to search with the period only, without having to enter a word or a user name.

That's all it does, but for me, it was very useful, so I thought I would release it here.

Rgds

alkatraz
11-19-2004, 07:36 PM
great idea, its always a pain when you have 2 seconds to check your site, dont have enough time to read every post, and then basicaly lose track of all those posts!

dndog
11-19-2004, 07:50 PM
Btw: One could also use search.php?do=getdaily&days=x to get posts since the last x days

You beat me to sayin it.

-dndog

ecarabin
11-19-2004, 08:32 PM
Small change, but really useful.

Thanx !!

kall
11-20-2004, 04:50 AM
It's actually been in Beta Releases for aaages.

https://vborg.vbsupport.ru/showthread.php?t=64172&highlight=search+date

Wonder why the original author didn't release it.

sv1cec
11-20-2004, 06:31 AM
It's actually been in Beta Releases for aaages.

https://vborg.vbsupport.ru/showthread.php?t=64172&highlight=search+date

Wonder why the original author didn't release it.
Oh, sorry, I didn't catch any beta releases, I arrived in this thing (vBulletin), in 3.01 and this thing had bothered me ever since.

I guess the above thread, makes mine obsolete. Admins please delete, I tried but can't delete it myself.

Sorry guys, I did search but didn't find that one.

Rgds

rainyleaves
11-27-2004, 08:32 AM
Cooooool~ Thanks..sv1cec !!

sv1cec
11-27-2004, 08:39 AM
Cooooool~ Thanks..sv1cec !!
Most welcome!

Reece D
03-01-2005, 10:01 AM
*installed* works great cheers

YLP1
03-08-2005, 04:19 AM
Excellent! Works on ver 3.0.7