DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:spoiler

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:spoiler [2014-05-18 20:18] – [Problems] 217.150.76.19plugin:spoiler [2023-10-30 22:59] (current) Klap-in
Line 7: Line 7:
 type       : syntax type       : syntax
 lastupdate : 2007-07-19 lastupdate : 2007-07-19
-compatible : 2007-06-26+, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky+compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, !Hogfather
 depends    :  depends    : 
 conflicts  conflicts 
-similar    : +similar    : folded
 tags       : hide tags       : hide
-downloadurl: http://wiki.fealdia.org/_media/projects/dokuwiki/spoiler-plugin-2007-07-19.tgz+downloadurl: https://wiki.hokkanen.org/_media/projects/dokuwiki/spoiler-plugin-2007-07-19.tgz 
 ---- ----
  
Line 30: Line 31:
 You can make a button for this code with [[doku>plugin:custombuttons]]. You can make a button for this code with [[doku>plugin:custombuttons]].
  
-See [[http://wiki.fealdia.org/projects/dokuwiki/spoiler]] for images, playground, and download.+See [[https://wiki.hokkanen.org/projects/dokuwiki/spoiler]] FIXME for images, playground, and download.
  
 ===== Discussion ===== ===== Discussion =====
  
-I'd like to see it work within a list:+**Patch to work with 2020-07-29 "Hogfather"**\\ 
 +in ''lib/plugins/spoiler/syntax.php'' change the following lines (65+91) 
 +  function handle($match, $state, $pos, &$handler){ 
 +  function render($mode, &$renderer, $data) { 
 +to 
 +  function handle($match, $state, $pos, Doku_Handler $handler){ 
 +  function render($mode, Doku_Renderer $renderer, $data) { 
 + 
 +-- halbbit //2021-01-23// 
 +---- 
 + 
 +**I'd like to see it work within a list**
 <code dokuwiki> <code dokuwiki>
   * <spoiler>   * <spoiler>
Line 68: Line 80:
 Here are the code changes to ''style.css'' and ''syntax.php'': Here are the code changes to ''style.css'' and ''syntax.php'':
  
-<code>+<code diff>
 *** ./style.css Wed Jul 18 14:14:43 2007 *** ./style.css Wed Jul 18 14:14:43 2007
 --- ./new_style.css     Tue Nov 17 15:43:41 2009 --- ./new_style.css     Tue Nov 17 15:43:41 2009
Line 99: Line 111:
 + } + }
 </code> </code>
-<code>+<code diff>
 *** ./syntax.php        Thu Jul 19 15:32:57 2007 *** ./syntax.php        Thu Jul 19 15:32:57 2007
 --- ./new_syntax.php    Tue Nov 17 15:43:41 2009 --- ./new_syntax.php    Tue Nov 17 15:43:41 2009
Line 209: Line 221:
  
 Also, add the file ''script.js'': Also, add the file ''script.js'':
-<code>+<code javascript>
 function spoilerControl(state) { function spoilerControl(state) {
     var el = document.getElementsByTagName('DIV');     var el = document.getElementsByTagName('DIV');
Line 226: Line 238:
  
 This extra file hides away any 'spoiler' items when printing (call it ''print.css''): This extra file hides away any 'spoiler' items when printing (call it ''print.css''):
-<code>+<code css>
 div.dokuwiki .spoiler { div.dokuwiki .spoiler {
     visibility: hidden;     visibility: hidden;
Line 247: Line 259:
     * Put string ''$payload = str_replace("'","’",$payload);'' after string ''list($state, $payload) = $data;     * Put string ''$payload = str_replace("'","’",$payload);'' after string ''list($state, $payload) = $data;
 '' ''
 +  * Spoiler can't hold ''include'' syntax inside. Include will be showed under it
 +  * No spacing after first paragraph in spoiler, cause it come without '<p></p>' html tags.
plugin/spoiler.1400437082.txt.gz · Last modified: 2014-05-18 20:18 by 217.150.76.19

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