Recent Topics

1 May 20, 2008 16:19    

Replace a standard search widget with Advanced Search and you will be able to filter results by blog, category, post author and date. Search in all public blogs at the same time.

You can also remove any/all radio buttons from search form, display results in google-like style with highlighted keywords and customize almost everything. Smart search filters out false positive results present in default search function.

Download the latest version
http://plugins.b2evolution.net/advance_search

Demo
http://b2evo.sonorth.com/show.php?s=blog+post&sentence=OR

Read the README.html before posting your questions!

2 May 20, 2008 16:56

Very good widget.

May I suggest one thing?
You may want to expand it a little if you add a widget setting to include other blogs, like all blogs from this owner or some defined public blogs or something.

Do subscribe it to BOPIT (contact ¥åßßå for that), add yourself to Sourceforge evocms-plugins (contact blueyed for that).

Thanks

3 May 20, 2008 17:00

additional options are just great! (: the default search widget must also include those instead of hacking..as those 'any' 'any or' etc words doesn't look nice,

4 May 20, 2008 17:06

Thanks

I'll try to add an option to include other blogs.
I already have BOPIT access, will ask about Sourceforge later today.

5 May 20, 2008 18:22

That reminds me, I must upload the audio player plugin, complete with russian locale ( thanks ;) ), and amend BOPIT ;)

¥

*edit*
Assuming your checkboxes == "hide this option", if you uncheck all 3 then evo will default o .... whatever it defaults to ..... you might like to change that to "if only 1 ticked then hide them all and add the ticked option as a hidden input", then users can select there own "default" action ;)

6 May 20, 2008 23:38

you might like to change that to "if only 1 ticked then hide them all and add the ticked option as a hidden input", then users can select there own "default" action

In TODO list ;)

7 May 21, 2008 08:58

it's getting better and better (:, just a small detail; it'd be good if you could add an indicator like a + and - for main and child categories, or arrange the font size a bit

8 May 21, 2008 10:39

Why don't you like a double space padding ;) ?

I'm now trying to figure out how to include posts from other blogs. And I also want to add a date field.

9 May 21, 2008 10:52

sam2kb wrote:

Why don't you like a double space padding ;) ?

I'm now trying to figure out how to include posts from other blogs. And I also want to add a date field.

double space is also fine, it can be modified easily, i suppose, i didnt try.. but + - is better trust me : P
yea that would be good, i dont have such a problem since i have an aggregated one : P, but the date field idea is just great.. afaik, search between dates function always put some heavy weight on the servers in common it would be very cool though ;)

10 May 21, 2008 11:00

Do you mean something like this?

+ Main
  - Sub
  - Sub
  + Main Sub
    - Sub Sub

It takes a lot of space, but I'll try it after/if I make a search by blog thing.

11 May 21, 2008 11:11

sam2kb wrote:

Do you mean something like this?

+ Main
  - Sub
  - Sub
  + Main Sub
    - Sub Sub

yep that's it, it's cool this way too, no worries ;)

13 May 23, 2008 17:20

Wonderful! I was going to start hacking all the widgets that (a) are lame and (b) are self contained but now even if search widget meets these criteria (and it certainly meets the first!) I don't have to touch it.

Hooray for smart search options!

14 May 25, 2008 01:09

this is very cool, i can now simply add a search area consisting of only search button and text field ;) i am looking forward to date search func.

and Ed hey, if you want to update a lame widget, i d like to see a better online list too (: like online members, staff or showing user groups and how many user online on each group etc..

15 Jun 19, 2008 10:27

I would like to know if I can use this plugin 'advanced search' with pagination and how.

Many thanks

16 Jun 19, 2008 17:40

ferevo wrote:

I would like to know if I can use this plugin 'advanced search' with pagination and how.

Many thanks

what do you mean pagination ? in every page of a post , or in every page of the blog ?

in both case, you will simply have to add a container where you want the widget to be displayed and insert the widget in that container

17 Jun 21, 2008 17:36

What I mean about pagination is that this version(0.4) displays the first 50 posts only because it cannot follow page links. is there any way to solve this problem? I would like to show the first 10 posts and the use page links for the rest .

18 Jun 21, 2008 19:41

You can change 50 to 10 if you want so, but it won't follow page links anyway.

is there any way to solve this problem?

Not in this version of plugin :(

19 Jun 29, 2008 07:40

Plugin updated. No new features added, only bug fixes.

20 Jun 29, 2008 13:53

a nice feature would be : don't display all the 'options' in the front, just 'do them' as the admin choose in the backoffice
that way you can have a very clean searchbox with 1 button 'go' (a css desingable button offcourse)

21 Jun 29, 2008 14:29

Topanga wrote:

a nice feature would be : don't display all the 'options' in the front, just 'do them' as the admin choose in the backoffice
that way you can have a very clean searchbox with 1 button 'go' (a css desingable button offcourse)

tilqicom wrote:

this is very cool, i can now simply add a search area consisting of only search button and text field

;)

22 Jun 29, 2008 20:32

that way you can have a very clean searchbox with 1 button 'go' (a css desingable button offcourse)

This is how it works, just untick all "display" boxes and you'll get a searchbox with 1 button 'go'.

23 Aug 16, 2008 13:15

Is there a way to display this widget outside of a widget array?

Also, is it possible to replace the Search button with a graphic or something instead?

24 Aug 16, 2008 15:24

You can use this code in skin

// --------------------------------- START OF SEARCH FORM --------------------------------
// Call the coll_search_form widget:
	$Plugins->call_by_code( 'advanced_search', array(	// Params follow:
		'block_start'		=> '<div class="bSideItem widget_plugin_advanced_search">',
		'block_end'			=> '</div>',
		'block_title_start' => '<h3 class="sideItemTitle">',
		'block_title_end'	=> '</h3>',
		'search_title'		=> T_('Search'),
		'search_button'		=> T_('Search'),
		'in_category'		=> T_('In category'),
		'by_author'			=> T_('Author'),
		'in_blogs'			=> NULL,
		'category_exclude'	=> NULL,
		'search_cat'		=> true,
		'search_author'		=> true,
		'search_all'		=> true,
		'search_some'		=> true,
		'search_phrase'		=> true,		
	) );
// ---------------------------------- END OF SEARCH FORM ---------------------------------

25 Aug 16, 2008 15:34

Add this class to styles.css to show the button background image

.widget_plugin_advanced_search input.search_submit
{ background: url(img/my_image.gif) no-repeat top left; padding:3px 20px }

26 Aug 16, 2008 18:02

I may be bollocks wrong, but I seem to recall that you can also do

SkinWidget( widget_code, param array );

¥

27 Aug 17, 2008 01:01

This code doesn't work, it returns "Invalid widget code provided"

skin_widget( array(
	// CODE for the widget:
	'widget'		=> 'advanced_search',
));

29 Aug 22, 2008 15:57

Search Highlight doesn't work with Russian text, it was reported to ¥åßßå some time ago ;)

I'm working on search by year/month thing now.

30 Aug 22, 2008 16:55

sam2kb wrote:

Search Highlight doesn't work with Russian text, it was reported to ¥åßßå some time ago ;)

Bugger, I keep forgettin' to try and fix that :p

¥

31 Aug 22, 2008 20:57

Plugin updated :)
Added search by month/year option.

33 Nov 02, 2008 01:15

Plugin updated

Highlight keywords in full posts mode (b2evo default)
Code cleanup

34 Nov 02, 2008 03:49

sam2kb wrote:

Plugin updated

Highlight keywords in full posts mode (b2evo default)
Code cleanup

thanks for the update.. but after updating the search still does not highlight the retrieved results ..give it a shot [url=http://www.tilqi.com/anasayfa.php?s=hitler]here[/url] did i have to do anything further else than updating the plugin ?

35 Nov 02, 2008 04:11

Go to plugin settings and click "Restore defaults"

The plugin didn't use rendering functions before, but now it does and you have to manually set Apply rendering to "stealth" or simply Restore defaults.

36 Nov 02, 2008 04:34

sam2kb wrote:

The plugin didn't use rendering functions before, but now it does and you have to manually set Apply rendering to "stealth" or simply Restore defaults.

i did. nothing changed :/

39 Nov 02, 2008 05:36

There's no way to highlight post title.

40 Nov 02, 2008 14:41

sam2kb wrote:

There's no way to highlight post title.

it does not highlight the post content either it seems

41 Nov 02, 2008 18:48

Check this link http://www.tilqi.com/anasayfa.php?s=i%C3%A7in

Your posts have 2-3 pages, if you don't see highlighted text on some posts it means the word(s) is on the other page.

BTW why don't you want to display results in google-like style, this is the main plugin's feature which you don't use :)

42 Nov 02, 2008 19:37

sam2kb wrote:

Check this link http://www.tilqi.com/anasayfa.php?s=i%C3%A7in

Your posts have 2-3 pages, if you don't see highlighted text on some posts it means the word(s) is on the other page.

BTW why don't you want to display results in google-like style, this is the main plugin's feature which you don't use :)

aah i see, i kept trying keywords in the titles.. it'd be better if it could highlight titles and tags, i mean almost anywhere, wherever the term was used..
¥åßßå's plugin is very cool actually and does not clash with yours, it d be great if it didnt have that special character problem..

43 Nov 02, 2008 19:59

aah i see, i kept trying keywords in the titles.. it'd be better if it could highlight titles and tags, i mean almost anywhere, wherever the term was used..

- It highlights titles when displaying in "compact" mode (you don't use it).
- It's not possible to highlight titles in "full posts" mode without hacking skin files
- It doesn't search/highlight tags and it's not possible without hacking core files or rewriting search functions.

44 Nov 16, 2008 07:26

Hello.

I just installed this plugin as it looks really neat.

How can I restrict certain authors from being searched, starting with demouser? :?:

Thanks.

45 Nov 16, 2008 07:36

Edit the following on line 370, list user IDs.

foreach( $UserCache->cache as $loop_Obj )
{
	switch( $loop_Obj->ID )
	{
		case 2:
		case 14:
		case 23:
			continue;
			break;
	}

46 Nov 16, 2008 08:05

Thanks for your reply, sam2kb.

I just did a search for 'templates' as an example whereby the only public blogs are demo Blog A and Blog B.

I noticed the URL (not live) at the end of the one result found, that due to its length, it overlapped the right column in FF 2.0.x but not in IE 6 nor IE 7.

Is there a way to force word-wrapping at a certain# of characters? :?:

Thanks again in advance.

47 Nov 16, 2008 08:48

sam2kb wrote:

Edit the following on line 370, list user IDs.

foreach( $UserCache->cache as $loop_Obj )
{
	switch( $loop_Obj->ID )
	{
		case 2:
		case 14:
		case 23:
			continue;
			break;
	}

Hi again.

While awaiting your reply from my last post, I tried the code for excluding users (authors). I haven't gotten it to work. :?:

As a test, I added 'case 1' so no admin posts would be found. They were still found. This is the code I used:


					foreach( $UserCache->cache as $loop_Obj )
					{
// case 2 (demouser)
			switch( $loop_Obj->ID )
			{
				case 1:
					continue;
					break;
			}
						echo '<option value="'.$loop_Obj->ID.'">';


etc...

Also, I'd like to exclude that author from being shown in the dropdown box (list). Will the code revision accomplish that, too? :?:

Thanks again in advance.

48 Nov 16, 2008 17:47

I didn't test it yet, but the code I wrote above should exclude the author from dropdown menu.
I'm gonna work on it today.

49 Nov 17, 2008 04:29

Plugin updated
New: Exclude post authors

@blogmeister
To wrap the link open plugins/advanced_search_plugin/inc/_adv_search.disp.php on line 47 and change the number of characters from 250 to whatever you need.
You can also try to play with CSS in plugins/advanced_search_plugin/adv_search.css

Good luck

50 Nov 18, 2008 10:12

Thanks for your reply and the update, sam2kb.

I should (hopefully) install this tonight.

One thing I thought of after my last reply was that I plan on having multiple blogs and multiple bloggers.

If, from time to time, any of the bloggers want to exclude an author(s) from their blog's 'Advanced Search,' I'd really prefer it be done via the Admin interface versus them contacting me to modify the code for each instance.

Granted, I am not sure how you updated the plugin; I assume it is via adding a new 'case' or similar via editing the code as you mentioned previously.

I'll check out what you have tonight.

Thanks again as this is an nice plugin.

51 Nov 19, 2008 05:34

blogmeister wrote:

Thanks for your reply and the update, sam2kb.

I should (hopefully) install this tonight.

One thing I thought of after my last reply was that I plan on having multiple blogs and multiple bloggers.

If, from time to time, any of the bloggers want to exclude an author(s) from their blog's 'Advanced Search,' I'd really prefer it be done via the Admin interface versus them contacting me to modify the code for each instance.

Granted, I am not sure how you updated the plugin; I assume it is via adding a new 'case' or similar via editing the code as you mentioned previously.

I'll check out what you have tonight.

Thanks again as this is an nice plugin.

Wow, sam2kb - you're pro-active and/or psychic!

It is so convenient now to designate the authors to exclude via the Admin interface! Thanks for that.

One thing though - even though the author is excluded from the dropdown list, searching authors with 'All' still shows the excluded author's posts in the results listing.

I'm still in the Demo mode so I excluded the 'admin' or user ID#1 in the plugin's params. The 'admin' was excluded from the dropdown list so I kept the default 'All' for the authors, but all of the admin's posts were found in the results.

It's getting there, though. I like it.

Thanks.

52 Nov 19, 2008 06:24

There's no easy way to exclude some authors when search within "All" without hacking the core.
I'll probably rewrite the search function some day.

53 Nov 19, 2008 06:40

Thanks.

When you rewrite it, I'll try to be one of the first in line for it.

Take care.

54 Jan 29, 2009 03:54

Hello.

I'm using this plugin and just noticed that upon performing a search, when the results are displayed, in addition to the current blog's highlighted post dates, the calendar also then highlights a date on the calendar not belonging to the blog the search is performed in, but from one of the other public blogs.

When clicking on that highlighted date, the results say, 'Sorry, there is nothing to display...'. This behavior is also seen even when the blog results includes a post from that other blog posted on that day.

What might be the purpose of this? :?:

Thanks in advance.

55 Jan 29, 2009 04:19

Can you please give a link, it's hard to me to figure it out.

56 Jan 29, 2009 06:02

Thanks for your reply, sam2kb.

I'll PM it to you as it is not yet 'Live'.

57 Feb 17, 2009 03:10

Hello sam2kb.

I created a 'FAQ' and plan to create more 'Page' post types.

How can the search incorporate 'pages'?

Thanks.

58 Feb 17, 2009 03:21

Edit the following in inc/items/model/_item.funcs.php #58

if( $disp == 'page' )
{	// Get  pages:
	$MainList->set_default_filters( array(
			'types' => '1000',		// pages
		) );
}

if( $disp == 'posts' && param( 's', 'string' ) )
{
	$MainList->set_default_filters( array(
			'types' => NULL,		// All types
		) );
}

Good luck

60 Apr 24, 2009 00:49

i just installed this plugin, looks great, thanks!

with it placed within my sidebar, the drop down fields run off the sidebar and disappear.... is there any way to make the drop downs shorter in width? is this what blogmeister was referring to with word-wrapping?

Is there a way to force word-wrapping at a certain# of characters?
Thanks again in advance.

@blogmeister
To wrap the link open plugins/advanced_search_plugin/inc/_adv_search.disp.php on line 47 and change the number of characters from 250 to whatever you need.
You can also try to play with CSS in plugins/advanced_search_plugin/adv_search.css

Good luck

i adjusted this, and changed 250 to 25, but it doesn't seem to have had any effect.

also, is there a way to change the text "root site" to categories or something else?

here's a [url=http://shitledger.com]link[/url]

61 Apr 24, 2009 03:32

in /skins/miami_blue/style.css add:

#cat {
width: 180px;
}
.input select{
width: 180 px;
}


The first one will work, pray for the second one.
@sam2kb: pls add an id at <select name="author">

Good luck

62 Apr 25, 2009 01:48

i couldn't find the #cat any where in the file, but what i did find was this:

.bSideBar {
margin: 0;
padding: 57px 0 0 0;
width: 204px;
float: right;
overflow: visible;
background-image: url(img/right_col.gif);
background-repeat: no-repeat;
background-position: right top;

i changed the width from 204 to 259 and the entire sidebar disappeared! then i tried changing overflow from hidden to visible, which also caused the sidebar to disappear. any ideas?

also, anyone know how to get rid of the text, "root site" in the category drop down?

63 Apr 26, 2009 15:09

Hi bobzarzal,

You need to add #cat ;)

Good luck

64 Apr 26, 2009 17:49

also, is there a way to change the text "root site" to categories or something else?

There's no easy way to change it :( but you can remove this option by changing 'true' to 'false' in the following code around the line 300

/*
 * Categories:
 */
if( $params['search_cat'] )
{
	$ChapterCache = & get_Cache( 'ChapterCache' );
	
	$Form->select_input_options(
			'cat',
			$ChapterCache->recurse_select( NULL, $Blog->ID, false, NULL, 1, $category_exclude ),
			$params['in_category']
		);
}

65 Apr 26, 2009 17:59

You should better create a standalone search page and put the widget there.
I don't think you can cut categories or authors names, you can probably change the font size but this is not a good idea.

66 May 08, 2009 12:48

My b2evolution Version: Not Entered

Hi,

B2 2.4.6

I've set my blog to display 1 page at a time, full posts no excerpts.

Now, I would like the search function to only display a clickable list of results, not the full posts or pages one by one.

Any clue?

68 May 08, 2009 14:19

Thanks!

But this plugin isn't flawless...

If the searched word appear in an <IMG SRC="....THE_WORD..." /> tag, then the picture isn't displayed, plus the source name is partially displayed up to the "/>"

If the search word appears in a menu item, the menu css is destroyed too.

And finally, the full post is displayed, not a list.
And if more than 1 post, then a seamingly endless page is displayed!

Too bad!

Suggestion: To display the page title (clickable to go to the full post), plus say 50 words before and after the 1st occurence of searched word.

69 May 08, 2009 14:29

If the searched word appear in an <IMG SRC="....THE_WORD..." /> tag, then the picture isn't displayed, plus the source name is partially displayed up to the "/>"

This is how it's implemented in b2evo core. The development plugin version searches rendered content (no html tags). I'm still working on it.

If the search word appears in a menu item, the menu css is destroyed too.

What menu are you talking about? It only searches posts.

And finally, the full post is displayed, not a list.
And if more than 1 post, then a seamingly endless page is displayed!

Read the readme.html

Suggestion: To display the page title (clickable to go to the full post), plus say 50 words before and after the 1st occurence of searched word.

Read the readme.html

70 May 08, 2009 14:42

...Rendered content...
That would be nice. Put me on your beta testers please :-)

Quote: "What menu..."

Not a B2 menu, but a <UL><LI> list of mine that my css renders as an extra horizontal menu...

Not that display is also destroyed, alas.

71 May 08, 2009 14:48

Full post displayed...

My bad, sorry! I just forgot to edit the post_main.php.

Now its fine and there are no pictures displayed within the list.

You are just GREAT man :-)

72 May 08, 2009 15:09

frsurfer wrote:

Not a B2 menu, but a <UL><LI> list of mine that my css renders as an extra horizontal menu...

Not that display is also destroyed, alas.

The plugin highlights and destroys html tags.

If you search for "green" the following code

<li class="green">text</li>


becomes

<li class="<span class="highlited_words">green</span>">text</li>

Put me on your beta testers please :-)

It still has some bloats, just watch the plugin's topic, I post updates there. BTW you can try a dev version [url=http://www.sonorth.com/travel/tours/?types=&s=garden&locale=en-US]here[/url]

73 May 08, 2009 15:13

Search submit button display:

I've not found any line in the .css file to fine-tune how the submit button should be displayed.

I mean I want it with a border, grey background, cursor "hand" for example.

Can you tell me the way please?

74 May 08, 2009 15:16

Besides, can you give a date for the finam version, that won't search the links or picture titles?

75 May 08, 2009 15:22

scuse me, but could y'all please move plugin-associated discussion to the plugin's thread?

76 May 08, 2009 15:23

I've not found any line in the .css file to fine-tune how the submit button should be displayed.

Add the following in adv_search.css

.widget_plugin_advanced_search .search_submit { border:2px #099 solid }

Besides, can you give a date for the final version, that won't search the links or picture titles?

Some day B)
I'm currently working on another 2 huge plugins and don't have time for this one.

77 May 08, 2009 15:42

Thanks.

I've tryed .input:submit, also tried several other combinations, but couldn't "invent" that very one .search_submit ! LOL

78 Jul 09, 2009 06:03

are there any updates on this plugin? I'd like to give it a try. Google XHTML and Dynamic thing is crappy.

79 Jul 09, 2009 07:01

The current version works pretty well.

80 Jul 11, 2009 06:20

Great stuff. I enabled it on our blog.

By the default - I would suggest having the single search box (like google).

i love the highlighting of the searched terms.

I would also add the class statements on the actual inputs so it's easier to find them in the css or rename them to match your own.

I also switched the search text box to be inline with the search button.

Thanks. <this should be the default search engine in b2evo 3.2..

81 Jul 11, 2009 06:39

Thanks for the feedback.
You still don't use the main feature "google-like styled results".

this should be the default search engine in b2evo 3.2

Well, it's still far from what I'd like it to be.

82 Jul 11, 2009 06:58

You still don't use the main feature "google-like styled results".

I just saw that in your blog. Yeah those google like results look great. how do I enable them?

I'm reading the thread here in the meantime... the readme.html file seems a bit out of date or my skin doesn't have the " MESSAGES GENERATED FROM ACTIONS" section.

83 Jul 11, 2009 07:06

I'm reading the thread here in the meantime... the readme.html file seems a bit out of date or my skin doesn't have the " MESSAGES GENERATED FROM ACTIONS" section.

Any skin must have this code. It's between the lines 92-97 in original integral skin.

EDIT: I guess you already figured it out...

84 Jul 11, 2009 07:09

yeah, sorry - I forgot I got fancy and separated my skin main.index into a couple of 'php' files.

i have the results looking like google now - except that when I click on them i get an error.

Seems like the link is constructed as:
?blog=6?highlight=st.+augustine and the question mark before highlight is throwing it off.

http://www.thechristianalert.org/index.php/2005/10/15/were_the_u_s_founding_fathers_christian_7?blog=6?highlight=st.+augustine

So that you know - I'm actually not using it as a widget. I enabled the widget and then cut the HTML and hard coded that into my skin. Perhaps this is throwing it off

EDIT: I fixed this error by going to Blog Settings and Choosing the :
"Extra path Option" so it shows index.php/BlogName instead of index.php?blog=5

Now I'm in business. thanks.

85 Jul 11, 2009 07:18

Must have that bit? Seems totally optional to me because I really don't care if a visitor ever sees a comment saying they submitted a comment, and I tend to know if I just edited a post or not.

Oh wait a minute ... Searching would be an action, so of course it needs a place to put a message from that action. Too bad. Does the core search feature do it that way? I've no idea of how the guts of this thing or core search works, but in my mind a unique disp value would be way better. Except that probably takes modifying files. Unless advanced search replaces core search :) Not many plugins exist that should move from hooks to the core. This is most certainly one of 'em :D

86 Jul 11, 2009 07:43

@esanchez

Cool, you found a bug ;) To fix it replace the following in advanced_search_plugin/inc/_adv_search.disp.php

echo '<a href="'.$Item->get_permanent_url().'?highlight='.urlencode($s).'" rel="nofollow">'.$title.'</a>';


with

echo '<a href="'.url_add_param( $Item->get_permanent_url(), 'highlight='.urlencode($s) ).'" rel="nofollow">'.$title.'</a>';

Oh wait a minute ... Searching would be an action, so of course it needs a place to put a message from that action. Too bad. Does the core search feature do it that way?

It doesn't rely on "actions", it's just a marker for users, since the messages code is included in all submitted skins.

Unless advanced search replaces core search Smile Not many plugins exist that should move from hooks to the core. This is most certainly one of 'em

Thanks, but first I have to finish the version which searches in [u]rendered[/u] content.

87 Jul 11, 2009 07:51

Wow that'd be neat - searching through rendered stuff.

Hey not to go too far off topic in a six-page thread, but I can't for the life of me think of another plugin that would be good to replace core features. The new core avatars is junk and should be removed because it is a trinket that should only be a plugin. BOPIT should be core but doesn't replace something. All the various bits like Yahoo and the like should be removed and replaced with a profile hook. But what plugin other than this replaces a core function that (a) should be a core feature and (b) does it way better than the core?

88 Jul 12, 2009 09:34

Plugin updated to v1.1

Lots of bug fixes, now doesn't highlight/break HTML tags

89 Jul 14, 2009 03:42

thanks. I got mine updated. like I said before. this should come standard w/ b2evo 3.x. It's a beautiful piece of code.

90 Jul 14, 2009 04:26

Plugin updated to v1.5 ;)

New: Precise search (optional). If enabled, the plugin will search through [u]rendered[/u] content, and [u]outside[/u] of HTML tags only. This means that a lot of false positive results will be filtered out.
New: Search by post type (Post, Page, Podcast etc.)
Fixed: Widget "remembers" selected search params
Fixed: Works in b2evo 3.x

91 Jul 24, 2009 23:39

I found a bug in the paging of this plugin and a fix.

in the disp file change

$adv_MainList->page_links( array(
				'block_start' => '<div class="BlUeBaR">'.$this->T_('Pages:').' ',
				'block_end'   => '</div>',
			) );

to

$adv_MainList->page_links( array(
				'block_start' => '<div class="BlUeBaR">'.$this->T_('Pages:').' ',
				'block_end'   => '</div>',
				'page_url' => url_add_param( $url, 'highlight='.urlencode($this->search_terms).'&amp;sentence='.$this->search_mode ),
			) );

92 Jul 25, 2009 07:40

And then all pages will link to the latest displayed post ;)

We don't need to specify custom 'page_url', default $ReqHost.$ReqPath works perfect.

Didn't it work in your case?

93 Jul 25, 2009 08:43

nope it didn't work in my case. it gave a page cannot be found message when clicked on the pages.

With the previous method I got this url after searching.

index.php/All/?s=sql+dates&advm=&advy=&author=&sentence=AND

this brought me to the first page and gives 3 pages

when clicking on the page 2 link I get the Sorry, there is nothing to display...
with this url

/index.php/All/?blog=7&s=sql dates&paged=2

now with this little change (no longer the url of the last displayed post ;-), oops)

global $Blog;
		
		$adv_MainList->page_links( array(
				'block_start' => '<div class="BlUeBaR">'.$this->T_('Pages:').' ',
				'block_end'   => '</div>',
				'page_url' => url_add_param( $Blog->get('url'), 'highlight='.urlencode($this->search_terms).'&amp;sentence='.$this->search_mode ),
			) );

it does work corerctly

with this as the url.

index.php/All/?highlight=sql+dates&sentence=AND&blog=7&s=sql dates&paged=2

something must be causing this because on my dev server I don't have this problem only on prod.

I tried and if the sentence=AND is missing from the url than that is the cause not sure why it is missing when leaving out the page_url.

94 Jul 25, 2009 09:02

Try this, you don't need to add any params to URL

'page_url' => $Blog->gen_blogurl(),

Also I got an error saying "Fatal error: Allowed memory size of 16777216 bytes exhausted" which means you should increase PHP memory limit to at least 32M

95 Jul 25, 2009 09:13

nope that doesn't work. you can check it out I will leave it like that for half an hour. try sql date and all words.

not sure when you got the php error I never got that but I will increase.

96 Jul 25, 2009 09:27

To get the error (blank page) search for "a b c d" and select "some words"

Yeah, I see now, the 'sentence' param is not memorized for some reason.

Edit the line 256 in plugin file and see if it fixes the problem.

$this->search_mode = param( 'sentence', 'string' );


to

$this->search_mode = param( 'sentence', 'string', '', true );

EDIT: this is weird, no params are memorized, actually!

97 Jul 25, 2009 09:35

thanks I got the error. Will fix soon.

nope the param(s) is still not memorized. they are memorized on the dev server which should be similar but apparently not the same. Oh joy.

98 Jul 25, 2009 09:36

thanks for all the help BTW.

99 Jul 25, 2009 09:41

chrissie1 wrote:

thanks for all the help BTW.

No problem.

Try this for now

global $m;
$adv_MainList->page_links( array(
		'block_start' => '<div class="BlUeBaR">'.$this->T_('Pages:').' ',
		'block_end'   => '</div>',
		'page_url' => url_add_param( $Blog->gen_blogurl(), 'sentence='.$this->search_mode.'&amp;m='.$m ),
	) );

It's 3.30 am now, I'll be back in the morning ;)

101 Jul 25, 2009 17:17

I'm back :)

And this to the disp file

$url_params = '';
$params = array();

if( $this->search_mode )
{
	$params[] = 'sentence='.$this->search_mode;
}
if( $this->in_blogs )
{
	$params[] = 'in_blogs='.$this->in_blogs;
}
if( $this->month )
{
	$params[] = 'm='.$this->month;
}
if( $this->types )
{
	$params[] = 'adv_types='.$this->types;
}

if( !empty($params) )
{
	$url_params = implode( '&amp;', $params );
}

$adv_MainList->page_links( array(
		'block_start' => '<div class="BlUeBaR">'.$this->T_('Pages:').' ',
		'block_end'   => '</div>',
		'page_url' => url_add_param( $Blog->gen_blogurl(), $url_params ),
	) );

102 Aug 25, 2009 18:52

Sam,
Have you tried that plugin in a 3,3,1 (latest release) version ?
because it's like 'something' is conflickitng with item_light.
It's not working with my custom skin, nor with a 'out of the box' skin

Try this, and you'll see the result
http://www.tenderfeelings.be/dagelijks.php?s=pit&sentence=AND

and when I try it on a brand new installation (no update' then it works fine... I'll be damned...

ok, even more finetuning :
I had to change back my tables to myISAM, instead of INNODB, and then the itemlight does not work. Does that makes any sence ?

103 Aug 25, 2009 22:00

Can you try the SVN version, I fixed this and some other bugs?

You should update both files
_adv_search.disp.php
_advanced_search.plugin.php

104 Aug 25, 2009 22:10

and where can I find the svn version ?

106 Aug 25, 2009 22:23

YES YES YES
thank you so mutch!!!!

107 Aug 25, 2009 22:30

Do you know why it doesn't highlight the keywords in your blog?

108 Aug 25, 2009 22:35

Make sure the rendering is set to stealth in plugin settings

109 Aug 25, 2009 23:08

I only discovered today that I can highlight the keywords ;)

111 Aug 25, 2009 23:30

No I did not know...
this plugin has a lot for me to discover
I suppose I'll find the guides to make sush a show.php somewhere in the readme ?

113 Aug 25, 2009 23:56

the only thing I could find in the readme.html was

// Display search results
global $ASearch_plugin;
if( is_object($ASearch_plugin) )
{
	$ASearch_plugin->display_results();
}

How I jump from the searchbox to this, is a complete other story;)
complete mistified ;)

114 Aug 26, 2009 00:07

Everything you need to get it working is written in that readme.html

Just copy the above code in skin file after the messages code.

115 Aug 26, 2009 00:14

I must be very stupid
You mean this

<?php // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
    messages( array(
    'block_start' => '<div class="action_messages">',
    'block_end'   => '</div>',
    ) );
 // --------------------------------- END OF MESSAGES ---------------------------------
                ?>
                
<?php // Display search results
    global $ASearch_plugin;
    if( is_object($ASearch_plugin) )
        {
        $ASearch_plugin->display_results();
        }
?>

116 Aug 26, 2009 00:17

Right, just add the new code

117 Aug 26, 2009 00:18

ok, I did, and nothing is happening
I'm not completely surprised, since my skin is very very custom made

118 Aug 26, 2009 00:21

its allways PICNIC

Thank you very mutch!
after the 5th time I read the 10 lines in the readme.html, I finaly understood what was written there ;)

119 Aug 26, 2009 04:51

I fixed another bug, please update both files again.

120 Aug 27, 2009 10:24

My b2evolution Version: 2.4.7 and 3.3.1

Hi! Maybe is nothing, but in my blogs, when I tried to "search" something usin the normal search plugin, as a result the blog disappeared and the only part that I could see was the header part.
And I don´t know the reason, but I got rid of the advanced search plugin and the search function worked again. And in other blogs that I have advanced search plugin 0.3 everything is ok.

121 Aug 27, 2009 10:38

I just realized that I have two similar plugins: advance_search version 0.3 and advanced_search version 1.5 This last one is the ultimate update of the plugin and got the error I quoted in the previous message. Is the same plugin?
Anyway, the error disappeared when I remove the advanced_search 1.5

124 Aug 27, 2009 16:18

You should either enable PHP errors or look at Apache error log.
It's hard to guess what exactly caused the page to die.

125 Aug 27, 2009 16:53

Ok! I see...
That´s a pity! Thank you anyway!

126 Aug 27, 2009 16:56

Just add this to your php.ini

display_errors On

127 Aug 27, 2009 16:59

BTW you can most likely solve the problem by increasing PHP memory limit to 64M or 128M in /conf/_advanced.php

128 Sep 04, 2009 03:13

Plugin updated to v1.6

Fixed all known bugs

129 May 29, 2011 00:57

The plugin is tested to work in b2evo 4

130 Mar 25, 2012 00:16

New version released: 1.7.0

A new "search in blog" panel is displayed if there are less than 7 public blogs in the system
[u]Compatible with b2evolution v4.1 and newer.[/u]

Note that older versions of b2evolutions are not supported since v1.7.0 of this plugin

132 Jun 20, 2012 17:07

Not search in Page. Only in Post... bad

133 Oct 06, 2012 10:25

Thank you very mutch!

Can you also link to to your blog where the plugin is installed?

135 Jul 28, 2014 16:39

Is there a way to customise the 'nothing to display' message? So far I've tried editing the code placed in the skin file, the search.disp file, and the plugin file. I see that by editing \inc\_core\ui\results\_results.class.php I can actually change the message, but I really don't want to hack the core as I will need to use a different styling for search on other blog pages.

136 Jul 28, 2014 18:18

Hello @fredsy,

My answer has two parts:

1) I have made a little addition in the Advanced Search Plugin (look it is v1.7.1 now), just for a better support of locales. So, you will need to update your site with the new code, and follow the instructions of the original README.txt file, which implies a little code addition in your current skin. This is meant to use the display_results method given by the plugin. Otherwise, you will use the standard method for empty results, and it will be more difficult to override the message as you need. Note: this way you will get a google-fashioned results list as well.

2) I don't know if your site is currently using en_US locale, however check the file advanced_search_plugin-en_US.zip attached to this comment, and take it as a base to replicate and modify accordingly if you want to use a different locale. You only need to put the en_US folder contained in the zip file inside the folder /plugins/advanced_search_plugin/locales, just next to the folder ru_RU which is shipped in the plugin package. That way you will override the default message hardcoded in the plugin.

If you want to read more about localizing plugins, please take a look of this page: http://b2evolution.net/man/localizing-plugins. There are several things that you should skip, but in general, the information may be useful.

Regards!


Attachments:

137 Jul 29, 2014 03:41

Thanks - turns out all I needed to do was upgrade the plugin and then edit the msg_nothing within the disp file. I really should remember to do that instead of using old copies on new sites... :P

138 Jul 29, 2014 06:36

Excellent @fredsy,

Actually, the update in the plugin was done due to your report. Just remember that by editing the hardcoded message in the disp file will make locales fail. However, if you won't use different locales at all, then your solution is good enough.

Regards!

139 Dec 14, 2014 09:12

I've just upgraded my blog to 5.2.0 and now the Advanced Search plugin is broken. The form is visible, but no matter what I type into the search box, it just reloads the current page. The url of the search page is supposed to be
http://www.mysite.com/blog.php?s=museum&in_blogs=All
but all that happens is the search defaults back to
http://www.mysite.com/blog.php

I'd appreciate a speedy answer as this is on a production site for a client. Thanks!

PS. I'd give up on this plugin and use the regular search but I don't like the fact that the b2evo search doesn't include all blogs.

140 Dec 14, 2014 10:22

Hi @fredsy,

The plugin works as supposed, the search results are displayed accordingly.

I guess you forgot this plugin requires a manual modification of the skin, please read the file README.html.

Regards!

141 Dec 16, 2014 06:23

@mgsolipa wrote earlier:

Hi @fredsy,

The plugin works as supposed, the search results are displayed accordingly.

I guess you forgot this plugin requires a manual modification of the skin, please read the file README.html.

Regards!

Actually, the skin is correctly modified and the plugin was working fine on a live site for the better part of six months: until I upgraded. Sorry, I should have mentioned that it was correctly installed as instructed. I have tested with the b2evo core search and that one works. I'm going to try and reinstall the Advanced Search and see if that helps.

142 Dec 22, 2014 08:45

Ok, I'm absolutely stuck. I can get the normal search function to work fine, but have no idea how to hack it so it shows all results from all blog pages; that and I don't want to waste time having to redo the style for the search results and form and then have to worry about redoing it for every upgrade. I'm getting no errors from Advanced Search and have no idea how to use the debug function. The skins are correctly edited to include the search results but there is literally nothing showing up when entering a search into the form - it's not even visible viewing source, even though the skin absolutely 100% includes the code. I've tried uninstalling and uploading a clean version of the plugin - nothing. I've unplugged other plugins to see if there's a conflict - nothing.

I know it's that time of year but if anyone has some time I'd really appreciate some help. I can PM the url of the site if anyone wants to take a look.

143 Dec 22, 2014 09:25

Hi @fredsy,

If you send me the URL, I can take a look and try to help you.

Regards!

144 Dec 24, 2014 09:35

Thanks for the help Mgsolipa!

145 Jan 13, 2015 14:35

After some investigation, it turns out the plugin needs to be updated. If you don't use the advanced search checkboxes (ie. the options to search by author, category, etc) then the plugin does not work. The workaround is to reselect those options in the widget, and then if necessary hide them using css. In order to search across blogs, you will need to add the ID of those blogs to the widget; using 'All' no longer works.

I don't have the skills to update the plugin as necessary, but I hope others can use this to do so or if they have the plugin and it stopped working for them too.

146 May 26, 2015 04:47

Hello Community,

I have a problem with this plugin in version 6.4.2 in B2Evolution and it is this error displayed.

Notice: Trying to get property of non-object in /[...]/blogs/plugins/advanced_search_plugin/_advanced_search.plugin.php on line 346

Fatal error: Call to a member function get_Item() on a non-object in /[...]/blogs/plugins/advanced_search_plugin/_advanced_search.plugin.php on line 350

How can I fix it? Thanks in advance.

147 Jun 26, 2015 17:37

HI alexi

I don't know if you've had any luck with this yet but I have the same problem.

The error is that an object called hasn't been created. I had a similar problem elsewhere and added code to check before proceeding

if (isset ($Item))

So I will look at this sometime, meanwhile this may provoke someone else to look into it

EDIT OK I decided to have a quick look

in [/plugins/advanced_search_plugin/_advanced_search.plugin.php]

So the object $MainList doesn't exist and causes the error
In version 6 some variable names have changed.

Line 341
Change from
if( $this->Settings->get('filter_results') )

To
if( $this->Settings->get('filter_results') and isset($MainList) )

Now I don't get the error messages but the plugin doesn't work i.e. there's no difference from the standard widget

148 Jul 08, 2015 00:15

@alexl @amoun: no way to test with 6.4.2 right now, but this plugin works as expected in a fresh 6.5.0 install.

149 Jan 21, 2019 19:52

Tried it and I get this.

Warning: Declaration of advanced_search_plugin::GetDefaultSettings() should be compatible with Plugin::GetDefaultSettings(&$params) in /home/somewhere/public_html/b2e/plugins/advanced_search_plugin/_advanced_search.plugin.php on line 14

Warning: Declaration of advanced_search_plugin::SkinBeginHtmlHead() should be compatible with Plugin::SkinBeginHtmlHead(&$params) in /home/somewhere/public_html/b2e/plugins/advanced_search_plugin/_advanced_search.plugin.php on line 14

Warning: Declaration of advanced_search_plugin::SkinTag($params) should be compatible with Plugin::SkinTag(&$params) in /home/somewhere/public_html/b2e/plugins/advanced_search_plugin/_advanced_search.plugin.php on line 14

Fresh install of 6.10.6-stable


Form is loading...