Closed cboulanger closed 9 years ago
Everyone agrees: #188
Hi, seems to me that #188 ist about a different search engine. This issue deals with the domain for which the search should be done, since currently, it is hardcoded to
<input type="hidden" name="as_sitesearch" value="forum.camendesign.com">
In my case, I solved the problem by adding
document.getElementById ("search").as_sitesearch.value = window.location.host;
to each template page. But maybe it makes sense to be able to set specific values, i.e., if the search should include the main domain and not just the specific virtual host.
Ah, sorry @cboulanger, I misread it! I thought this was already fixed in code. I’ll give it a look if I can find the time. @Kroc is pretty busy.
Actually, NNF should be changing that sitesearch to the user's domain name -- if it isn't, then that's a bug too.
Yes, I'm super-super busy. My son doesn't sleep well at night and I have to juggle that with work.
@cboulanger do you get any PHP errors? The as_sitesearch
value is definitely supposed to be changed by the forum system in theme.php:
//set the forum URL for Google search-by-site
'//input[@name="as_sitesearch"]/@value' => $_SERVER['HTTP_HOST'],
This code means that, yes, it is hardcoded in the theme’s HTML files, but when pages are rendered it should be swapped out by your current domain.
Ok, sorry, I missed that! I have to see why I thought that it didn't work. Will reopen the issue if there is a problem.
The target for the google site search is hardcoded to your own server. It would be great if the target was configurable by a defining a constant.