plugin:button
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:button [2020-05-11 21:18] – rpeyron | plugin:button [2025-03-29 16:06] (current) – New release & Kaos compatibility update rpeyron | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : remi+dokuwiki@via.ecp.fr | email : remi+dokuwiki@via.ecp.fr | ||
type : syntax | type : syntax | ||
- | lastupdate : 2020-05-11 | + | lastupdate : 2025-03-29 |
- | compatible : Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor Of Tsort, Frusterick Manners, Greebo | + | compatible : Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor Of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
tags : button, links | tags : button, links | ||
Line 26: | Line 26: | ||
===== Examples/ | ===== Examples/ | ||
- | Below is a screenshot of a basic resulting button : | + | Below is a screenshot of a basic resulting button: |
- | {{http:// | + | {{http:// |
===== Syntax ===== | ===== Syntax ===== | ||
- | The full syntax is : | + | The full syntax is: |
< | < | ||
[[{namespace: | [[{namespace: | ||
</ | </ | ||
- | Where : | + | Where: |
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
- | * '' | + | * targets with %%://%% or %%mailto:%% are treated as external URI; |
+ | * you may also use '' | ||
+ | * protocol has to be allowed in dokuwiki, check [[: | ||
+ | * '' | ||
- | All fields are optional, so the minimal syntax is : | + | All fields are optional, so the minimal syntax is: |
< | < | ||
[[{}Simple button without image]] | [[{}Simple button without image]] | ||
</ | </ | ||
- | You may configure some styles to use in your buttons without repeating all the css : | + | You may configure some styles to use in your buttons without repeating all the css: |
< | < | ||
[[{conf.styles}style|css]] | [[{conf.styles}style|css]] | ||
</ | </ | ||
- | Where : | + | Where: |
* '' | * '' | ||
- | * '' | + | * '' |
+ | * if ‘default’, | ||
* '' | * '' | ||
- | You may then use the '' | + | You may then use the '' |
< | < | ||
- | Style declaration : | + | Style declaration: |
[[{conf.styles}default|font-family: | [[{conf.styles}default|font-family: | ||
[[{conf.styles}mystyle|color: | [[{conf.styles}mystyle|color: | ||
- | Style use : | + | Style use: |
[[{|mystyle}Button in times new roman]] | [[{|mystyle}Button in times new roman]] | ||
[[{}Button in green and in times new roman]] | [[{}Button in green and in times new roman]] | ||
</ | </ | ||
- | You may also add styles that will be available for all pages in the plugin section of the configuration page. You will have to add one line per style : | + | You may also add styles that will be available for all pages in the plugin section of the configuration page. You will have to add one line per style: |
< | < | ||
default|font-family: | default|font-family: | ||
Line 77: | Line 81: | ||
Note that the CSS part is a bit tricky due to the selectors used in the template CSS and the layout needed for the button. By default, the style of the links is not repeated (just external links icon). See comments in style.css file for more information. | Note that the CSS part is a bit tricky due to the selectors used in the template CSS and the layout needed for the button. By default, the style of the links is not repeated (just external links icon). See comments in style.css file for more information. | ||
- | You may also configure the target of the link with the use of conf.target : | + | You may also configure the target of the link with the use of conf.target: |
< | < | ||
[[{conf.target}style|target]] | [[{conf.target}style|target]] | ||
Line 89: | Line 93: | ||
A button is added to the toolbar to add the template button. | A button is added to the toolbar to add the template button. | ||
Compatible with move plugin. | Compatible with move plugin. | ||
+ | \\ | ||
+ | ==== Center Button ==== | ||
+ | [[{buttons: | ||
+ | \\ | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
Line 97: | Line 105: | ||
===== Contributions ===== | ===== Contributions ===== | ||
- | Feel free to contribute to this plugin: source on GitHub: [[https:// | + | Feel free to contribute to this plugin source on GitHub: [[https:// |
- | Thank you to : | + | Thank you to: |
* Xavier Decuyper (toolbar button) | * Xavier Decuyper (toolbar button) | ||
* lisps (global config, internal media link support, escaping of userinput) | * lisps (global config, internal media link support, escaping of userinput) | ||
- | * ThisNameIsNotAllowed (support for move plugin) | + | * ThisNameIsNotAllowed (support for [[move]] plugin) |
===== Changelog ===== | ===== Changelog ===== | ||
- | * 19/05/2013: Initial release | + | * 19/05/2013 : Initial release |
- | * 20/04/2014: Added target support (feature request from Andrew St Hilaire) | + | * 20/04/2014 : Added target support (feature request from Andrew St Hilaire) |
- | * 07/06/2014: Added formatting support in description link text (but not in page link section) (feature request from Willi Lethert) | + | * 07/06/2014 : Added formatting support in description link text (but not in page link section) (feature request from Willi Lethert) |
- | * 30/08/2014: Added toolbar button (contribution from [[http:// | + | * 30/08/2014 : Added toolbar button (contribution from [[http:// |
- | * 06/09/2014: Refactored to add backlinks support (feature request from Schümmer Hans-Jürgen); | + | * 06/09/2014 : Refactored to add backlinks support (feature request from Schümmer Hans-Jürgen); |
- | * 28/04/2015: Refactored global config handling, add internal media link support, add escaping of userinput (contribution from lisps [[https:// | + | * 28/04/2015 : Refactored global config handling, add internal media link support, add escaping of userinput (contribution from lisps [[https:// |
- | * 05/08/2015: Merged lisps default style option and added french translation | + | * 05/08/2015 : Merged lisps default style option and added french translation |
* 12/09/2015 : Fixed PHP error with some versions | * 12/09/2015 : Fixed PHP error with some versions | ||
* 07/02/2016 : Applied PHP7 patch | * 07/02/2016 : Applied PHP7 patch | ||
Line 121: | Line 129: | ||
* 07/03/2020 : Fixed PHP warning (Issue #9) | * 07/03/2020 : Fixed PHP warning (Issue #9) | ||
* 11/05/2020 : Improved CSS configurability & regex (Issue #10 and #12) | * 11/05/2020 : Improved CSS configurability & regex (Issue #10 and #12) | ||
+ | * 09/07/2020 : Added ' | ||
+ | * 04/08/2020 : Hack to fix issue with Hogfather (see Issue #13 for details) | ||
+ | * 07/02/2022 : Added Português do Brasil translation (PR by mac-sousa) | ||
+ | * 26/11/2022 : Fixed some warnings for PHP8.1 and fix filename of br translation | ||
+ | * 13/12/2022 : Fixed PHP7 with str_contains polyfill | ||
+ | * 29/05/2023 : Fixed require deprecated warning (thanks to #28) | ||
+ | * 18/08/2023 : Fixed more deprecation warnings (thanks to nerun with #33) | ||
+ | * 05/01/2025 : Added support for interwiki links (#35) | ||
+ | |||
- | =====Request===== | + | ===== Request ===== |
If you have any request, please add an issue to [[https:// | If you have any request, please add an issue to [[https:// | ||
- | You may also add requests below ; but note that I do not track changes on this page, so you should notify me by mail if you need a quick answer. | + | Older requests: |
- | + | ||
- | Older requests : | + | |
* For the plugin to recognize white space so buttons can all be the same size \\ -> //The best way to do that is to add a ' | * For the plugin to recognize white space so buttons can all be the same size \\ -> //The best way to do that is to add a ' | ||
* Button Color can be changed with a hex code \\ -> //This can already be done by specifying the color in the style section : %%[[{buttons: | * Button Color can be changed with a hex code \\ -> //This can already be done by specifying the color in the style section : %%[[{buttons: |
plugin/button.1589224688.txt.gz · Last modified: by rpeyron