Table of Contents
Starred Plugin
Compatible with DokuWiki
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" unknown
- 2018-04-22 "Greebo" unknown
- 2017-02-19 "Frusterick Manners" yes
Installation
External requirements: This plugin requires the following additional components that must be installed separately:
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
After installation, you should include a link for users to save a page as favourite. Put the following into your template's main.php:
<?php //Starred $starred = plugin_load('action','starred'); if ($starred) $starred->tpl_starred(); ?>
Some templates, like the icke template already include this link on every page by default.
Using with Vector Template
Users of the vector template could also put following to dokuwiki/lib/tpl/vector/user/boxes.php
(NOT dokuwiki/lib/tpl/vector/conf/boxes.php
):
//show starred only if user has access to page. Works on wikis with disabled acl too. if (auth_quickaclcheck(getID()) >= AUTH_READ) { //check if sqlite plugin exists, labeled plugin requires it. if it doesn't exist or is disabled, vector template won't render if (!plugin_isdisabled('sqlite')) { $labeled = plugin_load('helper','labeled'); if ($labeled) { $_vector_boxes["labeled"]["headline"] = "toggle favorite"; $_vector_boxes["labeled"]["xhtml"] = $labeled->tpl_labels(false, false); //prevent printing } } }
Usage
To list the current user's saved pages, add {{starred}}
to a page. An optional minimal mode gives no text if the current user has starred no pages and leaves out the saving date: {{starred>min}}
. Finally, you might limit the number of shown pages: {{starred>min|5}}
and {{starred|5}}
, respectively.
Development
Change Log
- Merge pull request #1 from araname/patch-1 (2017-04-25 17:02)
- Version upped (2017-04-20 23:51)
- use a helper class (2017-04-20 12:52)
- blur after click (2017-04-20 11:55)
- use SVG instead of PNG icon (2017-04-20 11:44)
- added README (2017-04-20 11:14)
- Version upped (2016-06-16 17:18)
- Merge pull request #3 from micgro42/removeFromList (2016-06-14 21:00)
Known Bugs and Issues
Please report bugs and issues at: https://github.com/cosmocode/starred/issues