Welcome! Log In Create A New Profile

Advanced

Add Sphider search to home page

Posted by fallyoverguy 
Add Sphider search to home page
June 10, 2012 05:28AM
Hi there. I have got Sphider Search all set up and working but I want to add the search box to the index page of my site. Currently, the search box only works in the directory mywebsite.com/sphider/search.php, but I want to have the search box appear on the home page at mywebsite.com/index.php. I have tried including "sphider/search.php" on the home page, but I think that messes with the relative links inside search.php (e.g. $include_dir = "./sphider/include"winking smiley. Can anyone give me any advice on how to get the search box to appear on my home page in the root directory?

Thanks!
Tec
Re: Add Sphider search to home page
June 10, 2012 06:58AM
Feel free to use the search feature on top of this forum and query for "embed" (without quotations)
Re: Add Sphider search to home page
June 10, 2012 09:10AM
Ok, thanks, but all I have found is 3 other threads where people have asked the same question with no answer. Two of which only came up because you also advised them to search for "embed". I think maybe your point was to keep all posts to the original thread, which is a fair point. However, I'm still no closer to getting a solution.
Tec
Re: Add Sphider search to home page
June 10, 2012 09:37AM
Well, it is not enough to search only for 'Last Year'. You need to modify the search settings (of Forum search) to 'All Dates' in order to receive 18 results. For example
http://www.sphider.eu/forum/read.php?2,7388

Additional info you may find at the Sphider-plus FAQs at
http://www.sphider-plus.eu/index.php?f=30#7
Also the Sphider-plus documentation, which is completely available on the Internet, offers info at
http://www.sphider-plus.eu/index.php?f=14#14_210

Tec
Re: Add Sphider search to home page
June 10, 2012 10:13AM
Ah, I didn't realise that my search results were being limited by date. Thanks for letting me know. Also, thanks for the links, Sphider is working like a charm now. Thanks for the help.
Re: Add Sphider search to home page
August 01, 2012 11:59AM
Here's what I did:

Assuming that the page you want to add the search box to is in your root folder and Sphider is set up in a folder called sphider, add the following code to your page:

<form action="sphider/search.php" method="get">
<input type="text" name="query" id="query" size="40" value="" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500">
<input type="submit" value="Search">
<input type="hidden" name="search" value="1">
</form>

This is the code I took from the page http://www.sphider.eu/demo.php

Then just go into the sphider/search.php page and edit it to look like your own website, and voila, an integrated search facility!
Re: Add Sphider search to home page
June 07, 2013 09:05AM
Thanks a lot for providing the seach box "code" macsuibhne!!

Do anybody have a good idea or way how to include the select of catagories or kind of search also amoung/below this box?

What would be more than wonderfull is if it would be possible to have the suggesstions also displayed within a search in this "extern" search box.

_()_
mudita

Johann



Edited 1 time(s). Last edit at 06/07/2013 09:12AM by Johann B.
Re: Add Sphider search to home page
June 08, 2013 07:11AM
Dear Sphider Friends and supporters, dear macsuibhne,

I used this code and it worked really fine. Normaly I use firefox. Just to get sure, I have tried to open a html page including this code on microsoft internetexplorer as well, and it seems like it would not like it as it is was not possible to open the page at all and the browser did not work any more.

Does anyone have an idea what the reason might be? Is there a html inkluded microsoft internetexplorer does not like?

Thanks for any hint!

_()_
Re: Add Sphider search to home page
June 09, 2013 04:40AM
Johann B Wrote:
-------------------------------------------------------
> Dear Sphider Friends and supporters, dear
> macsuibhne,
>
> I used this code and it worked really fine.
> Normaly I use firefox. Just to get sure, I have
> tried to open a html page including this code on
> microsoft internetexplorer as well, and it seems
> like it would not like it as it is was not
> possible to open the page at all and the browser
> did not work any more.
>
> Does anyone have an idea what the reason might be?
> Is there a html inkluded microsoft
> internetexplorer does not like?
>
> Thanks for any hint!
>
> _()_

Okidok,

it was not a code problem but a browser perfomance problem:

Quote

If you use Internet Explorer 8 and experience unacceptably slow browser performance when viewing these large files, try switching to "Compatibility View". According to an article [url=http://blogs.msdn.com/b/ie/archive/2008/08/27/introducing-compatibility-view.aspx]on the IE Blog[/url]: "A new UI button located in the navigation bar just to the right of the address bar (next to the refresh button) controls the Compatibility View feature…"[[/b]/quote]

The code works fine and here also without the "suggestion" which seems to need more programming:

<form action="your path/search.php" method="get"><input type="text" name="query" id="query" size="30" value="" >
<input type="submit" value="Search"><input type="hidden" name="search" value="1"></form>


Just change "your path" to your path of the search.php file.

* If you like to change the size of the window, just change: size="50" for example

* If you like to change the bottom text, just change the value in the last input section for example from value="Search" to value="Request"

* If you like to have a explaining text in the box, just change value="" to, for example: value="enter text and push bottom"

Much joy with using and sharing!

_()_
Sorry, only registered users may post in this forum.

Click here to login