Incorporating a site search class
Was wondering if anyone has built a site search for fuelCMS. I need something that would crawl the rendered pages rather than search database tables so that it can be used for each new site that gets built no matter what modules the site might consist of. I saw an article on "How to use Zend_Search_Lucene with the PHP framework CodeIgniter" but that really seems overkill. Wondered if anyone had found or built a simple search class that had been used with fuel. The plan is to use it as the 'site search' in a WIBIYA toolbar.
Comments
http://www.getfuelcms.com/forums/discussion/comment/831/#Comment_831
The WIBIYA toolbar submits to the search page by appending the search term properly as a uri segment. It all works fine until any special character is entered like a period and then it points to the 404 not found page. Doesn't look like there's an option to post the search term with WIBIYA so is there a way to enable querystring for just one page? What are my options?
website.com/search/?search=A. search term with extra characters
I did this and it seems to work just fine now.
$querystring = $_SERVER['QUERY_STRING']; $term = urldecode(substr($querystring, 7));
Not the most elegant solution but it works for now. Doesn't seem to be unsafe since it's just sandwiched into a select statement.
Thanks