Recent Topics

[Plugin] Advanced Search

Thread started by , Tue May 20, 2008 16:19 – Last touched: Fri Aug 28, 2015 05:01
Started by , 05/20/08

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!

Comment from:

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

05/20/08 @ 16:56

Comment from:

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,

05/20/08 @ 17:00

Comment from:

Thanks

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

05/20/08 @ 17:06

Comment from:

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 ;)

05/20/08 @ 18:22

Comment from:

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 ;)

05/20/08 @ 23:38

Comment from:

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

05/21/08 @ 08:58

Comment from:

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.

05/21/08 @ 10:39

Comment from:

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 ;)

05/21/08 @ 10:52

Comment from:

Do you mean something like this?

Code

+ 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.

05/21/08 @ 11:00

Comment from:

sam2kb wrote:

Do you mean something like this?

Code

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

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

05/21/08 @ 11:11

Comment from:

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!

05/23/08 @ 17:20

Comment from:

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..

05/25/08 @ 01:09

Comment from:

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

Many thanks

06/19/08 @ 10:27

Comment from:

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

06/19/08 @ 17:40

Comment from:

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 .

06/21/08 @ 17:36

Comment from:

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 :(

06/21/08 @ 19:41

Comment from:

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

06/29/08 @ 07:40

Comment from:

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)

06/29/08 @ 13:53

Comment from:

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

;)

06/29/08 @ 14:29

Comment from:

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'.

06/29/08 @ 20:32

Comment from:

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?

08/16/08 @ 13:15

Comment from:

You can use this code in skin

PHP

// --------------------------------- 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 ---------------------------------
08/16/08 @ 15:24

Comment from:

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

Code

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

Comment from:

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

PHP

SkinWidgetwidget_codeparam array );

¥

08/16/08 @ 18:02

Comment from:

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

PHP

skin_widgetarray(
    // CODE for the widget:
    'widget'        => 'advanced_search',
));
08/17/08 @ 01:01

Comment from:

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.

08/22/08 @ 15:57

Comment from:

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

¥

08/22/08 @ 16:55

Comment from:

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

08/22/08 @ 20:57

Comment from:

Plugin updated

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

11/02/08 @ 01:15

Comment from:

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 ?

11/02/08 @ 03:49

Comment from:

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.

11/02/08 @ 04:11

Comment from:

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

11/02/08 @ 04:34

Comment from:

sam2kb wrote:

There's no way to highlight post title.

it does not highlight the post content either it seems

11/02/08 @ 14:41

Comment from:

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 :)

11/02/08 @ 18:48

Comment from:

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..

11/02/08 @ 19:37

Comment from:

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.

11/02/08 @ 19:59

Comment from:

Hello.

I just installed this plugin as it looks really neat.

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

Thanks.

11/16/08 @ 07:26

Comment from:

Edit the following on line 370, list user IDs.

PHP

foreach( $UserCache->cache as $loop_Obj )
{
    switch( $loop_Obj->ID )
    {
        case 2:
        case 14:
        case 23:
            continue;
            break;
    }
11/16/08 @ 07:36

Comment from:

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.

11/16/08 @ 08:05

Comment from:

sam2kb wrote:

Edit the following on line 370, list user IDs.

PHP

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:

PHP

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.

11/16/08 @ 08:48

Comment from:

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.

11/16/08 @ 17:47

Comment from:

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

11/17/08 @ 04:29

Comment from:

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.

11/18/08 @ 10:12

Comment from:

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.

11/19/08 @ 05:34

Comment from:

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.

11/19/08 @ 06:24

Comment from:

Thanks.

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

Take care.

11/19/08 @ 06:40

Comment from:

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.

01/29/09 @ 03:54

Comment from:

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

01/29/09 @ 04:19

Comment from:

Thanks for your reply, sam2kb.

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

01/29/09 @ 06:02

Comment from:

Hello sam2kb.

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

How can the search incorporate 'pages'?

Thanks.

02/17/09 @ 03:10

Comment from:

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

PHP

if( $disp == 'page' )
{    // Get  pages:
    $MainList->set_default_filtersarray(
            'types' => '1000',        // pages
        ) );
}
 
if( $disp == 'posts' && param's''string' ) )
{
    $MainList->set_default_filtersarray(
            'types' => NULL,        // All types
        ) );
}

Good luck

02/17/09 @ 03:21

Comment from:

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]

04/24/09 @ 00:49

Comment from:

in /skins/miami_blue/style.css add:

PHP

#cat {
width180px;
}
.input select{
width180 px;
}

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

Good luck

04/24/09 @ 03:32

Comment from:

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?

04/25/09 @ 01:48

Comment from:

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

PHP

/*
 * Categories:
 */
if( $params['search_cat'] )
{
    $ChapterCache = & get_Cache'ChapterCache' );
    
    $Form->select_input_options(
            'cat',
            $ChapterCache->recurse_selectNULL$Blog->IDfalseNULL1$category_exclude ),
            $params['in_category']
        );
}
04/26/09 @ 17:49

Comment from:

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.

04/26/09 @ 17:59

Comment from:

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?

05/08/09 @ 12:48

Comment from:

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.

05/08/09 @ 14:19

Comment from:

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

05/08/09 @ 14:29

Comment from:

...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.

05/08/09 @ 14:42

Comment from:

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 :-)

05/08/09 @ 14:48

Comment from:

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

Code

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

becomes

Code

<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]

05/08/09 @ 15:09

Comment from:

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?

05/08/09 @ 15:13

Comment from:

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

05/08/09 @ 15:16

Comment from:

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

05/08/09 @ 15:22

Comment from:

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

Code

.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.

05/08/09 @ 15:23

Comment from:

Thanks.

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

05/08/09 @ 15:42

Comment from:

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

07/09/09 @ 06:03

Comment from:

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..

07/11/09 @ 06:20

Comment from:

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.

07/11/09 @ 06:39

Comment from:

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.

07/11/09 @ 06:58

Comment from:

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...

07/11/09 @ 07:06

Comment from:

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.

07/11/09 @ 07:09

Comment from:

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

07/11/09 @ 07:18

Comment from:

@esanchez

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

PHP

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

with

PHP

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.

07/11/09 @ 07:43

Comment from:

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?

07/11/09 @ 07:51

Comment from:

Plugin updated to v1.1

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

07/12/09 @ 09:34

Comment from:

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

07/14/09 @ 03:42

Comment from:

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

07/14/09 @ 04:26

Comment from:

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

in the disp file change

Code

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

to

Code

$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 ),
      ) );
07/24/09 @ 23:39

Comment from:

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?

07/25/09 @ 07:40

Comment from:

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)

Code

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.

07/25/09 @ 08:43

Comment from:

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

PHP

'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

07/25/09 @ 09:02

Comment from:

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.

07/25/09 @ 09:13

Comment from:

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.

PHP

$this->search_mode param'sentence''string' );

to

PHP

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

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

07/25/09 @ 09:27

Comment from:

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.

07/25/09 @ 09:35

Comment from:

chrissie1 wrote:

thanks for all the help BTW.

No problem.

Try this for now

PHP

global $m;
$adv_MainList->page_linksarray(
        '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 ;)

07/25/09 @ 09:41

Comment from:

I'm back :)

And this to the disp file

PHP

$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_linksarray(
        'block_start' => '<div class="BlUeBaR">'.$this->T_('Pages:').' ',
        'block_end'   => '</div>',
        'page_url' => url_add_param$Blog->gen_blogurl(), $url_params ),
    ) );
07/25/09 @ 17:17

Comment from:

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 ?

08/25/09 @ 18:52

Comment from:

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

08/25/09 @ 22:00

Comment from:

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

08/25/09 @ 22:30

Comment from:

Make sure the rendering is set to stealth in plugin settings

08/25/09 @ 22:35

Comment from:

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

08/25/09 @ 23:08

Comment from:

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 ?

08/25/09 @ 23:30

Comment from:

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

Code

// 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 ;)

08/25/09 @ 23:56

Comment from:

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.

08/26/09 @ 00:07

Comment from:

I must be very stupid
You mean this

Code

<?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();
        }
?>
08/26/09 @ 00:14

Comment from:

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

08/26/09 @ 00:18

Comment from:

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 ;)

08/26/09 @ 00:21

Comment from:

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.

08/27/09 @ 10:24

Comment from:

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

08/27/09 @ 10:38

Comment from:

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

08/27/09 @ 16:18

Comment from:

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

08/27/09 @ 16:59

Comment from:

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

03/25/12 @ 00:16

Comment from:

Thank you very mutch!

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

10/06/12 @ 10:25

Comment from:

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.

07/28/14 @ 16:39

Comment from:

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:
07/28/14 @ 18:18

Comment from:

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

07/29/14 @ 03:41

Comment from:

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!

07/29/14 @ 06:36

Comment from:

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.

12/14/14 @ 09:12

Comment from:

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!

12/14/14 @ 10:22

Comment from:

@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.

12/16/14 @ 06:23

Comment from:

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.

12/22/14 @ 08:45

Comment from:

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.

01/13/15 @ 14:35

Comment from:

Hello Community,

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

Code

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.

05/26/15 @ 04:47

Comment from:

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

06/26/15 @ 17:37
powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.