plugin:bookmark
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:bookmark [2018-05-30 20:58] – Klap-in | plugin:bookmark [2021-03-14 22:50] (current) – [Allow space and dash in bookmarkname] davidtango | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : otto@valjakko.net | email : otto@valjakko.net | ||
type : Syntax | type : Syntax | ||
- | lastupdate : 2005-08-01 | + | lastupdate : 2020-07-14 |
- | compatible : 2010-11-07 2011-05-25, angua, weatherwax | + | compatible : Frusterick Manners, Greebo, Hogfather |
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
tags : bookmark, links, anchor | tags : bookmark, links, anchor | ||
- | downloadurl: | + | downloadurl: |
bugtracker : | bugtracker : | ||
sourcerepo : | sourcerepo : | ||
Line 23: | Line 23: | ||
With this plugin you can insert a bookmark to your page. The format is | With this plugin you can insert a bookmark to your page. The format is | ||
- | < | + | < |
This will insert code | This will insert code | ||
< | < | ||
- | <a name='bookmark_name'></ | + | <a name='bookmarkname' |
</ | </ | ||
Line 34: | Line 34: | ||
< | < | ||
- | [[namespace: | + | [[namespace: |
</ | </ | ||
Line 41: | Line 41: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Install with Plugin Manager | + | Install with Plugin Manager |
+ | ===== Feature request ===== | ||
- | ==== Plugin | + | ==== Optional Class tag ==== |
- | Create | + | Suggestion: add an option to specify a class for a bookmark, to provide for easy CSS styling of the anchor_text. For example, %%< |
- | '' | + | Use case: **%%< |
- | <file php lib/ | + | ==== Allow space and dash in bookmarkname ==== |
- | <?php | + | |
- | /** | + | |
- | * Plugin bookmark: Creates a bookmark to your document. | + | |
- | * | + | |
- | * @license | + | |
- | * @author | + | |
- | */ | + | |
- | if(!defined(' | + | Suggestion: by allowing |
- | if(!defined(' | + | |
- | require_once(DOKU_PLUGIN.' | + | |
- | + | ||
- | /** | + | |
- | * All DokuWiki plugins to extend the parser/ | + | |
- | * need to inherit from this class | + | |
- | */ | + | |
- | class syntax_plugin_bookmark extends DokuWiki_Syntax_Plugin { | + | |
- | + | ||
- | /** | + | |
- | * return some info | + | |
- | */ | + | |
- | function getInfo(){ | + | |
- | return array( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | } | + | |
- | + | ||
- | /** | + | |
- | * What kind of syntax are we? | + | |
- | */ | + | |
- | function getType(){ | + | |
- | return ' | + | |
- | } | + | |
- | + | ||
- | function getSort(){ return 357; } | + | |
- | + | ||
- | function connectTo($mode) { | + | |
- | $this-> | + | |
- | } | + | |
- | + | ||
- | + | ||
- | /** | + | |
- | * Handle | + | |
- | */ | + | |
- | function handle($match, | + | |
- | $match = substr($match, | + | |
- | return array(strtolower($match)); | + | |
- | } | + | |
- | + | ||
- | /** | + | |
- | * Create output | + | |
- | */ | + | |
- | function render($mode, | + | |
- | if($mode == ' | + | |
- | $renderer-> | + | |
- | return true; | + | |
- | } | + | |
- | return false; | + | |
- | } | + | |
- | } | + | |
- | ?> | + | |
- | </ | + | |
- | + | ||
- | <file txt lib/ | + | |
- | base | + | |
- | author Otto Vainio | + | |
- | email otto@valjakko.net | + | |
- | date | + | |
- | name | + | |
- | desc | + | |
- | url https:// | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | ===== Discussion ===== | + | |
- | + | ||
- | I Installed this plugin, but this script didn't work. I tried to use the syntax but it didn't work. | + | |
- | Is there any manual or samples about this plugin? | + | |
- | + | ||
- | Hi. Remember | + | |
- | ''< | + | |
- | With the < and > marks. < | + | |
- | --- //[[otto@valjakko.net|Otto Vainio]] 2006-09-04 12:08// | + | |
- | + | ||
- | ---- | + | |
- | While it works nicely with Firefox, it does not work for me with MSIE 6.0.2800.1106CO SP1, unless is hack the syntax.php | + | |
- | <code> | + | |
- | <a name=' | + | |
- | </ | + | |
- | Yes I know that MSIE sucks, but DokuWiki uses the same trick for the anchor tags automatically generated for headings... --- // | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | Hi ! I just love this plugin. But I failed | + | |
- | + | ||
- | | + | |
- | + | ||
- | Does not work ... | + | |
- | [[MAE@DerPatriot.com|Markus A. Engelkamp]] | + | |
- | \\ | + | |
- | Hi, | + | |
- | + | ||
- | Is it possible | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | This plugin doesn' | + | |
- | > It works well for me with the DokuWiki Release 2009-12-25c " | + | |
- | > | + | |
- | > Jean | + | |
- | + | ||
- | > I tested it with release 2013-05-10a " | + | |
- | > --- [[user> | + | |
- | ---- | + | |
- | + | ||
- | > I tested it with release 2014-05-05a " | + | |
- | + | ||
- | It would be great if other characters, apart from word characters (\w) are allowed in the anchor name. I.e. I have modified syntax.php, line 43 to " | + | |
- | + | ||
- | > I tested it with the most recent release 2015-08-10 " | + | |
- | > Joachim | + | |
- | + | ||
- | > EDIT: 2017-04-09 | + | |
- | > Tested with current version - Release 2017-02-19b " | + | |
- | \\ | + | |
- | needed following code to get stuff working. The anchor is hidden - just an empty a tag as it seems from source-code | + | |
- | + | ||
- | < | + | |
- | + | ||
- | < | + | |
- | + | ||
- | [[your: | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | > MSZ | + | |
plugin/bookmark.1527706682.txt.gz · Last modified: 2018-05-30 20:58 by Klap-in