Page 1 of 1

Suggestion for search results of static pages

Posted: Wed Jul 16, 2008 5:14 pm
by Cenic
Hi,

I installed s9y a couple of days ago for the first time. I started playing around with some static pages and noticed that search results contain HTML tags (which I consider disturbing). Maybe you would like to implement the following change in plugins/serendipity_event_staticpage/plugin_staticpage_searchresults.tpl:

Instead of

Code: Select all

{$result.content|@escape:htmlall|@truncate:200:" ... "}
I used

Code: Select all

{$result.content|@strip_tags|@strip|@truncate:200:" ... "}
Looking at the smarty docs it seems that @strip_tags seems to be the prefered way of removing the tags. I also added @strip to collapse multiple spaces.

Regards,
Stefan

Re: Suggestion for search results of static pages

Posted: Thu Jul 17, 2008 9:37 am
by garvinhicking
Hi!

That's a better idea, yes. I just committed it to the tmeplate.

Regards,
Garvin

Posted: Sat Jul 19, 2008 5:04 pm
by Don Chambers
Good idea - I committed this suggestion to bulletproof for both 1.3 branch and 1.4 trunk.

Posted: Sat Jul 19, 2008 5:39 pm
by Don Chambers
Now that I have added this to bp, it makes me wonder about something else, but I am not quite sure how to "fix" it.

If a quicksearch returns both entries and static page results, and the entries are multiple pages, the static page results appear on each page because they are displayed via {serendipity_hookPlugin hook="entries_footer"}. Any suggestions as to how to only display them on the first page?

Posted: Tue Jul 22, 2008 9:47 am
by garvinhicking
Hi!

You could check for the GET variable that contains the page number? Or check the page number via Smarty itself, that is also used in the pagination output of entries.tpl.

Regards,
Garvin