[EMAIL PROTECTED] wrote:
On Thu, 10 Apr 2008, Rex C. Eastbourne wrote:

Rex C. Eastbourne wrote:
I like the idea of a search box. I created a Google custom search engine
 for different LyX websites, including *.lyx.org and the mailing lists
 here:

 http://www.google.com/coop/cse?cx=008972033992887248866%3Aoarvwprmgvo

We can embed this search box and even the search results on the LyX site
 with a small HTML/JS code snippet, but AFAIK those are not enabled.
 However, I think this would be useful.

Note: the search engine takes seconds to create, in case someone wants to
 create one of his own and tweak the settings.

 Rex

By the way, here is the code snippet to embed the search box:

Hi,

I tried embedding it here:

    http://www.lyx.org/test/wiki/index.php/Web/Test

unfortunately it doesn't seem to work... Do you know how this should work?

(I just embedded the code snippets you gave me without doing any thinking...)
/C

That's right; I forgot to specify the form action. Here's how to do it.

Paste this code in the page where we want the search box to appear. Note: change action="" to action="SomePage", where we want the results to appear.

<!-- Google CSE Search Box Begins  -->
<form action="" id="cse-search-box">
<input type="hidden" name="cx" value="008972033992887248866:oarvwprmgvo" />
 <input type="hidden" name="cof" value="FORID:11" />
 <input type="text" name="q" size="25" />
 <input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en";></script>
<!-- Google CSE Search Box Ends -->

Then paste the following code on http:// (the different page specified above), where we want the search results to appear.

<!-- Google Search Result Snippet Begins -->
<div id="cse-search-results"></div>
<script type="text/javascript">
 var googleSearchIframeName = "cse-search-results";
 var googleSearchFormName = "cse-search-box";
 var googleSearchFrameWidth = 600;
 var googleSearchDomain = "www.google.com";
 var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js";></script>

<!-- Google Search Result Snippet Ends -->


A bit more documentation can be found here: http://www.google.com/support/customsearch/bin/answer.py?hl=en&answer=71640

Rex

Reply via email to