DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:hidden

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:hidden [2015-09-13 17:28] Aleksandrplugin:hidden [2023-11-07 14:00] (current) – Update to version 2023-11-07 78.196.188.242
Line 6: Line 6:
 email      : guillaume.turri@gmail.com email      : guillaume.turri@gmail.com
 type       : Syntax type       : Syntax
-lastupdate : 2015-08-21 +lastupdate : 2023-11-07 
-compatible : 2009-12-25, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, ponder stibbons, Hrun, Detritus+compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
 depends    :  depends    : 
 conflicts  : infomail conflicts  : infomail
Line 16: Line 16:
 bugtracker : https://github.com/gturri/hidden/issues bugtracker : https://github.com/gturri/hidden/issues
 sourcerepo : https://github.com/gturri/hidden/ sourcerepo : https://github.com/gturri/hidden/
-donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=guillaume.turri@gmail.com+donationurl: http://bit.ly/hidden_charityware
 ---- ----
  
-If you use version of Dokuwiki older than Angua, please use this older [[https://github.com/gturri/hidden/zipball/lastWorkingWithoutJQuery|version]] of the plugin.+:!: **I'm looking for a new maintainer!** 
 + 
 +If you're user of this plugin, don't worryI'm still keeping an eye on it, and I'll try to make sure it keeps working fine with future versions of DokuWiki. But my time is now dedicated to other projects so I will likely not add other features. 
 + 
 +If you're interested in maintaining this plugin, just send me an email (adress available in the commit log) and I'll make sure to give all the information you will need.
  
 ===== Description ===== ===== Description =====
 +
 If you ever wonder "should I add this detail since it may be very interesting to some readers, or shouldn't I since it would complicate a first reading?", then you may be interested in this plugin. Indeed, you'll just have to write If you ever wonder "should I add this detail since it may be very interesting to some readers, or shouldn't I since it would complicate a first reading?", then you may be interested in this plugin. Indeed, you'll just have to write
 +
   <hidden click here if you want to know more>Since you want to know more, here is an explanation with more details […]</hidden>   <hidden click here if you want to know more>Since you want to know more, here is an explanation with more details […]</hidden>
 +
 and the complicated explanation won't clutter up the page, but will still be readable. and the complicated explanation won't clutter up the page, but will still be readable.
  
Line 30: Line 37:
 To avoid annoying readers we could have: To avoid annoying readers we could have:
  
-{{http://guigui.webou.net/gestion_projet/hidden/onHidden5.png}}+{{https://trello.com/1/cards/6453f72c6c34d0d5947010be/attachments/6453f78432476f6e8400c4c2/download/dokuwiki-plugin-hidden_onHidden.png?recache|onHidden}}
  
 But an interested reader may click and get: But an interested reader may click and get:
  
-{{http://guigui.webou.net/gestion_projet/hidden/onVisible5.png?}}+{{https://trello.com/1/cards/6453f72c6c34d0d5947010be/attachments/6453f786fc6b57ff2fd50408/download/dokuwiki-plugin-hidden_onVisible.png?recache|onVisible}}
  
 ===== How to use it ===== ===== How to use it =====
 +
 The simplest way is: The simplest way is:
 +
   <hidden>Hidden text</hidden>   <hidden>Hidden text</hidden>
 +
 This will display the default text "Click to display ⇲" when the text is hidden, and "Click to hide ⇱" when it's visible. This will display the default text "Click to display ⇲" when the text is hidden, and "Click to hide ⇱" when it's visible.
  
-Some options may be added inside the opening <hidden> tag:+Some options may be added inside the opening %%<hidden>%% tag:
 ^  Option  ^  Effect  ^  Example  ^ ^  Option  ^  Effect  ^  Example  ^
-|any text|use this text instead of the defaults "Click to display" and "Click to hide" | <hidden click me!>hidden text</hidden>+|any text  |use this text instead of the defaults "Click to display" and "Click to hide" | %%<hidden click me!>hidden text</hidden>%% 
-|onHidden="any text"|Display this text when the section is hidden|see below| +|%%onHidden="any text"%%  |Display this text when the section is hidden|see below| 
-|onVisible="any text"|Display this text when the section is unfolded|<hidden onHidden="Click to read **more**" onVisible="Click to see **less**">Hidden text</hidden>+|%%onVisible="any text"%%  |Display this text when the section is unfolded|%%<hidden onHidden="Click to read%% **more**%%" onVisible="Click to see%% **less**%%">Hidden text</hidden>%%  
-|onExportPdf="any text"|Display this text when the page is [[dw2pdf]] exported in pdf (defaults to the onVisible text)|<hidden onExportPdf="you're reading a pdf, you can't click me">hidden text</hidden>+|%%onExportPdf="any text"%%  |Display this text when the page is [[dw2pdf]] exported in pdf (defaults to the onVisible text)  |%%<hidden onExportPdf="you're reading a pdf, you can't click me">hidden text</hidden>%%  
-|initialState="visible"|The block will initially be expanded. Readers may still click to hide it| | +|%%initialState="visible"%%  |The block will initially be expanded. Readers may still click to hide it  | | 
-|-noprint|the text "click to display" won't appear on the printed copy| |   +|%%-noprint%%  |the text "click to display" won't appear on the printed copy| |   
-|-edit="any text"|Add an "edit" button below the hidden section.The text will appear when one let his mouse on the button| | +|%%-edit="any text"%%  |Add an "edit" button below the hidden section.The text will appear when one let his mouse on the button  | | 
-|-edit|Same as above, but a default text is used| |+|%%-edit%%  |Same as above, but a default text is used  | |
  
-Please note that Dokuwiki formatting syntax may be used with options like "onHidden".+Please note that DokuWiki formatting syntax may be used with options like "onHidden". 
 + 
 +===== Hidden Switch =====
  
-=====Hidden Switch===== 
 It's possible to add a button that will hide/display every hidden blocks at once using: It's possible to add a button that will hide/display every hidden blocks at once using:
 +
   <hiddenSwitch>   <hiddenSwitch>
 or or
-  <hiddenSwitch Here comes my custom text> 
  
 +  <hiddenSwitch Here comes my custom text>
  
 Therefore, to see it in action, you could create such a page: Therefore, to see it in action, you could create such a page:
Line 67: Line 79:
  
 <hiddenSwitch> <hiddenSwitch>
 +</file>
  
 Note: this feature used to be provided by a separate plugin. However, since "hidden v2015-08-12", they have been merged Note: this feature used to be provided by a separate plugin. However, since "hidden v2015-08-12", they have been merged
Line 72: Line 85:
 ===== Download and Installation ===== ===== Download and Installation =====
  
-You may download this [[https://github.com/gturri/hidden/zipball/master|archive]] and unpack it in the /lib/plugins directory of your wiki. +Search and install ​the plugin using the [[plugin:extension|Extension ​Manager]]. Alternatively, you may download this [[https://github.com/gturri/hidden/zipball/master|archive]] and unpack it in the ''/lib/plugins'' directory of your wiki.
- +
-You may also use the plugin manager, using this URL: https://github.com/gturri/hidden/zipball/master+
  
 ===== Some (important) points ===== ===== Some (important) points =====
Line 80: Line 91:
   * If the reader disabled JavaScript, this plugin won't work. More precisely, the full text will be displayed at once. Anyway, it shouldn't be a problem since quite everyone enables JavaScript.   * If the reader disabled JavaScript, this plugin won't work. More precisely, the full text will be displayed at once. Anyway, it shouldn't be a problem since quite everyone enables JavaScript.
   * If you just installed this plugin and if it doesn't seem to work, try to empty the cache of your browser and the [[devel:caching|cache of dokuwiki]].   * If you just installed this plugin and if it doesn't seem to work, try to empty the cache of your browser and the [[devel:caching|cache of dokuwiki]].
-  * To use an image in the header, you should use <nowiki><hidden click here {{image.gif?nolinking}}></nowiki> (see [[:images]] for more details).+  * To use an image in the header, you should use ''<nowiki><hidden click here {{image.gif?nolinking}}></nowiki>'' (see [[:images]] for more details).
   * You should avoid to use header inside a hidden section, because there is currently a [[https://github.com/gturri/hidden/issues/1|bug]] with this case   * You should avoid to use header inside a hidden section, because there is currently a [[https://github.com/gturri/hidden/issues/1|bug]] with this case
-  * If, after refreshing the cache, the hidden plugin still doesn't work and shows three lines containing the 'click here' text, change the template and revert back to what it wasIn my case this solved it. +  * If, after refreshing the cache, the hidden plugin still doesn't work and shows three lines containing the 'click here' text, it may be because another plugin or template is breaking the javascript. You should try to switch back to the default template, deactivate all your other plugins, and re-empty your cachesThen reactivate them one by one until it breaks again, to find the guilty plugin
-  * The default texts ("Click to display" and "Click to hide") can be changed through Dokuwiki admin page, even though the default values for those settings might look weird. +  * The default texts ("Click to display" and "Click to hide") can be changed through DokuWiki admin page, even though the default values for those settings might look weird. 
  
-===== Bug =====+===== Reporting a bug =====
  
 Please use the [[https://github.com/gturri/hidden/issues?state=open|bugtracker]] to report bugs, rather than using this page. Please use the [[https://github.com/gturri/hidden/issues?state=open|bugtracker]] to report bugs, rather than using this page.
Line 93: Line 104:
   * It's easier to retrieve information on closed bugs   * It's easier to retrieve information on closed bugs
  
-Since this plugin relies on javascript, if any other plugin (or a non-default template) break the javascript, then this "hidden plugin" will give the feeling it doesn't work.+Since this plugin relies on javascript, if any other plugin (or a non-default template) breaks the javascript, then this "hidden plugin" will give the feeling it doesn't work.
  
 Consequently, before submitting a bug, please try to Consequently, before submitting a bug, please try to
   * Deactivate all your other plugins   * Deactivate all your other plugins
   * Switch to the default template   * Switch to the default template
-  * Empty the cache of Dokuwiki and the cache of your browser+  * Empty the cache of DokuWiki and the cache of your browser
   * Check if it still doesn't work.    * Check if it still doesn't work. 
     * If it's the case, please report it on the bugtracker     * If it's the case, please report it on the bugtracker
Line 106: Line 117:
  
 {{rss>https://github.com/gturri/hidden/commits/master.atom 5 date}} {{rss>https://github.com/gturri/hidden/commits/master.atom 5 date}}
 +
 +===== Charityware =====
 +
 +This plugin is provided as a [[wp>Charityware]]. It can be downloaded and installed at no charge. If you found it useful and would like to support its development, you may make a donation to a non-profit charitable organization.
 +
 +==== To who ====
 +
 +The preference goes to the [[https://support.worldwildlife.org/site/SPageServer?pagename=main_onetime|World Wildlife Fund]] (WWF) because the are both protecting biodiversity and fighting climate change effectively.
 +
 +If it isn't possible, any association acting for the environment would do the trick.
 +
 +==== How ====
 +
 +Forwarding me (address available at the top of the page) the confirmation email you send or receive will ensure your kind gesture will motivate me to continue developing this software.
 +
 +==== I can't give money ====
 +
 +Making sure you have a positive impact would already be awesome:
 +  * Volunteer to an NGO near you. Give some of your time
 +  * Ride you bike instead of taking your car
 +  * Buy local organic food
 +  * Use a reusable bag and stop using plastic straws
 +  * Plant trees
 +  * Take only what you need, not what you can
  
plugin/hidden.1442158103.txt.gz · Last modified: 2015-09-13 17:28 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki