====== Hide plugin ====== ---- plugin ---- description: Hides text from plain view author : Luis Machuca Bezzaza email : luis [dot] machuca [at] gulix [dot] cl type : Syntax lastupdate : 2009-08-01 compatible : depends : conflicts : similar : hidden tags : hide syntax style securitywarning: partlyhidden downloadurl: http://ryan.gulix.cl/dw/_media/desarrollo/dokuwiki/dw-plugin-hide-latest.zip ---- **Hide** is a plugin for [[:DokuWiki]] that does something as simple as hiding text. The way it does is different from plugins such as Hidden, in that Hide does not create a specific section or uses programming to "hide"((as in "remove its presence")), but rather simply uses CSS to "hide"((as in "remove from plain sight")), the selected content. The effect is similar to that achieved with the spoilers in sites such as [[http://www.tvtropes.org/|TV Tropes]]((that link is only informational, //please// don't click it because the site is addictive, [[http://xkcd.com/609/|this]] may easily happen to you!)), for example. ===== Syntax ===== Just surround the text to be hidden with %%{?%% and %%?}%%, like this: I shouldn't tell you, but my secret identity is {?Super DokuWiki Plugin Developer Sidekick Man?}. ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. ===== Other Details ===== ==== Demo ==== :!: [[http://ryan.gulix.cl/dw/desarrollo/dokuwiki/plugin-hide|(Neo) Demo site for the plugin]]. Note language is **Spanish** but online translators should do a good job with it. ^ {{http://ryan.gulix.cl/archivos/dokuwiki/scr-plugin-hide-01.png?nolink}} ^ | The plugin "Hide" in effect.\\ Note how the hidden text can be made visible by selecting it with a pointer. | ==== Known Limitations ==== Right now (''2009-08-01''), the plugin **is not guaranteed to** hide text in the following page constructs, due to the CSS they use being different: * Table Headers((background color depends on the [[:templates|template]] used)) * Footnotes * Syntax for color plugins((their function is to override the ''color'' attribute)) ^ {{http://ryan.gulix.cl/archivos/dokuwiki/scr-plugin-hide-02.png?nolink}} ^ | The plugin "Hide" in effect, this time hiding **links**.\\ Take note that interwiki icons are also removed. | ^ {{http://ryan.gulix.cl/archivos/dokuwiki/scr-plugin-hide-03.png?nolink}} ^ | The plugin "Hide" in effect, this time in a **table header**.\\ See the section on [[#Known Limitations]]. | ==== Other Developments ==== ^ Other Plugins by\\ Luis Machuca B.: | [[plugin:progrecss]]\\ [[plugin:tooltip]]\\ [[plugin:clock]]\\ [[plugin:divalign2]]\\ [[plugin:gil]]\\ [[plugin:noiewarning]]\\ [[plugin:linkbonus]] | ---- datarelated ---- cols : author title : Other Projects ---- ===== Discussion ===== Leave your :?:'s here and I'll try to provide some :!:'s. -- --- //[[luis.machuca@gulix.cl|Luis Machuca B.]] 2009/08/01 21:38// :?: I can hide some text (without [[plugin:hide]], [[plugin:hidden]] or [[plugin:hidetext]] plugin) allowing embedded HTML in DokuWiki Configuration Manager, and using this code >Under the same logic all of the plugins can be avoided by writing the resulting HTML code directly, no? Sorry, that logic doesn't apply that much, and if that was the issue you'd left the comment on the [[plugin:wrap]] page rather than here. Besides, there are different mechanisms for hiding stuff. The one this plugin implements only hides the text from the visual, but it is still here-- ''ifauth'' and other plugins will actually remove it from the rendered page, and so on. Plus a short tag is easier, and allowing HTML in a wiki has other consequences. Long story short, plugins are conveniences. --- //[[luis.machuca@gulix.cl|Luis]] 2010/03/11 18:42// :?: I noticed an oversight the other day that unintentionally may show hidden text. It happens when you hover the mouse pointer over the section's "edit" button. Example: http://ompldr.org/vOGYxOA/password.png Adding span.selectview {background-color: __background__ !important;} to the style sheet helps the issue, but still leaves a white box. >Taken notice of the situation. It is not an oversight as much as it is a functional lacking of CSS. The purpose of this plugin is to only visually hide text from the page by making it invisible, nothing more. However, as it is impossible to make a CSS rule that applies "whatever this other property has" as a value, this is essentially impossible to do by CSS alone if an external event changes the CSS colours, as hapens with the reported "bug" (where a hover changes the entire section's background text). I'm testing with ''visibility:hidden'', but it seems to break such elementary things as being able to select the text. I'll provide an alternate download with this method anyway...\\ Bottom line, and as the plugin warning say, hiding text is not supporting at the core level, so if you really want to hide something like a root password in a DokuWiki page you should be thinking of presenting either a scrambled output (legible to only a group of people) or having that information only present in an adequately ACL-ed page. --- [[user>ryan.chappelle|Luis Machuca Bezzaza]] //2011/04/27 05:44// >> This is not really true. Whenever you set a color or background-color on its own in CSS, you'll always get a warning from the validator: "You have no background-color set (or background-color is set to transparent) but you have set a color. Make sure that cascading of colors keeps the text reasonably legible." \\ For accessibility and other reasons it is good practice to always set color and background-color together! In this case setting the background-color to the same value as the color is the only sensible thing to do. --- [[user>ach|Anika Henke]] //2011/05/01 16:36// >>> After som check, and taking the time to reformat the code, I think the general issue is fixed. I went both with the ''background-color'' approach, which is what was suggested and retains the same operability, but leaves horrible decolored boxes around places; and an alternative version which plays with ''visibility'', guaranteeing that the text is hidden from view, at the cost of breaking the availability upon selection in certain browsers (which would mean, for example, that the text may be not possible to copy to the clipboard). I'm uploading both versions to my server so they should be in for my next edit. --- [[user>ryan.chappelle|Luis Machuca Bezzaza]] //2011/05/04 22:46//