====== showif Plugin ====== ---- plugin ---- description: Shows some text of a page only if a list of conditions is true author : Harald Ronge email : harald@turtur.nl type : Syntax Plugin lastupdate : 2013-10-15 compatible : Weatherwax, Adora Belle, Angua, Rincewind, Hrun, Elenor Of Tsort, Frusterick Manners, Greebo, !Hogfather depends : conflicts : similar : ifauth, condition, isauth, nodisp, ifauthex tags : hide text acl downloadurl: https://github.com/haraldronge/showif/archive/master.zip bugtracker : https://github.com/haraldronge/showif/issues sourcerepo : https://github.com/haraldronge/showif donationurl: ---- ===== Note ===== There is un-merged commit to make compatible with 'Hogfather' => https://github.com/haraldronge/showif/pull/1/commits/08b87900724521883b1ef0848d658a6d7899764e --- [[user>emtest|dcabernel]] //2021-05-07 18:06// ===== Description ===== Shows some text of a page only if a list of conditions is true.\\ Can hide sections. The text is still on the page, but not displayed. For true hiding, you would have to use the include plugin and set the appropritate ACLs. Lazy hiding based on plugin [[nodisp]] from Myron Turner.\\ This plugin is particularly useful in open Wikis with closed sections. ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. ===== Examples/Usage ===== ==== Example 1: ==== Show some welcoming text for users of a public page that are not yet logged in. You may now explore the rest of the site. Please log in to view the rest of the site. ==== Example 2: ==== Show a direct upload link if the user may edit: [[http://[yourwiki]/lib/exe/mediamanager.php?ns=:[yournamespace]:|Upload MP3-files]] ===== Syntax ===== Basic syntax: [text] * **condition** can be: * isloggedin * isnotloggedin * mayonlyread * mayatleastread * mayedit * isadmin Conditions may be a comma-separated list, all conditions have to be true to show [text].\\ Not all combinations make sense ;-) ===== Discussion ===== For me this plugin is working on 2017-02-19 "Frusterick Manners". 2017/8/10 ben ===== Known Bugs and Issues ===== This Plugin dosn't work in the sidebar from the DokuWiki default template. > Any plans to change this? I would be happy because I would need this function. 2014/01/20 cit No not currently, too much else to do, but I would be happy if somebody else would do it, code is quite simple. --- [[user>harald|Harald]] //2014/01/20 17:44// ==== Tip: ==== If you want to show and hide headings/sections use [[plugin:showif]] in combination with the [[plugin:include]]-plugin! This way you can switch whole pages. --- [[user>harald|Harald]] //2014/04/14 13:00//