[geeklog-devel] PLG_afterSaveSwitch

Joe Mucchiello joe at throwingdice.com
Fri Apr 25 03:13:34 EDT 2008


There's no reason the 'home' and 'admin' methods need to use a generic message.

case 'home':
// the plugins messages are not available, use generic
$url = $_CONF['site_url'] . '/index.php?msg=15';
break;

case 'admin':
// the plugins messages are not available, use generic
$url = $_CONF['site_admin_url'] . '/moderation.php?msg=15';
break;

They could say:
$url = $_CONF['site_url'] . '/index.php';
if (!empty($msg)) {
$url .= '?' . $msg . '&plugin=' . $plugin;
}

The message is going to be processed by COM_showMessage and that
function knows to look for the plugin parameter.

public_html/admin/moderation.php would need to have the code to
process plugin= found in public_html/index.php added to it around line 648:

if (isset ($_GET['msg'])) {
$plugin = '';
if (isset ($_GET['plugin'])) {
$plugin = COM_applyFilter ($_GET['plugin']);
}
$display .= COM_showMessage (COM_applyFilter ($_GET['msg'],
true), $plugin);
}


(And while you are looking at moderation.php, modify line 209 as follows:
$retval .=
$admin_templates->finish($admin_templates->parse('output','cc'));
)


----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com




More information about the geeklog-devel mailing list