This is an old revision of the document!
Table of Contents
Faster DokuWiki Plugin
Compatible with DokuWiki
Hrun, Detritus, Elenor of Tsort, Frusterick Manners
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to inlineeditor, instantpage, quickedit, sectionedit
This plugin is part of my effort to make the DokuWiki experience smoother and faster.
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Features
These settings are available in the DokuWiki administrative interface, under “Configuration Settings.”
Inline Section Editing
Setting name: secedit
When this feature is enabled, section editing happens inline. That is, the piece of the page you want to edit is replaced with the editor. If you also enable the preview setting, previews will appear inline as well.
This feature should be compatible with all templates, and all plugins except those that change section editing behavior. If you discover any incompatibilities, please report a bug.
Inline Previews
Setting name: preview
When this setting is enabled, editor previews (including section edit previews) appear below the editor, without reloading the page. To make this work with section editing, enable secedit. To make it work with normal editing, enable fastpages.
This setting should be compatible with all templates and plugins.
Fast Mode Switch
Setting name: fastpages
When this setting is enabled, changing page modes – for example, from viewing a page to editing it, or from site index to revision history – happens without reloading the page. Only the center content area is changed, and there is a loading animation while the new content is being loaded.1)
Enabling this feature fixes a bug in DokuWiki. You will no longer get an “are you sure you want to leave” alert when all you did was move the cursor around in the editor. You have to actually change something. This feature also works with the tags plugin, which makes that plugin behave better with many templates than it does now.
This feature might not be compatible with all templates, and it won't work with any plugin which changes content outside the main content area.
Plugin compatibility issues
- CKGedit doesn't work with sectionedit: https://github.com/zioth/dokuwiki_fastwiki/issues/24
- imgpaste doesn't work: https://github.com/zioth/dokuwiki_fastwiki/issues/22
- CodeMirror doesn't work with sectionedit: https://github.com/zioth/dokuwiki_fastwiki/issues/18
Fixed:
- edittable fixed on 2015-09-16: https://github.com/zioth/dokuwiki_fastwiki/issues/23
- hidden fixed on 2015-12-25.
Supported templates
Templates have a variety of behavior when switching view modes. Some hide the sidebar in some modes. Some have links while others have buttons. I have made an effort to support many of the most popular templates. Feel free to request others, if you find that your favorite template doesn't behave correctly.
These templates support all functionality. That means that if you end up in some other mode (for example, by manually adding ?do=edit to the url), DokuWiki will still be super-fast, replacing content with AJAX requests.
These templates support all functionality from the “show” page. If you manually change the page, or reach another page through some unsupported link, the plugin will be disabled.
- starter, and templates based on it:
Requests for Template Support
Templates with built-in support
See integration.
- None yet.
Fast Edit Saves
Setting name: fastsave
When this feature is enabled, saving from the editor does not reload the page. To make it work with section editing, enable secedit. To make it work with the regular editor, enable fastpages.
This feature might not be compatible with all templates. The issues are the same as with the fastpages setting.
Fast ID Switch
Setting names: fastshow, fastshow_same_ns, fastshow_include, fastshow_exclude
When this feature is enabled, entirely new pages load without reloading the page. For example, switching from a:b:c to a:b:d will not reload. However, the page will reload if there is an ACL difference between the two pages. That is, if you have the right to edit the current page but not the next page, the whole page will reload.
The browser history will reflect the page change. Since Microsoft Internet Explorer 9 and below can't manipulate browser history, those browsers are automatically excluded from this feature.
Setting: fastshow_same_ns
In most wikis, the sidebar, header or footer is namespace-specific. If this is the case for your wiki, enable this setting, so that the feature is only used when switching to another page in the same namespace.
Setting: fastshow_include
Use this if you only want the feature to work in a comma-delimited list of namespaces and pages.
Setting: fastshow_exclude
Use this if you want the feature to work everywhere but in a comma-delimited list of namespaces and pages. You can use this together with fastshow_include to exclude certain sub-namespaces of the fastshow_include list.
Template Support
Support for this feature is the same as for fastpages. However, the starter bootstrap template does not support this feature, because it uses non-standard code for the table of contents.2).
Comments Support
If your wiki uses the Discussion plugin or Disqus plugin, it should work fine, since the discussion is part of the main content area and this reloaded with the page change. However, if your template inserts a comments section outside the main content area, it will not be updated on page change. You can update your comments section by hooking into this plugin's API (see Integrating Fastwiki, below).
Even Faster ID Switch!
Setting names: preload, preload_batchsize, preload_per_page
Want a super speed boost? Enable this feature (along with fastshow) to pre-load links on the page. By the time the user clicks on a link, it may already be loaded, resulting in an instantaneous page switch. Pre-loads are remembered when you switch pages (within the limitations of fastshow settings), so for a heavily linked wiki, the site will get faster the longer you stay on it.
Warning: This feature will significantly increase network usage. A typical wiki might require 500kb for the first page loaded and 50kb for each subsequent page. With this setting enabled, you'll load an additional 5-20kb per link on the page. If you average 30 links a page (including sidebars), that's 320kb per page instead of just 50kb. Note that the additional size will not affect page load time; preloads don't happen until after the page is loaded.
Support for this feature is the same as for fastshow. Note: This feature will only be available if your php installation includes the curl library.
Setting: preload_batchsize
Default=10. This is the maximum number of pages which can be fetched by a single AJAX request. If there are more than this many links on the page, they will be requested in batches.
Setting: preload_per_page
Default=100. This is the maximum number of new (previously uncached) links that will be loaded on a single page. If there are more than this many links on a page, no preloading will happen at all. The page is so heavily linked that it's unlikely we'll cache the right page.
Template/Plugin developers: Integrating Fastwiki
While this plugin does have specific initialization code for some templates, that's not really maintainable. Templates change, and template creators may have different ideas in mind than I do. Because of this, I've added an event-based API for templates. More Details...
Plugins don't usually require any special integration with Fastwiki, but if you notice any bugs, you might be able to fix them using the same API that template developers use.
Please let me know if you add support to your template.
TODO
Changelog
- Work-around for DokuWiki Kaos bug in plugin.info.txt processing (2024-02-11 03:38)
- Work-around for DokuWiki Kaos bug in plugin.info.txt processing (2024-02-11 03:37)
- Fixed issue #42 - internal link not added in linkwiz tool (2023-01-29 16:19)
- Fixed #46 - edit not working sometimes. Caused by the fix to #44 (2021-10-15 17:01)
- Fixed #44: Editing the text under Chrome (Android) does not work (2021-10-04 21:16)
- Fixed #42 - internal link button not working (2021-07-04 20:10)
- Fixed #41: Link wizard bug. Improved compatibility with latest doku e… (2021-04-07 16:23)
- Fixed #40 by updating plugin version (2020-10-30 15:55)
FAQ
Where can I see it in action?
My site doesn't have open registration, but you can try http://zioth.com/wiki/playground2 (username: demo. password: demo). Only that one page is open.
How do I make my template/plugin work with fastwiki?
Why don't I see the preload setting?
The deployment of PHP on your server has the curl library disabled.
Discussion
2016-02-04
- inline section edit only works if »fastpages is enabled - additional observations:
- loading animation (greyed screen with blue vertical bars in a white box) may stay active
. - happend in >50% of my inline editing attempts sofar
. - can sometimes be cured by canceling and re-entering edit mode
. - otherwise inline editing seems to work properly (text can be modified, copied, …, previewed, …)
- inline preview is significantly narrower than the final page/frame width as there is a grey area on the right side
Sorry for the long delay. The sticky loading animation issue in FireFox should be fixed now. — zioth 2016-07-06
CKGedit Support?
I guess so far it doesnt work with the CKGedit-Plugin? Would be nice if that could be supported somehow. Talking about the inline editing.
zioth – Not sure when I'll have time to work on it, but I've submitted an issue: https://github.com/zioth/dokuwiki_fastwiki/issues/24