1 ferhoyo Jun 14, 2008 14:28
3 ferhoyo Jun 14, 2008 17:51
Hello,
I'm not sure which version I've installed, I've got it from http://waffleson.co.uk/media/search.zip
But I'm not sure it's the last one, it's the only one I could get as the link http://astonishme.co.uk/media/chat/dl/_am_search.plugin.php seems to be broken.
At the beginning of the php it says
@version $Id: _search.plugin.php,v 1 Exp $
and later on
var $version = '2.00';
Thanks in advance
fernando
4 yabba Jun 14, 2008 19:41
Ok, all of those are out of date .... don't feel bad, even the version on my own blog is out of date :P
The best thing you can do is meander over to this post ( [url=http://b2evo.astonishme.co.uk/bopit]bopit, stay up to date[/url]) ), install that plugin and then visit your plugins page. You'll be shown any plugins that are out of date complete with download links for the current versions ( the current version for the highlighter is 2.3 ).
¥
5 ferhoyo Jun 14, 2008 21:27
YES, thanks ¥åßßå.
Very handy plugin! :)
Is there a way to keep the hightlight after you click the read more?
Most of the posts are quite long and they have the 'read more' after a few lines..
or
is it possible to by pass the <!--more--> tag in the in the query?
This will could display a very, very long page, but with search words highlighted.
Thanks
fernando
6 ferhoyo Jun 15, 2008 14:39
Hello,
I'm trying to get rid off the <!--more--> tag with
$content = str_replace( '<!--more-->', '', $content );
but I'm not going too far.
I've also noticed that the plugin gets mixed up with the special chars.
If I search for té (tea in spanish), it returns and highlights things like: té, tóxico (toxic), técnica (technique)
It breaks at the 'é', same happens with all words including characters as ñ, á é í,... and so on.
Any help will be much appreciated.
fernando
7 yabba Jun 15, 2008 16:17
You should be able to add the following to your skins item.main.php or posts.main.php
<?php
global $more, $s;
if( !empty( $s ) )
{
$more = true;
}
?>
I'll have to revisit the plugin to see what causes / cures the broken highlighting
¥
8 ferhoyo Jun 15, 2008 17:44
Thanks ¥åßßå,
that got rid off the <!--more--> tag in the results page.
I hope I don't become a pain in the... plugin :roll: but I think that the search always returns the results like you've selected 'some word'; 'all words' or 'sentence' don't seem to work. :(
Thanks for all effort
fernando
9 yabba Jun 15, 2008 19:05
the plugin works differently from the stock evo search, it allows boolean searching
+foo -bar "a complete sentence" -"a different complete sentence" + "another complete sentence" zog
Will return any post that does or doesn't contain "zog" or "a complete sentence", that also contains "foo" and contains "another complete sentence" and doesn't contain "bar" or "a different complete sentence" .... clear as mud huh? ;)
¥
10 ferhoyo Jun 15, 2008 20:21
Hi,
the boolean searching works like a charm, good work!
For your info on the special chars problem:
If I search for té It gets mixed up as I explained above, but if I search for "té" (with double quotes ) the results and the highlighting are perfect.
regards
fernando
11 tilqicom Oct 31, 2008 06:48
i cant get results for strings with special chars such as ş , ı etc..
lets say the string is 'şarkı' it searches for 'ark' , omitting the special chars..
and for me, it doesnt do good with / without the " quotes.. how can i fix this special char problem for this plugin ? Just to mention; b2evo default search does fine with special chars.
12 yabba Oct 31, 2008 18:26
Yeah, I really need to play with the special chars stuff ... gonna have to look at what evo does with it now :p
¥
13 yabba Nov 03, 2008 11:40
Try amending this section of code in the plugin ( approx 121 )
preg_match_all( '#(([\w]|(\&\#[0-9]{1,3};))+)#', ' '.str_replace( ' ',' ', $search ).' ', $temp );
$this->or_terms = array_unique( array_merge( ( empty( $temp[1] ) ? array() : $temp[1] ), $this->or_terms) );
¥
14 tilqicom Nov 04, 2008 03:18
¥åßßå wrote:
Try amending this section of code in the plugin ( approx 121 )
preg_match_all( '#(([\w]|(\&\#[0-9]{1,3};))+)#', ' '.str_replace( ' ',' ', $search ).' ', $temp ); $this->or_terms = array_unique( array_merge( ( empty( $temp[1] ) ? array() : $temp[1] ), $this->or_terms) );
¥
i ve replaced this:
preg_match_all( '#\W([^\W]+?)\W#', ' '.str_replace( ' ',' ', $search ).' ', $temp );
$this->or_terms = array_unique( array_merge( ( empty( $temp[1] ) ? array() : $temp[1] ), $this->or_terms) );
with yours; nothing really happened, still omits the special char, moreover, it is not searching within titles and tags it seems, unlike the b2 default search :/
15 sam2kb Nov 04, 2008 06:50
@tilqicom
b2evo does NOT search within tags. Try to replace all instances of [\w] with [A-Za-zX-Yx-y] and [\W] with [^A-Za-zX-Yx-y]
Change X-Yx-y with Turkish uppercase and lowercase first and last letters. This might work, untested :-/
16 yabba Nov 05, 2008 19:47
tilqicom wrote:
lets say the string is 'şarkı' it searches for 'ark' , omitting the special chars..
[url=http://innervisions.org.uk/?s=%26%23351%3Bark%26%23305%3B]search results[/url] ( browsers encoding )
You *might* need to be logged in to see that ;)
¥
17 tilqicom Nov 06, 2008 02:10
¥åßßå wrote:
[url=http://innervisions.org.uk/?s=%26%23351%3Bark%26%23305%3B]search results[/url] ( browsers encoding )
You *might* need to be logged in to see that ;)
¥
yer right, it works for you, but i couldnt get it done, could you pls let me know which lines you ve altered exactly and how ?
i ve modified only line 121, and tried html entities
preg_match_all( '#(([Ş-İ-ıÜ,-Ğü-ğ]|(\&\#[0-9]{1,3};))+)#', ' '.str_replace( ' ',' ', $search ).' ', $temp );
but couldnt get it working
got a :
Warning: preg_match_all() [function.preg-match-all]: Unknown modifier '3' in /home/tilqi/domains/tilqi.com/public_html/plugins/am_search_plugin/_am_search.plugin.php on line 120
18 yabba Nov 06, 2008 09:28
The only line I changed was this one :
preg_match_all( '#(([\w]|(\&\#[0-9]{1,3};))+)#', ' '.str_replace( ' ',' ', $search ).' ', $temp );
¥
19 tilqicom Nov 06, 2008 15:28
¥åßßå wrote:
The only line I changed was this one :
preg_match_all( '#(([\w]|(\&\#[0-9]{1,3};))+)#', ' '.str_replace( ' ',' ', $search ).' ', $temp );
¥
and you have changed it to ... ? i obviously need an example
20 yabba Nov 06, 2008 16:27
That *is* the changed line ;)
¥
What version of the highlighter are you using?
¥