PDA

View Full Version : Search For All Posts From The Last X Days


MW[MWGN]
03-21-2002, 02:36 PM
]I am not sure if there's a hack which does that, but I did a brief look over the forums and don't seem to see any hack which does this... but if this hack already exists, moderators, please delete this thread :)

What is it?
It adds a search field into your forum homepage (or anywhere else) where you can input a number, which is the number of days, then the results will show all the posts from that number of days.

Notes
It uses the "getdaily" action in search.php, so the normal one would not work anymore (the normal one just search for all the posts today). If you want to place the search field on somewhere else other than in the forum homepage, then put the code at the bottom of this readme to wherever you want, e.g. into the "forumdisplay" template.

Screenshot...

Next post is the installation :)

MW[MWGN]
03-21-2002, 02:37 PM
]And the installation...

By the way, if you want to see a demo, just go to www.mwgaming.net and it's at the top of the page :)

Admin
03-21-2002, 02:40 PM
If you just use name="days" in the form in the template, there's no hacking needed.

MW[MWGN]
03-21-2002, 02:44 PM
]Oh I didnt know that :o

indiamike
04-08-2002, 08:33 PM
If anyone is interested in this, not sure...but I took this hack and created a whole separate page for it. The reason was I didn't want to lose the "get daily" feature. So I made a page going off from my search page that will enable the user to use this hack.

It's real rough looking and I haven't finished all of it yet (missing navbits) but if anyone is interested take a look at my search page on my site and click on Day Search which will bring up this option.

Here is the Link Day Search (http://www.indiamike.com/india/search.php?s=)


By doing it this way I kept my regular search, my get daily search, and now have the ability to search by xx number of days. It works really sweet and I have wanted to add this for a long time.

If anyone is interested in how I did this please post here and I will write out the instructions.


Mike

Blue91
04-25-2002, 10:03 PM
I followed the directions, and while it shows up on the main page, the actual search doesn't work. Gives me a HTTP 404.

Any ideas why?

Regards,

Fred

brauner
08-04-2002, 11:51 PM
Bekomme den selben Fehler angezeigt.

BrAinZ
08-26-2002, 06:22 PM
Could this not be ammended to give an option to search for all posts since the last day the user logged in?

BrAinZ
10-15-2002, 06:05 PM
From this it looks like it would be easy to add separate links to select how many days posts you would like to see, (in a menu sort of system).

Like...:

Clicke HERE for TODAYS posts.
Click HERE for posts in the last 24 Hours
Click HERE for posts in the last 7 days
etc.

What would be the correct format to create these links?

CityHunter
10-29-2002, 03:38 PM
Originally posted by Blue91
I followed the directions, and while it shows up on the main page, the actual search doesn't work. Gives me a HTTP 404.

Any ideas why?

Yes, take this line:
<form action="../search.php" method="get" name="name">

and change it to this line:
<form action="search.php" method="get" name="name">

Intex
07-13-2003, 05:49 PM
This doesn't appear to work. It give me more search results than the day range specificed.

Blue91
10-01-2003, 12:24 AM
works perfect for me

dsmcd01
10-17-2003, 10:21 PM
Thanks for the hack. I like it. My users like it.

Life is good. :squareeyed:

D.

Bulent Tekcan
11-15-2003, 10:07 PM
Hello

Is it possible 15min,30min,1hour,2hour,4hour.......

Thanks