DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:hide

Hide plugin

Compatible with DokuWiki

No compatibility info given!

plugin Hides text from plain view

Last updated on
2009-08-01
Provides
Syntax

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Security warning (please read plugin security guidelines): Hiding parts of a DokuWiki page is not supported by the core. Most attempts to introduce ACL control for parts of a page will leak information through RSS feed, search or other core functionality.

Similar to hidden, stepbystep, togglewrap, wrap

Tagged with hide, style, syntax

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”1), but rather simply uses CSS to “hide”2), the selected content.

The effect is similar to that achieved with the spoilers in sites such as TV Tropes3), 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 Extension Manager. Refer to Plugins on how to install plugins manually.

Other Details

Demo

:!: (Neo) Demo site for the plugin. Note language is Spanish but online translators should do a good job with it.

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 Headers4)
  • Footnotes
  • Syntax for color plugins5)
The plugin “Hide” in effect, this time hiding links.
Take note that interwiki icons are also removed.
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.:
progrecss
tooltip
clock
divalign2
gil
noiewarning
linkbonus

Discussion

Leave your :?:'s here and I'll try to provide some :!:'s. – — Luis Machuca B. 2009/08/01 21:38

:?: I can hide some text (without hide, hidden or hidetext plugin) allowing embedded HTML in DokuWiki Configuration Manager, and using this code

<html><!-- ..text.. --></html>
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 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 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. — 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. — 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. — Luis Machuca Bezzaza 2011/05/04 22:46
1)
as in “remove its presence”
2)
as in “remove from plain sight”
3)
that link is only informational, please don't click it because the site is addictive, this may easily happen to you!
4)
background color depends on the template used
5)
their function is to override the color attribute
plugin/hide.txt · Last modified: 2019-11-29 12:08 by Dr-Yukon

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki