Firefox PHP

search URL

Posted by fmon 
search URL
August 08, 2007 01:17AM
I noticed while working on the blog template that when I search I am returned to the emerald template (set as default) for the message and then results. Investigating I find the url does not have the forum_id in it, even though the phourm_get_url function seems to be set up to put it there.

I see: (content 2 is the phorum dir)
..../content2/search.php?search=post,author=,page=1,match_type=ALL,match_dates=365,match_forum=ALL,match_threads=1

Then for the redirect:
..../content2/search.php?0,search=post,author=,page=1,match_type=ALL,match_dates=365,match_forum=ALL,match_threads=1

This happens in the emerald template also, but you would not notice anything wrong.

Look further in search.php the value in $search_url is what is shown above for the redirect. shouldn't the 0 be a forum id if your are searching from a place other than the index?



Edited 1 time(s). Last edit at 08/08/2007 01:26AM by fmon.
Re: search URL
August 08, 2007 07:23AM
Yes, that looks wrong.
Heading to work now.
There I will look into it.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: search URL
August 09, 2007 05:05AM
Adding this to the header search form solves the problem:


<input type="hidden" name="forum_id" value="{FORUM_ID}" />

Should that also be added to the form in search.tpl or should it be passed in {POST_VARS} by changing search.php?



Edited 1 time(s). Last edit at 08/09/2007 05:11AM by fmon.
Re: search URL
August 09, 2007 09:01AM
common.php adds the forum_id to {POST_VARS}, but a missing dot in search.php cancelled that. Also, the search form in the page header didn't use {POST_VARS}. This was fixed in changeset 2359. Please try if those changes make it work for you.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: search URL
August 10, 2007 03:49AM
They work.
Thanks
Sorry, only registered users may post in this forum.

Click here to login