[geeklog-devel] Configuration tooltips

Tom websitemaster at cogeco.net
Sat Apr 9 11:44:21 EDT 2011

Okay so I did a little proof of concept...

I had a little bit of a problem figuring out if the hack needed to be used
or not ...

This is the way things will work

If plugin_configtooltip_foo does not exist then the old system will be used
where plugin_getdocumentationurl_foo will be checked and if a link is return
a (?) link will be placed next to the config option that will open a new

If plugin_configtooltip_foo does exist then if text is returned the text
will be put in a tooltip using COM_Tooltip.

If plugin_configtooltip_foo does exist and a NULL type is returned then the
hack will be used for the tooltip. A null can be returned be either not
returning anything from plugin_getdocumentationurl_foo or by doing this


So if the plugin has plugin_configtooltip_foo  and didn't want any tooltip
for a particular option he would just return false or an empty string.


-----Original Message-----
From: geeklog-devel-bounces at lists.geeklog.net
[mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Joe Mucchiello
Sent: April-05-11 11:08 PM
To: geeklog-devel at lists.geeklog.net
Subject: Re: [geeklog-devel] Configuration tooltips

Would it be so hard to not make a new API PLG_getConfigTooltip($plugin, $id)
that calls plugin_configtooltop_[plugin]($id) and let plugins handle this
any way they want? Move the "hack" into an internal function used by core
and whatever else wants to use the hack and have a clean implementation
going forward. Most plugins would end up looking like this:

function plugin_configtooltip_foo($id)
{   global $LANG_MYTOOLTIPS;
    if (array_key_exists($id, $LANG_MYTOOLTIPS)) return
    return false;

Create a CFG_GetTooltipFromHelp($file, $id) function to put the hack into
and let core, calendar, links and polls use that function if they want to.
(Core would call it from within PLG_getConfigTooltip, of course.)


geeklog-devel mailing list
geeklog-devel at lists.geeklog.net

More information about the geeklog-devel mailing list