Sphider Search Engine

Chin up, soldier! Try it both ways, and see which one looks really
awful. You can’t break anything here.

If you want, pastie the PHP code to me: go to http://pastie.org, paste
the code in, select PHP as the language, and then send me the URL that
Pastie generates for you. I can probably tell by looking at it which
end of the document it’s expecting to go in.

Walter

On May 6, 2010, at 11:07 AM, Thomas Kimmich wrote:

Hi Walter,

if you ask me that way - at the moment I really do not know what I
am doing ( … the worst case).

By using “my method (written above)” just inserting HTML Markups I
thought to have the solution.

But nobody said: OK do it so - or not possible or something like
that I try to follow the footsteps of David as it seems to be a bit
of better way (and cleaner code) - and now … hm - I think I have
to cry for a while and come back to you later with a bit more
detailed questions.

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi, Thomas

OK. First off, did you create a folder in your Freeway site called “sphider-1.3.5” before uploading Sphider? On Our site I created a folder called" search" and uploaded all the Shpider files into it, as this is a test you could use the name “sphider-1.3.5”

This is where you need to create/upload your Freeway page with the file name of index.php if you want it to be part of a bigger site (like ours). Note: I’m not sure if Freeway will try and overwrite a folder already created on the server, of if it will just plonk the required files (index.php) into it. So you might need some FTP file juggling here to get to this arrangment:-

Freeway Site > “sphider-1.3.5” folder > Freeway index.php file + all the other Sphider files/folders

On this Freeway index.php page add a HTML Markup item:

Menu > Insert > HTML markup > then type in the box <?php require_once ("search.php"); ?>

Now I remember the tweak of the Sphider code You need to make sure that Sphider is posting (sending the search words) to this Freeway index.php file (and not search.php)

Open your current Sphider template called search_form.html with a plain text editor and look at line: 6

  <form action="search.php" method="get">

It needs to be

  <form action="index.php" method="get">

This will make sure the search terms are sent to the Freeway index.php and display the results via the include.

Tell me how you get on.

David Owen

On 6 May 2010, at 15:28, Thomas Kimmich wrote:

Hi David and Walter,

first thanks for pointing as through (that Off-Topic).

Now I tried to rebuilt the search page to it`s basics. I removed all code from categories.html, header.html, footer.html in the templates folder.

In the search_form.html removed the center tag
the search_results.html I left untouched.

This is the result:

http://www.kimmich-dm.de/beta/sphider-1.3.5/search.php

where I hope, that this matches your expactations.

But now the integration in Freeway:

What do I have to do when include php ( <?php require_once ("search.php"); ?> ) Never did an operation like that and no idea what this means, nut it sounds great.

Thanks for your help.

Cheers

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It won’t. If the folder exists at the specified path, Freeway will use
it and fill it with its files, and it will not remove files it didn’t
create. It WILL overwrite any files with the same filename, whether it
made them or not.

Walter

On May 6, 2010, at 11:22 AM, David Owen wrote:

Note: I’m not sure if Freeway will try and overwrite a folder
already created on the server, of if it will just plonk the required
files (index.php) into it. So you might need some FTP file juggling
here to get to this arrangment:-


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

By following my last steps you are effectively moving this search.php file:

http://www.kimmich-dm.de/beta/sphider-1.3.5/search.php

via an include into the middle of a Freeway page here:

http://www.kimmich-dm.de/beta/sphider-1.3.5/index.php

With only simple changes to the script.

You can now style the rest of the Freeway Page ~ therefore effectively replacing the headers and footers you removed in the Sphider Templates folder

If you put your HTML markup inline in a HTML box, the Search results fonts will follow the Freeway CSS style sheets (The Javascript Suggest feature has a separate CCS file)

David


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thomas,

You are 99.9% there! You already have an index.php file here:

http://www.kimmich-dm.de/beta/sphider-1.3.5/index.php

http://www.kimmich-dm.de/beta/sphider-1.3.5/search.php?query=Kimmich&search=1

All you need to do is to change that line in the templates and the search will send the results to your Freeway file.

Open your current Sphider template called search_form.html with a plain text editor and look at line: 6

 <form action="search.php" method="get">

It needs to be

 <form action="index.php" method="get">

David

On 6 May 2010, at 16:22, David Owen wrote:

Hi, Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

we would call it in german:

“heaviness birth”.

Now first - many thanks David and Walter.

What I did:

Opened the search_form.html with BBEdit to change the form action to the correct path, for some reason the changings where not saved on the Host. I opened and wondered changed and saved opened again …

Then by downloading to my mac, changing and reup again, it now works fine.

In summary either some things are not to declare or I have to follow my basic rule:

" … 99% of mistakes are sitting in front of the screen"

But my dear David - you won`t get rid of me that quick, cause the last thing is to keep sphider away from indexing parts of the site, for example the footer as you mentioned. What do we have to do here?

And if I wan`t to have the search facility (search box) on each of my sites - what way would you then go?

Best regards

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I will email you the Sphider no-index action tomorrow when I’m back in
the office.

David

On 6 May 2010, at 18:23, “Thomas Kimmich” email@hidden wrote:

we would call it in german:

“heaviness birth”.

Now first - many thanks David and Walter.

What I did:

Opened the search_form.html with BBEdit to change the form action to
the correct path, for some reason the changings where not saved on
the Host. I opened and wondered changed and saved opened again …

Then by downloading to my mac, changing and reup again, it now works
fine.

In summary either some things are not to declare or I have to follow
my basic rule:

" … 99% of mistakes are sitting in front of the screen"

But my dear David - you won`t get rid of me that quick, cause the
last thing is to keep sphider away from indexing parts of the site,
for example the footer as you mentioned. What do we have to do here?

And if I wan`t to have the search facility (search box) on each of
my sites - what way would you then go?

Best regards

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

David can you pleas shoot me the action as well. I’m getting ready to have another go at implementing Sphider within my own page.

Marcel


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Marcel,

as a good reference for other users to follow later, it would be stunning to hear a bit nearer of your way.

As Walter said: “Try it both (or more) ways, and see which one looks really awful. You can’t break anything here.”

Thanks

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hello all spiders,

just another small detail. By calling the search.php (to include) in freeway page)

http://www.kimmich-dm.de/beta/suche/search.php

the suggested results are shown in that “drop down” (my case ugly brown). Try e.g. “Ki” or a “p”

By including it in the freeway searchpage this is not in function any more:

http://www.kimmich-dm.de/beta/suche/index.php

What could be the reason and Is there any possibility or chance to solve?

Thanks

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK found the reason:

scriptaculous from the Target Show/Hide Layer action.

After removing it, it will work.

Bad beat against my plan, inserting the search field onto every of my pages.

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thomas,

The auto suggest javascript does not behave when you’ve got Scriptaculous Actions elsewhere on the page.

Remove any Scriptaculous actions on that page and see if auto suggest works again.

David Owen { Freeway Friendly Web hosting and Domains }

http://www.ineedwebhosting.co.uk | http://www.PrintlineAdvertising.co.uk

On 7 May 2010, at 07:48, Thomas Kimmich wrote:

Hello all spiders,

just another small detail. By calling the search.php (to include) in freeway page)

http://www.kimmich-dm.de/beta/suche/search.php

the suggested results are shown in that “drop down” (my case ugly brown). Try e.g. “Ki” or a “p”

By including it in the freeway searchpage this is not in function any more:

http://www.kimmich-dm.de/beta/suche/index.php

What could be the reason and Is there any possibility or chance to solve?

Thanks

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thomas

You can still do this. You can create a simple Freeway search field on every page, that sends (GET) the data to you search page

Basically this search field will send this data e.g. “Kimmich” to the search page like this link:

http://www.kimmich-dm.de/beta/sphider-1.3.5/search.php?query=Kimmich&search=1

And then show the results on your search page.

You probably need the Multiple form action to do this, naming the search field as “query” and a hidden field called search with a value of 1 and an action of http://www.kimmich-dm.de/beta/sphider-1.3.5/search.php

Did you get the Sphider Action emailed to you?

David Owen { Freeway Friendly Web hosting and Domains }

http://www.ineedwebhosting.co.uk | http://www.PrintlineAdvertising.co.uk

On 7 May 2010, at 11:49, Thomas Kimmich wrote:

Bad beat against my plan, inserting the search field onto every of my pages.


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Post your auto-suggest code somewhere like Pastie and I will see if I
can spot where or why it’s breaking. Then you can have your cake and
spiders, too!

There are some lazy/sloppy coding practices that get exposed whenever
you include Prototype.js in the same page. Prototype is strict, but
rewards you for following the standards. There’s probably someone
iterating an array as it it was an object rather than the correct full
for() loop method.

Walter

On May 7, 2010, at 6:55 AM, David Owen wrote:

Thomas,

The auto suggest javascript does not behave when you’ve got
Scriptaculous Actions elsewhere on the page.

Remove any Scriptaculous actions on that page and see if auto
suggest works again.

David Owen { Freeway Friendly Web hosting and Domains }

http://www.ineedwebhosting.co.uk | http://www.PrintlineAdvertising.co.uk

On 7 May 2010, at 07:48, Thomas Kimmich wrote:

Hello all spiders,

just another small detail. By calling the search.php (to include)
in freeway page)

http://www.kimmich-dm.de/beta/suche/search.php

the suggested results are shown in that “drop down” (my case ugly
brown). Try e.g. “Ki” or a “p”

By including it in the freeway searchpage this is not in function
any more:

http://www.kimmich-dm.de/beta/suche/index.php

What could be the reason and Is there any possibility or chance to
solve?

Thanks

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi David,

yes, I saw your mail - but it´s on my home-office machine and I haven`t had yet the chance to check in (… and to thank you).

Walter,

never did pastie and I hope I did correct and picked up correct code.

Thanks

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Almost right. If you use the embed script stuff, the Web formatter
will make it fail. Best to link to the pretty page: http://pastie.org/949988
or the raw text http://pastie.org/949988.txt on this list.

On to the problem. Yes, this is a mess internally. It’s written really
well – starts off with a lot of promise – but then about mid-way
down they start iterating over arrays as if they were objects, and
that’s a big bummer once Prototype comes along.

Also, if you already have Prototype + Scriptaculous in the page, this
re-writes great swaths of function already in those libraries. There’s
a complete Ajax implementation here (the thing that lets you
communicate with the server without a page refresh) plus the whole
system for interpreting and formatting the search results.

Scriptaculous’s implementation is very clean and fast, supports
keyboard navigation of the hint list, etc. It boils down to one line
of code on the page (once you’ve linked to the libraries):

new Ajax.Autocompleter(id_of_text_field, id_of_div_to_populate, url,  

options);

On the server (PHP) side, your code has to interpret a POST request
and return an unordered list (UL) with results. All the rest is magic.

So what I would do for Prototype compatibility mode here is replace
most of this code with the Scripty version. Either that, or go through
and get rid of all the object-style iterators, which would frankly
take longer, I think.

Walter

On May 7, 2010, at 8:38 AM, Thomas Kimmich wrote:

Hi David,

yes, I saw your mail - but it´s on my home-office machine and I
haven`t had yet the chance to check in (… and to thank you).

Walter,

never did pastie and I hope I did correct and picked up correct code.

Thanks

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK Walter,

the problem is that I think to much figurative and too less code related - or the other way round:

with that less knowledge in background it`s to bait pigs with diamonds.

But I will give all a try, cause I really want to know much more about the background.

that means:

  1. Have to bring the latest scripty version (scripty2-2.0.0_a6) on my server.

  2. I have to link my page with scripty using

inserting HTML-Tag before the

  1. I have to put “where and how?” following

new Ajax.Autocompleter(id_of_text_field, id_of_div_to_populate, url to my search.php???,

  1. Remove the include/js_suggest/SuggestFramework.js
    from a place where I not know at the moment.

and the grass will be green?

Now General - you see with these soldiers there is no war to win - isn`t it? :slight_smile:

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I actually spent a little bit of time on this this morning. I don’t
have Sphider installed here, so the trick will be debugging the
results remotely.

First, you don’t want to use Scripty2 – yet – it’s still in beta and
not for general use. If you use any of the Freeway FX Actions, or my
Protaculous Action, or Carousel, or ScriptyLightbox, then you will
have all of the necessary libraries linked into your page already, in
the current 1.6 and 1.8 branches, respectively.

Next, the autocomplete results box needs to exist on your search page,
and the whole set of elements need to be named in a particular manner.

Finally, the suggest.php script needs to be rewritten lightly. It
needs to return a simple unordered list, rather than the table it
currently employs. And it needs to respond to a POST rather than a GET
request, because that’s how the Scripty system works.

I noticed that there are a lot of extra parameters you can set when
creating a suggest field, to show additional columns of data in your
results. I didn’t try to duplicate that in my limited testing. Also,
the whole business of including the SuggestFramework and invoking its
setup method needs to be stripped out of your search page. (The way
this is written is actually going to nuke Freeway’s various rollover
and image preload scripts, too, so it would be a good idea anyway not
to use it in a Freeway layout.)

Have a look at this file:

http://scripty.walterdavisstudio.com/sphider-1.3.5-prototype.zip

I think it might work, at the very least, it’s set up correctly with
respect to the search field and results. It relies on an outer
template page adding the links to the prototype/scripty libraries, and
I put some rudimentary information about that in the install.txt file.

Walter

On May 7, 2010, at 10:17 AM, Thomas Kimmich wrote:

OK Walter,

the problem is that I think to much figurative and too less code
related - or the other way round:

with that less knowledge in background it`s to bait pigs with
diamonds.

But I will give all a try, cause I really want to know much more
about the background.

that means:

  1. Have to bring the latest scripty version (scripty2-2.0.0_a6) on
    my server.

  2. I have to link my page with scripty using

inserting HTML-Tag before the 3. I have to put "where and how?" following new Ajax.Autocompleter(id_of_text_field, id_of_div_to_populate, url to my search.php????, 4. Remove the include/js_suggest/SuggestFramework.js from a place where I not know at the moment. and the grass will be green? Now General - you see with these soldiers there is no war to win - isn`t it? :-) Thomas _______________________________________________ offtopic mailing list email@hidden Update your subscriptions at: http://freewaytalk.net/person/options

offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter, David

on both of you sorry for the late answer and thanks for your work.

Walter

Auto-Suggest works, basic but not extended as in the original (as expected)

David

Action is very good. Based on Walters HTML Comments Actions it´s very helpful and easy to use.

Once again thank you both.

Now except of the unsure situation of non-indexing some specific hosts, it`s a not too bad solution in adding a search facility to feeway pages.

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options