====== Plugin Folded - Discussions ====== [[:plugin:folded|Back to main page]] ---- 2015-07-21 - great plugin, works brilliant on my local Apache 2.4 but not on the same copy on a Ubuntu 14.04 server :( \\ All files are the same, the cache was deleted, permissions are set but there is no unfolding on the servers dokuwiki when I click the link. The items remain folded. \\ There is also Apache 2.4 and PHP 5.5 \\ Both with Firefox or other browser. I reinstalled it without change. What can it be? Does this plugin not work with a special configuration?\\ **Solution** was: deactivate the **fontcolor plugin**. I noticed an error in Firebug with addInitEvent(plugin_fontcolor_toolbar_picker), which I found in js.php after a little search. This the error in Firebug: Reference Error: addInitEvent is not defined in js.php .... so I deactiavted this fontcolor plugin and now again it works :) \\ I use the simple color plugin instead, works nicely as well, even better, as I can remember the code (color) better ;) \\ fontcolor plugin broke also the hidden plugin by the way. ---- 2015-01-14 - Nice plugin. Is it possible to get the "unfold all" code mentioned below included in this plugin? A separate plugin similar to the "hiddenswitch" plugin would also be possible. > Write the code into the sidebar and you will get something similar to the "hiddenswitch". You can style the buttons with the css-style-attribute. 2024-05-19 - Still a nice plugin! Is it possible to fold just one div at the time? Meaning, if fold1 is open, and one clicks on fold2, fold1 should close? - Thanks! ---- 2024-10-29 - Nice plugin. Unfortunately, it's breaking all the existing references to "Notepad++" in my wiki (of which there are many). I can escape the syntax by converting ''Notepad++'' to ''Notepad%%++%%'', but I'd rather not have to go through and do that with every instance of "Notepad++". Does anyone have any clever ideas for how to deal with that very specific issue? //UPDATE:// I avoided the problem on my local copy of the plugin by switching the span syntax from "++" to "+++" by making the following changes to the ''/lib/plugins/folded/syntax/span.php'' file as shown in the diff below: --- a/lib/plugins/folded/syntax/span.php Tue Oct 29 14:51:11 2024 +0000 +++ b/lib/plugins/folded/syntax/span.php Tue Oct 29 15:31:45 2024 +0000 @@ -20,15 +20,15 @@ function getType(){ return 'formatting'; } function getAllowedTypes() { return array('substition','protected','disabled','formatting'); } function getSort(){ return 405; } - function connectTo($mode) { $this->Lexer->addEntryPattern('\+\+.*?\|(?=.*\+\+)',$mode,'plugin_folded_span'); } - function postConnect() { $this->Lexer->addExitPattern('\+\+','plugin_folded_span'); } + function connectTo($mode) { $this->Lexer->addEntryPattern('\+\+\+.*?\|(?=.*\+\+\+)',$mode,'plugin_folded_span'); } + function postConnect() { $this->Lexer->addExitPattern('\+\+\+','plugin_folded_span'); } /** * Handle the match */ function handle($match, $state, $pos, Doku_Handler $handler){ if ($state == DOKU_LEXER_ENTER){ - $match = trim(substr($match,2,-1)); // strip markup + $match = trim(substr($match,3,-1)); // strip markup } else if ($state == DOKU_LEXER_UNMATCHED) { $handler->addCall('cdata',array($match), $pos); return false; //NOTE: Obviously, I don't expect the following changes to be made to the core plugin as that would break all the existing installs, but for new users that have a lot of existing content that won't play nice with the default syntax (e.g., "Notepad++", "C++", etc.), this is less work than changing a bunch of content. If you go this route, be aware that you will need to re-apply this change whenever the plugin is updated.//