plugin:autotooltip
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:autotooltip [2018-12-25 22:59] – zioth | plugin:autotooltip [2024-02-11 03:39] (current) – zioth | ||
---|---|---|---|
Line 5: | Line 5: | ||
author | author | ||
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-25 | + | lastupdate : 2024-02-10 |
- | compatible : greebo | + | compatible : Greebo, Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
conflicts | conflicts | ||
Line 13: | Line 13: | ||
tags : tooltip, abstract | tags : tooltip, abstract | ||
- | downloadurl: | + | downloadurl: |
- | bugtracker : http:// | + | bugtracker : https:// |
- | sourcerepo : http:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
Line 21: | Line 21: | ||
---- | ---- | ||
- | This syntax/ | + | This plugin allows you to construct tooltips for text and links on the page, or to automatically generate tooltips based on a wikilink' |
Line 27: | Line 27: | ||
Install the plugin using the [[plugin: | Install the plugin using the [[plugin: | ||
+ | |||
+ | |||
+ | ==== Automatically turning plain text into links with tooltips ==== | ||
+ | |||
+ | Install both this plugin and [[plugin: | ||
+ | |||
+ | |||
+ | ==== Adding tooltips to every link on your site, or specific namespaces ==== | ||
+ | |||
+ | If you're already using [[plugin: | ||
+ | |||
+ | 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 // | ||
+ | |||
===== Examples/ | ===== Examples/ | ||
- | [[http:// | + | [[http:// |
+ | |||
+ | === Generating tooltip content automatically === | ||
+ | |||
+ | < | ||
+ | |||
+ | This will generate a link to wiki: | ||
+ | |||
+ | < | ||
+ | |||
+ | Same as above, but the link text will be " | ||
=== 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 | + | === Customizing |
<autott style1 style2> | <autott style1 style2> | ||
Line 60: | Line 85: | ||
<autott picture> | <autott picture> | ||
- | |||
- | |||
- | |||
- | === Generating a tooltip === | ||
- | |||
- | < | ||
- | |||
- | This will generate a link to wiki: | ||
- | |||
- | < | ||
- | |||
- | Same as above, but the link text will be " | ||
- | |||
- | |||
- | ===== 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// -> // | ||
- | |||
- | You won't see tooltips on self-referential links. In other words, a link to // | ||
===== Configuration ===== | ===== Configuration ===== | ||
- | * style: A space-delimited set of default classes. This can include the built-in styles, or any CSS class you create that starts with " | + | * style: A space-delimited set of default classes. This can include the built-in styles, or any CSS class you create that starts with %%" |
* delay: The time in miliseconds to wait before showing a tooltip. | * delay: The time in miliseconds to wait before showing a tooltip. | ||
- | * linkall_exclusions: When using the renderer plugin to add tooltips to all links, this is a regular expression for pages or namespaces to exclude. For example, | + | * linkall_inclusions: When using the renderer plugin to add tooltips to all links, this is a regular expression for pages or namespaces to include. For example, |
+ | * linkall_exclusions: | ||
Line 95: | Line 100: | ||
=== forText === | === forText === | ||
- | Create a manual tooltip. | + | Create a manual tooltip |
$tooltip-> | $tooltip-> | ||
Line 102: | Line 107: | ||
* $title: The title inside the tooltip. | * $title: The title inside the tooltip. | ||
* $preTitle: Text to display before the title. Newlines will be rendered as line breaks. | * $preTitle: Text to display before the title. Newlines will be rendered as line breaks. | ||
- | * $classes: CSS classes to add to this tooltip. " | + | * $classes: CSS classes to add to this tooltip. |
* $textStyle - CSS styles for the linked content. | * $textStyle - CSS styles for the linked content. | ||
=== forWikilink === | === forWikilink === | ||
- | Create a wikilink. | + | Create a wikilink |
$tooltip-> | $tooltip-> | ||
Line 112: | Line 117: | ||
* $content - The on-page content. Newlines will be rendered as line breaks. Omit to use the page's title. | * $content - The on-page content. Newlines will be rendered as line breaks. Omit to use the page's title. | ||
* $preTitle - Text to display before the title in the tooltip. Newlines will be rendered as line breaks. | * $preTitle - Text to display before the title in the tooltip. Newlines will be rendered as line breaks. | ||
- | * $classes - CSS classes to add to this tooltip. " | + | * $classes - CSS classes to add to this tooltip. |
* $linkStyle - Style attribute for the link. | * $linkStyle - Style attribute for the link. | ||
plugin/autotooltip.1545775176.txt.gz · Last modified: 2018-12-25 22:59 by zioth