Trimmer
Plugins
All this little plugin does is cutting X characters from the beginning and / or the end of a given text and returns the trimmed string.
Tag:
{exp:trimmer}{/exp:trimmer}
Parameters:
left="X”
cuts X characters from the beginning of a text
right="X”
cuts X characters from the end of a text
Example:
{exp:trimmer left="3" right="4"}
<p>Some text to trim.</p>
{/exp:trimmer}
returns:
Some text to trim.
EE entry rating module
Modules
I finally could force myself to write up at least a rough documentation for an entry rating module I made some time ago. So here it comes.
Features / characteristics are:
- independent from comments
- can be restricted to logged-in members only
- voting results from members and visitors may be shown separately or overall
- rating-form is either drop-down with configurable options or radio-inputs from 1 to 5
- result output either with images (like the stars here) or numbers or both - can be defined with variables in the template
- works on single- and multi-entry pages
- {exp:weblog:entries} can be used to list entries sorted by highest ratings.
- one vote per member per entry allowed
- one vote per IP per entry allowed
You can see it in action over here.
It’s new
Plugins
This simple little plugin can be used to display some content (like an image) based on the age of an entry.
If the entry has been posted within the number of days specified, the content inside the tag-pair is returned.
Example:
{exp:itsnew date="{entry_date}" days="10"}
<img src="new.gif" />
{/exp:itsnew}
If the entry is older than 10 days nothing is returned otherwise the image will be displayed.
Parameters:
This one is mandatory.
date="{entry_date}"
Optional. Number of days to compare against entry_date. Defaults to 30.
days="10"
Search Marker Plugin
Plugins
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}
TruncHTML - Yet another text limiter
Plugins
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…
<p 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 ...
<p 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 ...
<p 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.

