The Stars2 plugin let you add Rating, Difficulty, etc. stars
Compatible with DokuWiki
Similar to howhard
This Plugins was inspired by the original stars plugin. the improvements contain a better compatibility, nicer graphics, a toolbar integration and more syntax options.
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Stars can be created with two methods:
{{stars>num}}
{{stars>}}
{{stars>-1/5}}
{{stars>-5/5}}
{{stars>1/5}}
{{stars>2/5}}
{{stars>3/5}}
{{stars>4/5}}
{{stars>5/5}}
{{stars>5.5/7}}
{{stars>700/1000}}
The Plugin can be seen in action here
Did you install another Toolbar plugin? It only work with the original toolbar
Let me know
Toolbar doesn't work for me, I had to modify action.php like this for this toolbar to work :
<?php /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr <andi@splitbrain.org> * @author Zahno Silvan <zaswiki@gmail.com> */ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'action.php'); class action_plugin_stars extends DokuWiki_Action_Plugin { /** * return some info */ function getInfo(){ return array( 'author' => 'Zahno Silvan', 'email' => 'zaswiki@gmail.com', 'date' => '2011-02-17', 'name' => 'Stars', 'desc' => 'Embedding Rating Stars', 'url' => 'http://zawiki.dyndns.org/doku.php/tschinz:dw_stars', ); } /** * register the eventhandlers * * @author Andreas Gohr <andi@splitbrain.org> */ function register(&$controller){ $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array (5)); } function handle_toolbar(&$event, $param) { $event->data[] = array ( 'type' => 'picker', 'title' => $this->getLang('star'), 'icon' => '../../plugins/stars/images/toolbar/star.png', 'list' => array( array( 'type' => 'insert', 'title' => $this->getLang('star1'), 'icon' => '../../plugins/stars/images/toolbar/star1.png', 'insert' => '{{stars>1/5}}', ), array( 'type' => 'insert', 'title' => $this->getLang('star2'), 'icon' => '../../plugins/stars/images/toolbar/star2.png', 'insert' => '{{stars>2/5}}', ), array( 'type' => 'insert', 'title' => $this->getLang('star3'), 'icon' => '../../plugins/stars/images/toolbar/star3.png', 'insert' => '{{stars>3/5}}', ), array( 'type' => 'insert', 'title' => $this->getLang('star4'), 'icon' => '../../plugins/stars/images/toolbar/star4.png', 'insert' => '{{stars>4/5}}', ), array( 'type' => 'insert', 'title' => $this->getLang('star5'), 'icon' => '../../plugins/stars/images/toolbar/star5.png', 'insert' => '{{stars>5/5}}', ), array( 'type' => 'insert', 'title' => $this->getLang('star_not_rated'), 'icon' => '../../plugins/stars/images/toolbar/starnry.png', 'insert' => '{{stars>-1/5}}', ), ) ); } }
I replace 'type' ⇒ 'format' with 'type' ⇒ 'insert', then replace 'open' with 'insert' and remove line 'close'
I don't know if it's really the way it should be write (cf toolbar) but it works fine. This is also the way I use for a plugin I'm developing.
— Fabrice 04/02/2012 11:15
Let me know
None
Discuss here