DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:inline_folding2

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:inline_folding2 [2008-01-15 20:36] 129.255.208.192plugin:inline_folding2 [2023-08-13 16:02] (current) Klap-in
Line 1: Line 1:
 ====== Folded Text Plugin 2 ====== ====== Folded Text Plugin 2 ======
 +---- plugin ----
 +description: Enables folded text sections
 +author     : Fabian van-de-l_Isle
 +email      : webmaster@lajzar.co.uk
 +type       : syntax
 +lastupdate : 2005-07-14
 +compatible : 
 +depends    : 
 +conflicts 
 +similar    : inline_folding, folded, hidden
 +tags       : collapsible
 +downloadurl: 
 +bugtracker : 
 +sourcerepo : 
 +----
  
-This is a slightly changed version of the [[plugin:inline folding]] plugin. See the discussion on that page to read more what it is all about. --- //[[esther@kaffeehaus.ch|Esther Brunner]] 2005-07-14 16:45//+===== Description =====
  
-See the plugin in action [[http://www.qwik.ch/playground|here]]. +This is a slightly changed version of the [[plugin:inline folding]] pluginSee the discussion on that page to read more what it is all about
- +
-> I took the liberty of correcting a couple of issues in the plugin, mainly to ensure the code it generates validates as XHTML 1.0 Transitional and it supports canonical URL's.  There is a still a problem with it wrapping include plugin and source plugin markup,  I am working on that :-). --- // [[chris@jalakai.co.uk|ChrisS]] 2005-Jul-14 // +
->> Thanks, Chris. Looking forward to seeing the final! [[zerohalo@gmail.com|zerohalo]] 2005-15-15. +
->>> Liberty taken again.  Code updated - now includes correct html to operate within PType normal and to include the formatting of other plugins all the time.  Other plugins may need to be modified (move ''$this%%->%%allowedModes'' determination from constructor to accepts() method override as done below) to be able to reciprocate. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-21// +
- +
->>> One last liberty :-) \\ Updated for revised DokuWiki_Syntax_Plugin class, Entity conversion added for unmatched data.  Will require current ''[[http://dev.splitbrain.org/browse/darcs/dokuwiki/lib/plugins|lib/plugins/syntax.php]]''.+
  
 ===== Syntax ===== ===== Syntax =====
Line 186: Line 195:
 \\ \\
 \\ \\
-For visitors it's sometimes hard to recognize that folded icon is clickable. You can change <span> tag into <a> tag, so folded icon wil behave like link (hand cursor on mouse over): +For visitors it's sometimes hard to recognize that folded icon is clickable. You can change <span> tag into <a> tag, so folded icon wil behave like link (hand cursor on mouse over): 
-<code>+<code>
 <a href="#" class='folder' onclick='fold(this, \"folded_$plugin_folded_count\");return false;'> <a href="#" class='folder' onclick='fold(this, \"folded_$plugin_folded_count\");return false;'>
 </code> </code>
-and then of course replace closing </span> with </a> as well.+and then of course replace closing </span> with </a> as well. 
 + 
 +===== Bugs ===== 
 + 
 +  * If the folded text is placed in a paragraph that is an unordered list, it will not show up. Ie, the following code will not render the inline folding plugin. See also sample here: http://wiki.jalakai.co.uk/dokuwiki/doku.php/wiki/playground 
 +<code>  * A bulleted point ++ some folded text ++</code> 
 + 
 +>Each //syntax mode// determines the other syntax modes which it will allow within itself.  The list syntax mode does not allow other containers.  At present there is no mechanism for the plugin to influence the behaviour of standard dokuwiki syntax.  I believe the **correct** type (as returned by ''getType()'' method) of this plugin should be //container//. If you use a type of //formatting// lists and tables will be able to contain folded markup. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-21// 
  
 ===== Discussion ===== ===== Discussion =====
 +
 +> I took the liberty of correcting a couple of issues in the plugin, mainly to ensure the code it generates validates as XHTML 1.0 Transitional and it supports canonical URL's.  There is a still a problem with it wrapping include plugin and source plugin markup,  I am working on that :-). --- // [[chris@jalakai.co.uk|ChrisS]] 2005-Jul-14 //
 +>> Thanks, Chris. Looking forward to seeing the final! [[zerohalo@gmail.com|zerohalo]] 2005-15-15.
 +>>> Liberty taken again.  Code updated - now includes correct html to operate within PType normal and to include the formatting of other plugins all the time.  Other plugins may need to be modified (move ''$this%%->%%allowedModes'' determination from constructor to accepts() method override as done below) to be able to reciprocate. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-21//
 +
 +>>> One last liberty :-) \\ Updated for revised DokuWiki_Syntax_Plugin class, Entity conversion added for unmatched data.  Will require current ''[[xref>lib/plugins/syntax.php]]''.
 +
 +\\
  
 > Esther, did something change with the syntax? Previously, the following syntax would work: > Esther, did something change with the syntax? Previously, the following syntax would work:
Line 219: Line 244:
  
 >>> Fixed in above code. GetPType remains normal, paragraph closing and opening html added to ->render() entry and exit code. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-21// >>> Fixed in above code. GetPType remains normal, paragraph closing and opening html added to ->render() entry and exit code. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-21//
- 
- 
- 
- 
- 
-===== Bugs ===== 
- 
-  * If the folded text is placed in a paragraph that is an unordered list, it will not show up. Ie, the following code will not render the inline folding plugin. See also sample here: http://wiki.jalakai.co.uk/dokuwiki/doku.php/wiki/playground 
-<code>  * A bulleted point ++ some folded text ++</code> 
-> Each //syntax mode// determines the other syntax modes which it will allow within itself.  The list syntax mode does not allow other containers.  At present there is no mechanism for the plugin to influence the behaviour of standard dokuwiki syntax.  I believe the **correct** type (as returned by ''getType()'' method) of this plugin should be //container//. If you use a type of //formatting// lists and tables will be able to contain folded markup. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-21// 
- 
-  * As mentioned elsewhere, the include plugin referencing namespace:page doesn't seem to work when placed within folded text. Ie, the following code does not render: 
-<code> some text ++ ::namespace:page:: ++</code> 
-> fixed in above code.  Allowed modes are now determined in the first call to accepts() method. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-21// 
->> This latest revision throws out more error messages than I can count. Is it possibly a PHP version issue?  --- //[[webmaster@lajzar.co.uk|ta' Lajzar]] 2005-07-25 02:38// 
->>> Thanks, Chris. Works for me. Lajzar, maybe it is a PHP issue. I'm running php 4.3.11. --- //[[zerohalo@gmail.com|zerohalo]] 2005-07-25.// 
-> Can you give any details?  I'm running php 4.4.0, but there should be nothing in the code that requires a higher version than the rest of Dokuwiki.  Feel free to visit [[http://wiki.jalakai.co.uk/dokuwiki|my test wiki]] to try it or to post more detailed comments. --- //[[chris@jalakai.co.uk|ChrisS]] 2005-07-26// 
->> My test server is running PHP version 5.0.4 and my main ISP server is running 4.3.10, but I haven't tested the new script on that server. --- //[[webmaster@lajzar.co.uk|ta' Lajzar]] 2005-07-26 02:00// 
  
plugin/inline_folding2.1200425798.txt.gz · Last modified: 2011-02-11 17:14 (external edit)

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