Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google site search should be configurable #235

Closed
cboulanger opened this issue Jun 18, 2015 · 6 comments
Closed

Google site search should be configurable #235

cboulanger opened this issue Jun 18, 2015 · 6 comments

Comments

@cboulanger
Copy link

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.

@Zegnat
Copy link

Zegnat commented Jun 19, 2015

Everyone agrees: #188

@cboulanger
Copy link
Author

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.

@Zegnat
Copy link

Zegnat commented Jun 19, 2015

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.

@Kroc
Copy link
Owner

Kroc commented Jun 19, 2015

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.

@Zegnat
Copy link

Zegnat commented Jun 20, 2015

@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.

@cboulanger
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants