Search Marker Plugin

When using the EE search module, this plugin will highlight the search terms on the results-page by surrounding them with <span class="marker"></span>.

This plugin is only intended to be used on a search results page, that is, inside {exp:search:search_results}{/exp:search:search_results}.

Step one:
Add the following style to your CSS and modify the color as you see fit.

.marker { background-color#ff0; }

Step two:
Wrap your fields with the plugin tags.

{exp:search_marker}
   
<p>{summary}</p>
    <
p>{body}</p>
{/exp:search_marker}

pi.search_marker.zip


TruncHTML - Yet another text limiter

Most current version is 1.2.2

  • Truncates HTML/Text after the specified number of characters.
  • Does not count characters in HTML-tags.
  • Does not cut-off in the middle of tags.
  • Closes all open tags.

So if you limit the following text to 80 chars…

<class="quote"><b>Never let your sense of morals get in the way of doing what's right.<br />
<em>Isaac Asimov</em></b></p>

the result will be ...

<class="quote"><b>Never let your sense of morals get in the way of doing what's right.<br />
<em>Isaac</em></b></p>

instead of ...

<class="quote"><b>Never let your sense of morals get in the way of doing what's

... which would probably screw the rest of the page.


Strip Linebreaks

This plugin strips any new lines and carriage returns from the text between its tags.

Example:

{exp:strip_lb}
some text
<br />
some more text<br />
even more text<br />
{/exp:strip_lb}

returns:

some text<br />some more text<br />even more text<br />

pi.strip_lb.zip


Plugin: Category Parent Style

This plugin applies a custom CSS-class to categories that have subcategories using {exp:weblog:categories}.


3-level expanding category based menu

In a project I have some “static pages” organized using categories and subcategories. There is a weblog for the content of the pages and every entry has an accompanying category. The menu was generated with the nested {exp:weblog:categories}-tag. The currently active menu-item had to have a different style associated. You’d normally do this by comparing the category name with an URL-segment.

However a further requirement was that the menu was supposed to expand. At first only the parent categories are to be shown. When a category is selected, its subcategories should show up. Only the subcategories of the selected category and only the 1st-level subcategories. When a 1st-level subcategory is selected, the corresponding 2nd-level subcategories are supposed to show up - if there are any.

I found no way to implement this behaviour using built-in functionality and hard-coding the menu was not an option since the process of adding a new page into the hierachy should be limited to adding a new category and writing an entry assigned to this category.

I ended up with writing a little plugin.


Page 4 of 5 pages « Erste  <  2 3 4 5 >

About

Here you'll find some scripts and other stuff that might be useful, entertaining or even something completely different.