DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:autotooltip

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
Last revisionBoth sides next revision
plugin:autotooltip [2019-10-25 10:06] Dr-Yukonplugin:autotooltip [2024-01-15 15:04] zioth
Line 5: Line 5:
 author     : Eli Fenton author     : Eli Fenton
 email      : elifenton@this_is_not_a_real_email.fake email      : elifenton@this_is_not_a_real_email.fake
-type       : syntax, helper, renderer +type       : syntax, helper, action, renderer 
-lastupdate : 2018-12-28 +lastupdate : 2024-01-15 
-compatible : Greebo+compatible : Greebo, Hogfather, Igor, Jack Jackrum
 depends    :  depends    : 
 conflicts  conflicts 
Line 21: Line 21:
 ---- ----
  
-This syntax/helper plugin allows you to construct tooltips for text on the page, or to automatically generate tooltips based on a wikilink's title and abstract. If you enable the renderer plugin, it can even add a tooltip to every internal wikilink on your site!+This plugin allows you to construct tooltips for text and links on the page, or to automatically generate tooltips based on a wikilink's title and abstract. If you enable the renderer plugin or install [[plugin:actionrenderer|ActionRenderer]], it can even add a tooltip to every internal wikilink on your site!
  
  
Line 27: Line 27:
  
 Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.
 +
 +
 +==== Automatically turning plain text into links with tooltips ====
 +
 +Install both this plugin and [[plugin:autolink4|Autolink 4]]. The configuration options for Autolink 4 allow you to specify text or regular expressions, and automatically turn those into links with tooltips.
 +
 +
 +==== Adding tooltips to every link on your site, or specific namespaces ====
 +
 +If you're already using [[plugin:actionrenderer|ActionRenderer]] as your renderer, this will happen automatically. Otherwise, Go to //Admin// -> //Configuration// -> //Advanced// -> //renderer_xhtml//, and select "Auto-Tooltip." Note that you can only have one custom renderer, so this is not compatible with other renderer plugins.
 +
 +You can limit this to specific namespaces or pages using the configuration options.
 +
 +You won't see tooltips on self-referential links. In other words, a link to //wiki:whatever// on //wiki:whatever// will not have a tooltip.
 +
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
-[[http://zioth.com/dev/dokuwiki/autotooltip|See these examples live.]]+[[http://zioth.com/dev/dokuwiki/autotooltip|See these examples live]]
 + 
 +=== Generating tooltip content automatically === 
 + 
 +  <autott>wiki:syntax</autott> 
 + 
 +This will generate a link to wiki:syntax, using the page's title as the link text. The tooltip will include the page's title and abstract. 
 + 
 +  <autott>wiki:syntax|Custom Title</autott> 
 + 
 +Same as above, but the link text will be "Custom Title."
  
 === Manual tooltips === === Manual tooltips ===
Line 41: Line 66:
 This creates a simple tooltip for text on the page. This creates a simple tooltip for text on the page.
  
-=== Customizing a tooltip ===+=== Customizing appearance ===
   <autott style1 style2>...</autott>   <autott style1 style2>...</autott>
  
Line 60: Line 85:
  
   <autott picture>...</autott>   <autott picture>...</autott>
- 
- 
- 
-=== Generating a tooltip === 
- 
-  <autott>wiki:syntax</autott> 
- 
-This will generate a link to wiki:syntax, using the page's title as the link text. The tooltip will include the page's title and abstract. 
- 
-  <autott>wiki:syntax|Custom Title</autott> 
- 
-Same as above, but the link text will be "Custom Title." 
- 
- 
-===== Adding tooltips to every link ===== 
- 
-Using the syntax above, you can add tooltips to any wikilink, but what if you want a tooltip on //every// wikilink? 
- 
-To enable this feature, go to //Admin// -> //Configuration// -> //Advanced// -> //renderer_xhtml//, and select "Auto-Tooltip." Unfortunately, DokuWiki only allows you to use one renderer plugin at a time, so this won't work with any other renderer plugin. If you can't use this renderer plugin, consider [[plugin:autolink4|Auto-link 4]], which can add tooltips to links that it generates. 
- 
-You won't see tooltips on self-referential links. In other words, a link to //wiki:whatever// on //wiki:whatever// will not have a tooltip. 
  
  
Line 96: Line 100:
  
 === forText === === forText ===
-Create a manual tooltip.+Create a manual tooltip on arbitrary text.
   $tooltip->forText($content, $tooltip, $title='', $preTitle='', $classes='', $textStyle='');   $tooltip->forText($content, $tooltip, $title='', $preTitle='', $classes='', $textStyle='');
  
Line 107: Line 111:
  
 === forWikilink === === forWikilink ===
-Create a wikilink.+Create a wikilink with a tooltip.
   $tooltip->forWikilink($id, $content=null, $classes='', $linkStyle='');   $tooltip->forWikilink($id, $content=null, $classes='', $linkStyle='');
  
plugin/autotooltip.txt · Last modified: 2024-02-11 03:39 by zioth

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