Page 1 of 1

New search interface?

Posted: Thu Nov 09, 2017 7:58 am
by timp
Sphider was written in the days before CMS were common (I used it back then) and is therefore not designed to work within one.

This is fine for the 'back end' process but quite difficult for the search function. I've used some javascript to make it work within a iframe in MODx. (See challengenews.online/challenge/search/?query=&search=1. (The Intrusion Detection System incorporated into the version of Sphider on that site causes a problem if I define the link as a link!)

The search returns it's own HTML at present. I would suggest it be changed to return an array and then the user interface part use the array.

The end result would probably look identical to what is there now, but it would create the ability create a different front end, from within a CMS, for example. It would not be a difficult step to extend that to a back end that returns a JSON string.

Tim

Re: New search interface?

Posted: Sat Nov 11, 2017 2:16 am
by captquirk
Actually, if you look at the code, it already DOES return an array! Each page of results is an array, and the number of elements is user defined, with the default set at 10.

Re: New search interface?

Posted: Sat Nov 11, 2017 5:04 am
by timp
Sorry, I haven't gotten very deeply into the code yet.

Does that mean it would be relatively straightforward to split the search into service and presentation components?

Tim

Re: New search interface?

Posted: Sat Nov 11, 2017 3:46 pm
by captquirk
Should be very easy with anyone knowledgeable in PHP.

Re: New search interface?

Posted: Sun Jan 28, 2018 7:29 am
by SantiagoSow
timp wrote:
Sat Nov 11, 2017 5:04 am
Sorry, I haven't gotten very deeply into the code yet.

Does that mean it would be relatively straightforward to split the search into service and presentation components?

Tim
Hi Tim, this would be done with php. Did you manage to figure out how to do it?