Hey there,
I'm just creating a simple Search Plugin (view screenshot):
I'm currently cleaning out the code and stuff and will release it once its clean and stable.
Any suggestions add-ons anyone wants to see?
EDIT:
Version 0.1 added
nice work dude, looking forward to its release...
Well done. How is server load during search?
What about searching 60 pages? Is it a cpu consumer?
Hey there,
Load performance seems to be a breeze. I tested it with a bunch of files with over 10.000 words each (60KB XML's)....
Time consumed:
This page was created in 0.0155098438263 seconds
Currently I got 2 implementation going. One based on SimpleXML and another once using pure regex....and so far the "cleaner" SimpleXML solution seems to be faster.
For a quick and dirty search this seems to be OK...there are no indexes generated etc. but I figure if it really does get to big, one should slap Lucene in there.
Hi nexflo,
Would like to share this plug in ? Can I try ?
Regards..
Ugur Onur
ð óôõ ÑÂþñÑÂтòõýýþ ÑÂðü ÿûðóøý?
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.
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
whether it is possible to create all the files and write more precisely where and what to post?
I do not understand in PHP
Works a treat - thanks for the upload & sharing
installed, it works, thanks
why there are now searching for such things? translation of Google
�
Make sure all files are UTF-8
fails, the entire character set has changed, sometimes all the same appears at the end and beginning of the line
not quite sure what u're trying to say...maybe copy+paste youre error here?
perhaps because it does not always appear
Is there a way to alter the size of the search box?
Thanks.
homershines
For russian
ßûðóøý ôûѠÿþøÑÂúð ôûѠcms get-simple gs_search.php
1. àðÑÂÿðúþòыòðõü ðрхøò ò ÿðÿúу plugins ò úþрýõ ÑÂðùтð
2. ÑÂþ÷ôðõü ò ÿðÿúõ theme ýþòыù шðñûþý ÿþô ýð÷òðýøõü serp.php (ûучшõ òÑÂõóþ úþÿøруõü ø ÿõрõøüõýþòыòðõü ÑÂтðрыù)
ò шðñûþýõ ýøöõ <?php get_page_content(); ?>
ôþñðòÃȄÂõü <?php search_show(true); ?>
3. âõÿõрь ÷ðхþôøü ò ðôüøýúу ø ÑÂþ÷ôðõü ÑÂтрðýøцу ÿþô ýð÷òðýøõü ßþøÑÂú ýð ÑÂðùтõ ѠÿþÑÂтþÑÂýýþù ÑÂÑÂыûúþù serp þÑÂýþòðýýую ýð ÑÂþ÷ôðýýþü тþûьúþ чтþ шðñûþýõ, ýõ ÷ðñыòðõü, чтþ шðñûþý serp.php
4. ÿõрõхþôøü ò ðôüøýúõ шðñûþýы ø ÑÂþ÷ôðõü úþüÿþýõýт search ÑÂþ ÑÂûõôующøü тõúÑÂтþü
<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">ßþøÑÂú ýð ÑÂðùтõ:</label>
<input type="text" id="frm_txt_search" name="s" value="" /></span>
<input type="submit" class="submit" id="button" value="ØÑÂúðть" />
</div>
</form>
5. þÑÂтðûþÑÂь ýðöðть рõôðúтøрþòðть тõüу ø òÑÂтðòøть ò тõúущøù шðñûþý ò ýуöýþõ üõÑÂтþ <?php get_component('search'); ?>
ßрøüõчðýøõ: ÿþúð òыôðõт úòðôрðтøúø ò тõúÑÂтõ, ñуôу рð÷ñøрðтьÑÂѠÿþчõüу.
ßрøüõр ÑÂðùтð:
×üõÑÂ.ру
úòðôрðтøúø ò тõúÑÂтõ Ѡтðú ø ýõ ÑÂüþó уñрðть ÿþÑÂтþüу ÑÂôõûðû üðÑÂúøрþòúу
тþчýþ тðúöõ ÿрøшûþÑÂь ÑÂôõûðть ø Ѡÿûðóøýþü ÑÂухðрõù
üþöõшь ÑÂúðчðть òÑÂõ руÑÂøфøцøрþòðýýыõ ÿûðóøýы
ð òþþñщõ-тþ ÷ôõÑÂь ÿрøýÑÂтþ þñщðтьÑÂѠýð ðýóûøùÑÂúþü, ÿõрõòþôø óуóûõü - фрð÷ы ÿþÿрþщõ ôõûðù
for friendly URL need
Code:
$outputlist .= '<li><a href="'.$SITEURL.'/index.php?id='.$data->url.'" />'.$data->title.'</a><br />'.$resbev.'<span class="hilite"> '.$needle . ' </span>'.$resaft.'... <br /><br /></li>';
Replace
Code:
$outputlist .= '<li><a href="'.$SITEURL.$data->url.'" />'.$data->title.'</a><br />'.$resbev.'<span class="hilite"> '.$needle . ' </span>'.$resaft.'... <br /><br /></li>';
Cut .'/index.php?id='
good plugin collection
Þûõó, ÿрþÑÂтþ ÿûðóøý ÿþøÑÂúð ýõþñхþôøü, ð õÑÂûø ÿøÑÂðть ýð ðýóûøùÑÂúþü ýõ òÑÂõ ýðùôут. áÿðÑÂøñþ ÷ð ÿþôñþрúу, ñуôу рð÷ñøрðтьÑÂÑÂ.
ÚÑÂтðтø ÑÂÑÂыûúø ÿþøÑÂú фþрüøруõт ýõ òõрýыõ, чÿу ýõ ÿþûучðõтÑÂÑÂ, чтþñы øýôõúÑÂðцøѠñыûð òõрýþù, õÑÂûø òôруó ÑÂтрðýøцы ÿþÿðôут ò ÿþøÑÂú ýуöýþ
áтрþúу ò ÿûðóøýõ
Code:
$outputlist .= '<li><a href="'.$SITEURL.'/index.php?id='.$data->url.'" />'.$data->title.'</a><br />'.$resbev.'<span class="hilite"> '.$needle . ' </span>'.$resaft.'... <br /><br /></li>';
×ðüõýøть ýð
Code:
$outputlist .= '<li><a href="'.$SITEURL.$data->url.'" />'.$data->title.'</a><br />'.$resbev.'<span class="hilite"> '.$needle . ' </span>'.$resaft.'... <br /><br /></li>';
Òырõ÷ðûø .'/index.php?id='
ôð, ôõùÑÂтòøтõûьýþ, ð Ѡúðú-тþ ø òýøüðýøõ ýõ þñрðтøû, ýðòõрýþõ ÿþтþüу, чтþ тðü ÿþ уüþûчðýøю ýõ ÑÂтþøт Fancy URLs, ÑÂÿðÑÂøñþ
This plugin works well. Thanks!
Oleg06 Wrote:why there are now searching for such things? translation of Google
�
Modifed plugin by
n-professor &
seo
New:
1) Valid Search for other languages (utf-8)
2) remove �
3) ÑÂorrect backlighting
Demo:
÷üõÑÂ.ру
ÿðру рð÷ òÑÂõ-тðúø òыûõ÷ûþ ýõчтþ - t;p>, ø чтþ-тþ õщõ
Oleg06 Wrote:ÿðру рð÷ òÑÂõ-тðúø òыûõ÷ûþ ýõчтþ - t;p>, ø чтþ-тþ õщõ
ÕÑÂûø òúûючðõü þñрðñþтúу, ÑÂúþрþÑÂть ÿðôðõт ò рð÷ы, ð тðú ø÷-÷ð úðртøýþú ÿрþøÑÂхþôøт.
now This page was created in 0.00542998313904 seconds
If processing reduces the speed of the script
This page will be created in 0.02 seconds
ßрø тõÑÂтøрþòðýøø þÿрõôõûõýþ, чтþ üðúÑÂøüуü ÿþøÑÂú ÿрõôýð÷ýðчõý ôûѠ500-600 ÑÂтрðýøц, ÿрø ñþûьшõü úþûøчõÑÂтòõ ýðóру÷úð ýõ ÑÂõрòõр ÑÂтðýþòøтÑÂѠþчõýь ñþûьшþù, ÑÂúþрþÑÂть óõýõрðцøø ÑÂтрðýøцы ñþûõõ ÑÂõúуýôы, ÷ðóру÷úð ÿрþцõÑÂÑÂþрð ÿрø þôýþü ÷ðÿрþÑÂõ ôþ 3 ÿрþцõýтþò, 3 üñ ÿðüÑÂтø.
This plugin may be search maximum in 500-600 pages, if more pages might critical for hosting plan (search more than 1 seconds, 3% processor time, 3 mb memory)