====== DaftDrafts Plugin ====== ---- plugin ---- description: Can mark pages as drafts, thus hiding them completely from unregistered users author : Jon Magne Bøe email : jonmagneboe@hotmail.com type : action, syntax lastupdate : 2011-11-06 compatible : Angua, 2012-01-25; 2011-05-25 "Rincewind" depends : conflicts : similar : publish, underconstruction tags : moderation, hide downloadurl: https://trello.com/1/cards/5b0599b76939c0aa2fd80220/attachments/5b0599e23f094a56551cedc3/download/daftdrafts-2011-11-06.zip bugtracker : sourcerepo : donationurl: screenshot_img: ---- ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. === Compatibility === This plugin is compatible with Rincewind (2011-05-25), but it could very well be compatible with older versions. You'll just have to try it. ===== Examples/Usage ===== === Usage === * To hide a page, simply add ''%%~~DRAFT~~%%'' anywhere in the text. * In case you are using German language, the code is ''%%~~ENTWURF~~%%''. * In case you are using Norwegian language, the code is ''%%~~KLADD~~%%''. * The plugin also adds a button to the far right of the editing buttons that looks like a //forbidden// sign. Clicking it will add the correct code. === Effect === If you are an unregistered user, the page will not show up. If you are registered, you can see the page, as well as a red warning on the top of the page, which reminds you that the following page is a draft; hidden from the view of unregistered users. === What does the plugin do to achieve this? === Technically, the plugin adds two ACL-entries that sets @ALL to have the permission ''AUTH_NONE'', and @user to have the permission ''AUTH_EDIT''. When the code is removed from the page's text, the ACL-entries are also removed. ===== Development ===== This plugin is built upon the [[:plugin:underconstruction|Underconstruction plugin]], however I was very dissatisfied with how that plugin worked, and so I had to create a new one. The [[:plugin:underconstruction|Underconstruction plugin]] was flawed in that the draft-system would break whenever any ACL was deleted from the ACL management plugin that comes with DokuWiki Rincewind. This plugin does not suffer from that flaw. Several other improvements makes this a much easier code to work with, in case I find out that I want to add more functionality to the plugin. I was also inspired by the [[plugin:publish|Publish plugin]], but found that it didn't work how I expected. I wanted to hide pages completely from unregistered users so they didn't even know that the pages existed, but the [[plugin:publish|Publish plugin]] couldn't do that. === Change Log === * **2011-11-06** * Initial release === Known Bugs and Issues === * The message about the current page being a draft will follow you through the admin menus in case you enter them from a page that is marked as a draft. This is a minor inconvenience, but maybe I will fix it some day. * Angua "release candidate" (2011-11-10) compatibility * The plugin does not appear to be compatible with the Angua "release candidate" (2011-11-10), but I currently (2011-11-17) do not know why. The following bugs apply: * The toolbar button does nothing on Angua "RC" (2011-11-10) * The syntax does nothing when included on a page on Angua "RC" (2011-11-10) === ToDo/Wish List === == To Do == * Add syntax, admin backend or whatever to get a list of all the pages that are marked as drafts. This way you can't lose track of your drafted pages, in case you have a lot of them (in the mean time, you can check out the ACL-settings in the admin menus, and see which pages are marked with no permissions for @ALL). == Wish list == * To be able to update my Dokuwiki installation, I wish that this plugin was compatible with Weatherwax. ===== FAQ ===== * **Q:** What if I change the language of my DokuWiki after having marked hundreds of pages as drafts? * **A:** Tough luck, the plugin only works with the code that is specified in the language files for the language you are currently using. For example, if you enter a page that is marked with ''%%~~ENTWURF~~%%'' and your language isn't German, that text will become visible, and the page will have its ACL-settings removed by the plugin((but only if the ACL-settings were once added by this plugin, so your other ACL-settings should be safe)). FIRST select the language of your DokuWiki, then stick with that choice. ===== Discussion =====