Page 1 of 1

Responsive template for Spider

Posted: Sat Nov 24, 2018 4:13 pm
by Rabattkod
Hello

I have installed sphider and want to use it as search engine on infonu.se. Is there any responsive templates i can use because if i enter to my site with mobile phone its difficult to se things. Is there some way to fix this. Thanks.

Re: Responsive template for Spider

Posted: Sun Nov 25, 2018 7:21 am
by ReddWebDev
I'm working on this,

Removing tables and rewriting CSS in order to make it fully reponsive using the existing build.

Re: Responsive template for Spider

Posted: Sun Nov 25, 2018 5:19 pm
by captquirk
If by "removing tables" you are referring to the database, beware that this will impact configset.php, conf.php, db_main.php, and db_backup.php for sure. Perhaps other places as well, but those definitely.

If by "removing tables" you mean in the code removing "<table>", "<tr>", and "<td>" and doing pure css... go for it!

Re: Responsive template for Spider

Posted: Sun Nov 25, 2018 6:25 pm
by ReddWebDev
design work doesn't have anything to do with the db -- <table><tr><td></td></tr></table> all have to be removed and CSS is used to determine element placement (for instance: Writing the form text field to 100% in CSS instead of using the hard parameters of a table's 750px will allow the field to view properly on any device)

You don't have to change any of the db calls in the page code or even get within 6 blocks of the db to make this thing responsive.

Re: Responsive template for Spider

Posted: Sun Nov 25, 2018 7:24 pm
by captquirk
That's what I was sure you were doing, but I just wanted it to be clear for others who may not have read your prior post on RWD. :)

You are correct that CSS is the proper response to Rabattkod's request. The bootstrap DOES add a lot of unnecessary code and complexity. It would NOT be an ideal solution. I posted to simply show that it COULD be done. Sphider is free and people can do what they want with it, even if it IS a bad idea! :lol:

CSS updates, which I know are badly needed in Sphider, are the solution and you seem to have that well in hand. Let me know and perhaps we can have a collaboration for a improved future release of Sphider...

Re: Responsive template for Spider

Posted: Mon Nov 26, 2018 5:18 am
by captquirk
For the classic version of Sphider, I have followed your suggestion and removed tables from the search portion (normal, RSS, and image). I added appropriate css script for each of the templates. Looks nice.

I also created a new template, which I named "mobile". Simply by changing a few things in the css for that template I have a page with much larger text and controls ideal for a mobile device.

I have a script which detects if it is being accessed from a mobile device, and I believe I can incorporate that into search.php so that if a mobile device is detected, settings can be overridden to force the mobile template. That way, a single site can display one template for computer users and another on mobile devices.

I will then need to port those changes to PDO. Shouldn't be too bad, though, as no db functions are affected.

Now... getting rid of tables on the admin console... that will be a whole new ball game!

Re: Responsive template for Spider

Posted: Wed Nov 28, 2018 5:26 pm
by ReddWebDev
RWD eliminates the need for having to htaccess to mobile - We used to do it a long time ago back when writing phone specific protocol was a thing -- Now we just write with CSS and call it a day. If one were to eliminate the hard tables, the page would load and adjust itself to any screen resolution that's presented automatically, thus making a separate subdomain or htaccess detect and redirect unnecessary