We are using the built in movable type search for our site but we only want people to be able to search for 2 weeks worth of entries. After that we have a paid system that we want them to use. Right now I can not find a way to limit search resluts by date. Does anyone know if this is possible? I can limit the number of results that show up on a page but not by date and the pagination kicks in and displays all the results.
I know that we could go thru and remove all entries older than 2 weeks but I really am hoping that that would not be necessary. If anyone has any ideas on how to acomplish this if it is possible please let me know.
Thank You.
Reported on Movable Type 4.3
I think the SearchCutoff config directive will limit it by date:
http://www.movabletype.org/documentation/appendices/config-directives/searchcutoff.html
Is that put into the search form as an invisible file or on the search results page? It does not specify on those directions?
It would be placed within Movable Type's core configuration file mt-config.cgi.
i added that to the mt core config file but it did not limit the search results. Does it need a reboot? or am i just missing something. I opend that file added that text and saved.
You have to add that configuration directive to your mt-config.cgi file, save and then upload it back to the server in ASCII mode.
If your movable type installation is running in FastCGI you would also need to restart Apache.
The right directive for searching entries published during the latest 20 days is:
SearchCutoff 7
I have tried all the suggestions listed here and it seems like it should work but it still gives results listing back to the beginning of the blog. It should work but doesn't.
That's very strange!
Send me the following via email:
1) a copy of mt-config.cgi;
2) your search results system template;
3) any module it may include.
Cheers,
Mihai
I have been on vacation not thinking about the site while i was skiing but by any chance were you able to reproduce this situation? It really looks like everything is set up correctly in the configuration but it will not limit the search results to 14 days.
You may like to send me what I've asked above if you didn't sort out the problem.