2 of 2
2
Plugin: Excerpt
Posted: 09 May 2008 07:27 PM   [ Ignore ]   [ # 19 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  137
Joined  10-10-2002

This seems to only be working correctly with single word searches. If I try doing a search with multiple words, even if I choose exact phrase, I get oodles of unrelated chunks. Is that because the plugin doesn’t realize I want the exact phrase so it’s just putting chunks that contain any of the words? I can’t very well depend on my users to only search for a single word.

Also, when I do search for a single word, some of the results come back displaying no chunks, whereas some are just fine.

Profile
 
 
Posted: 11 May 2008 05:58 AM   [ Ignore ]   [ # 20 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  637
Joined  03-22-2006

Hi Fitzage,

The plugin is only set up to search for single words, so supplying a multiple word search will highlight whether exact phrase or not. The reason is because there is no way to tell what type of search was made. Because EE will return only relevant search results though it seemed reasonable for this behaviour.

As for no matches that could be because the search has found your search term in a custom field that isn’t between the plugin tags?

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 15 May 2008 02:53 PM   [ Ignore ]   [ # 21 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  137
Joined  10-10-2002

Well, the no results thing is weird because I checked the articles in question and they had oodles of results.

As far as the rest goes, I can’t really use the plugin if it’s going to search individually for every word in a phrase, because you can’t prevent people from typing phrases that include very small and common words.

Profile
 
 
Posted: 22 May 2008 10:26 AM   [ Ignore ]   [ # 22 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1351
Joined  08-02-2006
Daniel Walton - 11 May 2008 09:58 AM

Hi Fitzage,

The plugin is only set up to search for single words, so supplying a multiple word search will highlight whether exact phrase or not. The reason is because there is no way to tell what type of search was made. Because EE will return only relevant search results though it seemed reasonable for this behaviour.

As for no matches that could be because the search has found your search term in a custom field that isn’t between the plugin tags?

Hi Daniel,

I was going to ask the same question that fitzage asked. When searching for a single word, the plugin works great. When searching for a phrase with multiple words, I still get relevant results but nothing is highlighted in the search results. I would expect that the whole phrase would be highlighted (if it matches of course) or if nothing else, any word matching any of those in the search query would be highlighted?

In your response above you said:

so supplying a multiple word search will highlight whether exact phrase or not

Am I understanding that correctly in that a multiple word search should still highlight the exact phrase (if found) or single words from the search?

 Signature 

Deron Sizemore
==========
LogoGala | Kentucky Golfing
Twitter: Deron Sizemore | LogoGala

Profile
 
 
Posted: 19 August 2008 05:04 PM   [ Ignore ]   [ # 23 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  140
Joined  07-11-2008

Really great plug in, having problems with the following tag:

{exp:zm_excerpt chunk_wrap="none" pre_chars="5" post_chars="5" chunk_prepend="..." chunks="1"

Gives me “Notice: Array to string conversion in /usr/local/pem/vhosts/103582/webspace/httpdocs/tru-vue_system/plugins/pi.zm_excerpt.php on line 281 Notice: Array to string conversion in /usr/local/pem/vhosts/103582/webspace/httpdocs/tru-vue_system/plugins/pi.zm_excerpt.php on line 289” for each search result…

Removing the pre and post chars fixes the error, (I tried numbers besides 5, including 50 and 100)

Also, still get a span tag despite the “none” even when using

{exp:zm_excerpt chunk_wrap="none" chunks="1"

though it causes no problems so I don’t really worry about it…

Thanks for your time…

 Signature 

Maybe you’d like to say hello to the elbow?

Profile
 
 
Posted: 20 April 2009 01:33 PM   [ Ignore ]   [ # 24 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  258
Joined  09-16-2004

Excerpt is an excellent plugin, thanks. Just wondering: I’m finding that if the search terms don’t appear in my designated custom field, then it seems nothing at all is returned. Is that correct? I’d like that if the search terms don’t appear then at least the excerpt of the field would be displayed as per the default behaviour of exp:search_results.

Does anyone know if that’s correct and if so how can I avoid having no results returned in this case?

Many thanks.

 Signature 

Definition // Simply effective websites - web design based in Hull and East Yorkshire

Profile
 
 
Posted: 20 April 2009 08:15 PM   [ Ignore ]   [ # 25 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  637
Joined  03-22-2006

That is correct. Why don’t you include all fields?

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 21 April 2009 02:38 AM   [ Ignore ]   [ # 26 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  258
Joined  09-16-2004

Hi Daniel - I’m not sure how you mean? Could you give me an example? Currently I have this in my search results template:

{exp:zm_excerpt output_wrap="p"}{full_text}{/exp:zm_excerpt} 

Thanks for your help.

 Signature 

Definition // Simply effective websites - web design based in Hull and East Yorkshire

Profile
 
 
Posted: 21 April 2009 02:48 AM   [ Ignore ]   [ # 27 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  258
Joined  09-16-2004

Ah! You mean I can put regular custom fields in there too?! If that’s what you mean, I really did not know that! Wow!!!

If you mean something else then let me know, but otherwise I’m sorted smile

 Signature 

Definition // Simply effective websites - web design based in Hull and East Yorkshire

Profile
 
 
Posted: 21 April 2009 04:45 AM   [ Ignore ]   [ # 28 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  258
Joined  09-16-2004

Just to be sure, do you mean simply place every custom field I want to include in the search result, one after the other, like this?

{exp:zm_excerpt output_wrap="p"}{custom_field_1}{custom_field_2}{custom_field_3}{custom_field_4}{custom_field_5}..{/exp:zm_excerpt} 

Just so I’m not missing a trick.

 Signature 

Definition // Simply effective websites - web design based in Hull and East Yorkshire

Profile
 
 
Posted: 25 April 2009 11:39 AM   [ Ignore ]   [ # 29 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  637
Joined  03-22-2006

Hi Dave,

That is precisely what I meant smile

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 27 April 2009 04:19 AM   [ Ignore ]   [ # 30 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  258
Joined  09-16-2004

It works a treat. Thanks very much indeed Daniel, wonderful plugin.

 Signature 

Definition // Simply effective websites - web design based in Hull and East Yorkshire

Profile
 
 
Posted: 19 August 2009 10:42 AM   [ Ignore ]   [ # 31 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  133
Joined  07-30-2009

Hi Daniel

great idea but can’t get it to work. The code:

{exp:search:search_results} 
<a href="{auto_path}">{title}</a><br/>
{exp:zm_excerpt output_wrap="p"}{full_text}{/exp:zm_excerpt}
{
/exp:search:search_results} 

doesn’t create a result other than a link list, no formated full text.

Am I missing something? I have installed the php file in plugins. what else?

EE version 1.6.8

mnay thanks

Profile
 
 
Posted: 30 April 2010 03:41 PM   [ Ignore ]   [ # 32 ]  
Summer Student
Avatar
Total Posts:  27
Joined  06-13-2005

This is a great plugin!

I’ve found a small issue, but relevant on a site that will have search terms derived of the chunk_wrap parameter.

For example, a search for “spa” results in the following source html:

<<strong>spa</strong>n>pre-fab shower stall for a walk-in one fit for <strong>spa</strong>. And, the 1970s called and they want their vanity... </<strong>spa</strong>n><<strong>spa</strong>n>Sheryl Doyle. &ldquo;Homeowners are desiring a <strong>spa</strong>-like feelRain shower headsbody sprayers,... </<strong>spa</strong>n><<strong>spa</strong>n>&ldquo;We replaced the standard tub with a <strong>spa</strongtub and shower combo with shower body sprays and... </<strong>spa</strong>n

It would appear that Excerpt finds the “spa” in “span” and hilites it dutifully, though this is not the desired effect. Presumably, “span” or “pan” would be an issue too.

Profile
 
 
Posted: 01 May 2010 06:44 PM   [ Ignore ]   [ # 33 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  637
Joined  03-22-2006

@bigmikestudios

Which version of the plugin are you using? Reason I ask is because the latest (1.03) should remove any html from the subject text.

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 01 May 2010 07:23 PM   [ Ignore ]   [ # 34 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  637
Joined  03-22-2006

Nevermind, ignore my response above.

I would recommend that anyone using a previous version of this plugin update to the latest version.

 Signature 

(a.k.a the_butcher)

Profile
 
 
   
2 of 2
2