bridge:trumpsuits-dokuwiki-plugin
Verschillen
Dit geeft de verschillen weer tussen de geselecteerde revisie en de huidige revisie van de pagina.
| Beide kanten vorige revisieVorige revisieVolgende revisie | Vorige revisie | ||
| bridge:trumpsuits-dokuwiki-plugin [2020/12/19 16:38] – oude revisie hersteld (2020/08/26 22:08) 85.208.210.27 | bridge:trumpsuits-dokuwiki-plugin [2024/03/08 19:45] (huidige) – [Notes] Pieter van der Meulen | ||
|---|---|---|---|
| Regel 1: | Regel 1: | ||
| ====== Trump suits plugin for DokuWiki ====== | ====== Trump suits plugin for DokuWiki ====== | ||
| - | This may not be the most spectacular DokuWiki plugin available, but it suits my own needs just fine. The plugin renders the diamond and heart card suit symbols in red, and the clubs and spade card suit symbols in black. It also adds four buttons to the editor toolbar for quick access to the trump suit symbols. | + | This may not be the most spectacular DokuWiki plugin available, but it suits my own needs just fine. The plugin renders |
| - | Due to my very limited knowledge of PHP and javascript I can't guarantee this won't set fire to your DokuWiki server. Mine seems to have survived | + | Due to my very limited knowledge of PHP and javascript I can't guarantee this won't set fire to your DokuWiki server. Mine seems to have survived |
| ===== Syntax ===== | ===== Syntax ===== | ||
| No special syntax. Just use standard UTF card suit symbols (optionally inserted by using the toolbar buttons). | No special syntax. Just use standard UTF card suit symbols (optionally inserted by using the toolbar buttons). | ||
| - | |||
| - | ===== Versions ===== | ||
| - | |||
| - | ;2010-09-03 | ||
| - | :Fixed javascript that was broken in DokuWiki version 2009-12-25, “Lemming”. | ||
| - | ;2009-11-05 | ||
| - | :Initial version | ||
| - | | ||
| - | |||
| - | |||
| ===== Installation ===== | ===== Installation ===== | ||
| - | |||
| Regel 26: | Regel 15: | ||
| - | Point your plug-in manager at [[/ | + | Point your plug-in manager at [[/ |
| ==== Manual ==== | ==== Manual ==== | ||
| Regel 33: | Regel 21: | ||
| Create the folder '' | Create the folder '' | ||
| - | ^ Suit ^ | + | ^ Suit ^ Filename |
| - | | Clubs | 2663 | 2667 | + | | Clubs |
| - | | Diamonds | + | | Diamonds |
| - | | Hearts | + | | Hearts |
| - | | Spades | + | | Spades |
| === syntax.php === | === syntax.php === | ||
| Regel 188: | Regel 177: | ||
| </ | </ | ||
| - | |||
| Regel 196: | Regel 184: | ||
| <code javascript> | <code javascript> | ||
| - | if(window.toolbar!=undefined){ | + | //create a single toolbutton with desired properties |
| - | var icobase | + | function plugin_trumpsuits_createToolbutton |
| - | | + | var ico = document.createElement(" |
| - | | + | ico.src |
| - | " | + | |
| - | " | + | btn.id = "syntax__plugin_trumpsuits_" |
| - | | + | |
| - | " | + | btn.appendChild(ico); |
| - | | + | |
| - | | + | btn.accessKey = accKey; |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | " | + | |
| - | " | + | |
| - | " | + | |
| } | } | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| + | //if this is an " | ||
| + | function plugin_trumpsuits_toolbar_additions() { | ||
| + | var toolbar = $(" | ||
| + | if(!toolbar) {return;} | ||
| + | if(!$(" | ||
| + | var tbtn = plugin_trumpsuits_createToolbutton(" | ||
| + | if (tbtn) {toolbar.appendChild(tbtn); | ||
| + | tbtn = plugin_trumpsigns_createToolbutton(" | ||
| + | if (tbtn) {toolbar.appendChild(tbtn); | ||
| + | tbtn = plugin_trumpsigns_createToolbutton(" | ||
| + | if (tbtn) {toolbar.appendChild(tbtn); | ||
| + | tbtn = plugin_trumpsigns_createToolbutton(" | ||
| + | if (tbtn) {toolbar.appendChild(tbtn); | ||
| + | } | ||
| + | addInitEvent(plugin_trumpsuits_toolbar_additions); | ||
| + | </ | ||
| + | ===== Notes ===== | ||
| + | Notes on javasript in plugins: http:// | ||
| - | ==== Wishlist ==== | + | Browser an OS dependent CSS selectors: https:// |
| - | *Configuration options for trump suit symbol replacement | ||
| - | *Language options. Can one use language conf in javascript? | ||
bridge/trumpsuits-dokuwiki-plugin.1608392300.txt.gz · Laatst gewijzigd: (Externe bewerking)
