Quote:
Originally Posted by Lynne
I tried all sorts of things to get that to work. Problem is, stuff gets set and then the search.php page comes back with a searchid and it wipes out anything I 'set' in the plugins. I think you may need to actually hard code something.
|
I was afraid we would get to the code tampering thing

...
I'll get deeper into search.php now to see how I could around this.
Thanks for your time Lynne!
--------------- Added [DATE]1364233874[/DATE] at [TIME]1364233874[/TIME] ---------------
Well, I checked the hooks in search.php and concluded to the following workaround that seems to work...
I created a plugin on the hook
search_getnew_complete with the following code:
PHP Code:
if ($vbulletin->GPC['include'])
{
$vbulletin->url = $vbulletin->url . '&customsearch=1';
}
What this actually does is appending a GET variable to the results URL, after the searchid.
Then, I used another plugin on hook
set_navigation_tab_main to activate the tab I wanted.
PHP Code:
if (isset($_GET['customsearch']) && $_GET['customsearch'] == '1')
{
$root = 'my_custom_tab_id';
}
It might not be a very elegant solution, but does the trick.
Once again a thanks to Lynne for the time devoted on this...
--------------- Added [DATE]1364241631[/DATE] at [TIME]1364241631[/TIME] ---------------
I noticed that if there are no results, the tab gets back to "What's new", so I modified a little the plugins.
Now they look like:
hook
search_getnew_complete:
PHP Code:
if ($vbulletin->GPC['include'])
{
$vbulletin->url = $vbulletin->url . '&include=0';
}
hook
set_navigation_tab_main:
PHP Code:
if (isset($_GET['include']))
{
$root = 'my_custom_tab_id';
}