DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:hide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:hide [2011-04-27 06:35] – on hover-visibility "bug" ryan.chappelleplugin:hide [2019-11-29 12:08] (current) Dr-Yukon
Line 1: Line 1:
-====== hide plugin ======+====== Hide plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 17: Line 17:
 ---- ----
  
-**Hide** is a plugin for [[doku>|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.+**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. 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.
Line 26: Line 26:
  
   I shouldn't tell you, but my secret identity is {?Super DokuWiki Plugin Developer Sidekick Man?}.   I shouldn't tell you, but my secret identity is {?Super DokuWiki Plugin Developer Sidekick Man?}.
 +  
 +  
  
-===== Download and Installation ===== 
  
-Point the [[plugin:plugin|Plugin Manager]] to the download URL aboveThat link will always bring up the latest version.+===== Installation ===== 
 + 
 +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
  
Line 43: Line 46:
  
 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: 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 [[doku>templates|template]] used))+  * Table Headers((background color depends on the [[:templates|template]] used))
   * Footnotes   * Footnotes
   * Syntax for color plugins((their function is to override the ''color'' attribute))   * Syntax for color plugins((their function is to override the ''color'' attribute))
Line 58: Line 61:
 ==== Other Developments ==== ==== Other Developments ====
  
-^ Other Plugins by\\ Luis Machuca B.:   | [[doku>plugin:progrecss]]\\ [[doku>plugin:tooltip]]\\ [[doku>plugin:clock]]\\ [[doku>plugin:divalign2]]\\ [[doku>plugin:gil]]\\ [[doku>plugin:noiewarning]]\\ [[doku>plugin:linkbonus]]  |+^ Other Plugins by\\ Luis Machuca B.:   | [[plugin:progrecss]]\\ [[plugin:tooltip]]\\ [[plugin:clock]]\\ [[plugin:divalign2]]\\ [[plugin:gil]]\\ [[plugin:noiewarning]]\\ [[plugin:linkbonus]]  |
  
 ---- datarelated ---- ---- datarelated ----
Line 71: Line 74:
  
 :?: 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 <code><html><!-- ..text.. --></html></code> :?: 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 <code><html><!-- ..text.. --></html></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 [[doku>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//+>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 :?: 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;}   span.selectview {background-color: __background__ !important;}
 to the style sheet helps the issue, but still leaves a white box. 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// >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//
plugin/hide.1303878920.txt.gz · Last modified: 2011-04-27 06:35 by ryan.chappelle

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