2010-04-04, 02:26:43
(This post was last modified: 2010-04-04, 02:28:31 by luisvaloyes.)
As a few people have asked for it..im releasing the current version of the search plugin.
To install create a new template (preferably the template.php) and name it serp.php (For Search-Engine-results-Page)...just below the "get_page_content" tag add.
This is were the search-results are going to be displayed...
Also create a page in the backend using this template and entitle it serp.
Create a compontent entitled "search" which includes the search field:
This compontent you can add anywhere..preferable in the sidebar or top-right in your header
Thats it!
Its very rough but should work for simple things, file is attached in first post and kept up-to-date there.
Test and do give feedback.
Future functions might include:
- Templating for serp
- Choosing type of search. Right now uses PHP-Native function stripos. Regex support (tested and was slower). Lucene support.
- Cachable results
To install create a new template (preferably the template.php) and name it serp.php (For Search-Engine-results-Page)...just below the "get_page_content" tag add.
Code:
<?php search_show(true); ?>
This is were the search-results are going to be displayed...
Also create a page in the backend using this template and entitle it serp.
Create a compontent entitled "search" which includes the search field:
Code:
<form action="#" id="frm_search" method="get">
<input type="hidden" id="frm_txt_search" name="id" value="serp" /></span>
<div>
<label for="frm_txt_search">Search:</label>
<input type="text" id="frm_txt_search" name="s" value="" /></span>
<input type="submit" class="submit" id="button" value="Search" />
</div>
</form>
This compontent you can add anywhere..preferable in the sidebar or top-right in your header
Code:
<?php get_component('search'); ?>
Thats it!
Its very rough but should work for simple things, file is attached in first post and kept up-to-date there.
Test and do give feedback.
Future functions might include:
- Templating for serp
- Choosing type of search. Right now uses PHP-Native function stripos. Regex support (tested and was slower). Lucene support.
- Cachable results