[geeklog-devel] Configuration tooltips

Joe Mucchiello jmucchiello at yahoo.com
Tue Apr 5 23:07:30 EDT 2011


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 $LANG_MYTOOLTIPS[$id]; 
    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.)

  Joe




More information about the geeklog-devel mailing list