Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jmdeldin/jmd_rate

Textpattern plugin: CSS star rater (old, unsupported).
https://github.com/jmdeldin/jmd_rate

Last synced: about 1 month ago
JSON representation

Textpattern plugin: CSS star rater (old, unsupported).

Awesome Lists containing this project

README

        

h1. jmd_rate: A CSS Star Rater

@@ is a CSS star rater that features "customizable output":#jmd_rate_tags and a rating-CSS generator.

h2(#requirements). Requirements

* TXP 4.0.6
* PHP 5
* A star image ("example image":http://jmdeldin.com/txp/jmd_star_stars.png, "Illustrator file":http://jmdeldin.com/txp/jmd_star_stars.ai)

h2(#jmd_rate_tags). Tag overview

|_. Tag |_. Attributes |_. Context |_. Description |
| @@ | "class, stars, star_width, wraptag":#jmd_rate | Article | Required container tag |
| @@ | - | @jmd_rate@ | Displays rater |
| @@ | - | @jmd_rate@ | Checks for votes |
| @@ | - | @jmd_rate@ | Maximum rating possible |
| @@ | - | @if_jmd_rate_votes@ | Returns the current rating |
| @@ | "singular, plural":#jmd_rate_votes | @if_jmd_rate_votes@ | Returns the number of votes |
| @@ | - | @jmd_rate@, @if_jmd_rate_votes@ | Checks if the user has voted |
| @@ | "max_value, min_value, sort":#jmd_rate_article | Anywhere | Article custom for ratings |

h2(#jmd_rate_example). Example

bc.. Either in an article or article form:



Currently rated /
after
.




This article hasn’t been rated.




Thanks for voting.


h3(#jmd_rate). @@

|_. Attribute |_. Available values |_. Default value |_. Description |
| @class@ | @rating@ | @rating@ | Class for @wraptag@ |
| @stars@ | INT(Integer) | 4 | Number of stars (maximum value) |
| @star_width@ | INT | 19 | Width of a single star |
| @wraptag@ | * | @div@ | Container HTML element |

bc.

h3(#jmd_rate_votes). @@

|_. Attributes |_. Available values |_. Default value |_. Description |
| @singular@ | - | - | Text displayed for one vote |
| @plural@ | - | - | Text displayed for multiple votes |

bc.

h3(#jmd_rate_article). @@

@@ is an @article_custom@ tag that displays articles based on rating-range. You

|_. Attributes |_. Available values |_. Default value |_. Description |
| @max_rating@ | INT | - | Maximum rating |
| @min_rating@ | INT | - | Minimum rating |
| @sort@ | ASC, DESC | DESC | Sort order of articles, based on rating |
| @form@ | * | default | Article form used for display. |

Standard article_custom attributes: author, category, form, keywords, month, section

bc.. Page or form template:



Article form: highest_rated




  • :

    /