Gossamer Forum
Home : Products : Links 2.0 : Customization :

allowing outside searsch box to have custumizable search results page...

Quote Reply
allowing outside searsch box to have custumizable search results page...
Hello everyone!

What I'd like to do is have it so a webmaster can place a search box to my search engine on his website with a

Code:
<input type=hidden name=sitename value=NAME-OF-WEBSITE>
<input type=hidden name=siteurl value=URL-OF-WEBSITE>

in the form field so when some performs a search on my search engine from his site, a custom search results page comes up with a return link to his site. So you could have

Code:
<br><font face=verdana size=2>Return to <a href="<%siteurl%>"><%sitename%></a></font>

on the search results page (note: I use templates). Better yet, you could have so a hidden form field is in the search box with an associate id, then when a search is perform, a totally customized search results page that have their site's layout with come up, you just create another template like search_results1026.html (the associate id being 1026). The associate id thing would only be for sites that partnered with you and they've given you the HTML for their layout. The first one would be for the common webmaster that wants to link to your search engine. How could I do this? This would be a great way to partner with sites! Thanks for your help and God bless!

------------------
Daniel

dan@christian-search.net
http://www.christian-search.net
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
you've pretty much got it down...

Wink just make a field that IS NOT = to "ID" or the search will search for the ID hehe..

make like UID.. and then you just load different templates... something like

Code:
if (($in{'uid'}) and (-e "admin/templates/search_results$in{'uid'}.html")) {
$template = "search_results$in{'uid'}.html";
}
else { $template = "search_results.html"; }

now you need some sort of login feature to edit the template..

jerry
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
This is a great idea . how about posting it in the resource center ?

Thanx,
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
Hello Jerry!

Thanks for the help, but I need some more :-)! Where would I place the code you put above? When I put that code in, where could I define the UID in search.cgi?UID=1026 for

Code:
<input type=hidden name=uid value=1026>

? What I plan to do it make a script where people can sign up, edit the header and footer of the search page, then put there custom search box on their website (I'm really liking this idea the more I think about it). Soooo, any help anyone can give me, ideas, possible ways to get this done, just e-mail to dan@christian-search.net . God bless!

------------------
Daniel

dan@christian-search.net
http://www.christian-search.net
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
you would put it as a hidden field in the person form...

jerry
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
the first one would go right before it loads the template.. you don't need to define in{'uid'}.. if there is one.. it will load the template.. if not.. it will do yours

jerry
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
Sorry, I mean what script does

Code:
if (($in{'uid'}) and (-e "admin/templates/search_results$in{'uid'}.html")) {
$template = "search_results$in{'uid'}.html";
}
else { $template = "search_results.html"; }

go in? And where can I define the variable of "uid" in the search.cgi script (if that's where it needs to be defined) so it can be called

Code:
http://www.mydomain.com/cgi-bin/search.cgi?uid=1026

Thanks for your help! God bless!


------------------
Daniel

dan@christian-search.net
http://www.christian-search.net
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
Sooooo...I would put the code in site_html_templates.pl in sub_html_search_results (if that is right)? I've been searching searching around search.cgi, site_html_templates.pl, and site_html.pl to try to find place that would look like it's spot. All I need to do is getthis going, then I can play with rest. Thanks and God bless!

------------------
Daniel

dan@christian-search.net
http://www.christian-search.net
Quote Reply
Re: allowing outside searsch box to have custumizable search results page... In reply to
Hello again!

I got my first idea to work, where a webmaster can have a return link to his site but I still have to make it so if you call it without the special hidden fields, the "return to where ever" will not show up. God bless!

------------------
Daniel

dan@christian-search.net
http://www.christian-search.net