Recent Topics

1 Jun 14, 2008 14:28    

Hello,
I've tried to install the 'Search Hi-Lite Plugin' and I get several errors, like


Notice: Undefined property: ItemList2::$Obj in /var/www/nutribiota/plugins/am_search_plugin/_am_search.plugin.php on line 71

Warning: array_values() [function.array-values]: The argument should be an array in /var/www/nutribiota/plugins/am_search_plugin/_am_search.plugin.php on line 71

Notice: Undefined property: ItemList2::$postIDarray in /var/www/nutribiota/plugins/am_search_plugin/_am_search.plugin.php on line 72

Warning: array_values() [function.array-values]: The argument should be an array in /var/www/nutribiota/plugins/am_search_plugin/_am_search.plugin.php on line 72

Warning: implode() [function.implode]: Bad arguments. in /var/www/nutribiota/plugins/am_search_plugin/_am_search.plugin.php on line 73

am I doing something wrong or it's the plugin that's not prepared for version 2.4.2.

Thanks
fernando

2 Jun 14, 2008 15:58

What version of the highlighter are you using?

¥

4 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 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 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 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 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 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 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 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 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 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 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 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 :-/

17 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( '#(([Ş-İ-ı&Uuml,-Ğ&uuml;-ğ]|(\&\#[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 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 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 Nov 06, 2008 16:27

That *is* the changed line ;)

¥


Form is loading...