EE entry rating module

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

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"

pi.itsnew.zip


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 whats 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 whats right.<br />
<
em>Isaac</em></b></p>

instead of ...

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

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


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.