Difference between revisions of "PLG getplugin getConfigTooltip"

From GeeklogWiki
Jump to: navigation, search
(New page: As of 1.8.0 Geeklog's Configuration offers support for tooltips for configuration options. The following plugin API function provides this information: <pre>function PLG_getConfigTooltip(...)
 
(Conventions)
Line 13: Line 13:
 
* If the function does not exist the Configuration will fall back and use the documentation URL from plugin_getdocumentationurl_foo.
 
* If the function does not exist the Configuration will fall back and use the documentation URL from plugin_getdocumentationurl_foo.
 
* If the function returns a NULL then a tooltip will be displayed based on information found in the document provided by plugin_getdocumentationurl_foo. This document needs to be formatted similar to Geeklog's documentation in order for it to work.
 
* If the function returns a NULL then a tooltip will be displayed based on information found in the document provided by plugin_getdocumentationurl_foo. This document needs to be formatted similar to Geeklog's documentation in order for it to work.
* If text is returned for a given $id then Geeklog's own tooltip system will be used.
+
* If text is returned for a given config option then Geeklog's own tooltip system will be used.
* If a blank string returned then no tooltip will be displayed and if a URL is returned from plugin_getdocumentationurl_foo that will be used instead.
+
* If a blank string is returned then no tooltip will be displayed and if a URL is returned from plugin_getdocumentationurl_foo that will be used instead.
  
  
 
[[Category:Plugin Development]]
 
[[Category:Plugin Development]]

Revision as of 17:19, 10 April 2011

As of 1.8.0 Geeklog's Configuration offers support for tooltips for configuration options. The following plugin API function provides this information:

function PLG_getConfigTooltip($group, $id)

Where $group is the internal name of the plugin (e.g. 'spamx') and $id is the name of the configuration option being requested.

On the plugin side, this would be implemented as

function plugin_getconfigtooltip_foo($file)

Conventions

  • If the function does not exist the Configuration will fall back and use the documentation URL from plugin_getdocumentationurl_foo.
  • If the function returns a NULL then a tooltip will be displayed based on information found in the document provided by plugin_getdocumentationurl_foo. This document needs to be formatted similar to Geeklog's documentation in order for it to work.
  • If text is returned for a given config option then Geeklog's own tooltip system will be used.
  • If a blank string is returned then no tooltip will be displayed and if a URL is returned from plugin_getdocumentationurl_foo that will be used instead.