Welcome Guest, Not a member yet? Register   Sign In
What search engine do you use?
#11

[eluser]Thorpe Obazee[/eluser]
I think I read a post about someone who ported sphider to CI.
#12

[eluser]Chris Williams[/eluser]
Running a search, I saw some posts about it.

I've been sifting through the main functions of the search and think there is more going on than what I need (multiple domains etc), but I am able to get sphider to work in Code Igniter.

This is in my view

Code:
define('SPHIDER_PATH', '/Library/WebServer/Documents/search');
@include_once(SPHIDER_PATH . '/search.php')

And $data['query'] = 'some string' in my control.

In this case, I only wanted 10 results to show up, so I was able to hardcode any variables for the search to run. There were some paths I changed to get to work with CI too, but at the end of the day it works.
#13

[eluser]Thorpe Obazee[/eluser]
That's nice to hear. It would be nice if you could share it with the community though Smile
#14

[eluser]Chris Williams[/eluser]
Once I stepped through to find out what broke, there wasn't much to do.

Set paths in search.php (or if you rename it to avoid conflicts)
Code:
$include_dir = SPHIDER_PATH . "/include";
$template_dir = SPHIDER_PATH . "/templates";
$settings_dir = SPHIDER_PATH . "/settings";
$language_dir = SPHIDER_PATH . "/languages";

And some variables I had to hardcode because it was faster. search=1, mysql_table_prefix, domain, per_page, and entities needs to be redefined.

In all, I'm sure I missed a part where all these are set elsewhere. Since it works, I'm not messing with it any more. :-)




Theme © iAndrew 2016 - Forum software by © MyBB