1 lturner Sep 24, 2008 18:42
3 yabba Sep 25, 2008 11:55
You can actually add a custom trigger to your plugin/skin
skin :
$Plugins->trigger_event( 'my_groovy_event', $params );
Plugin :
function GetExtraEvents()
{
return array(
'my_groovy_event' => 'some cool descriptive text that\'s only ever seen in source' );
}
¥
4 lturner Sep 25, 2008 12:20
Ah, I see now...... Many thanks for your help.
I guess there is a bit of a problem when it comes to skins with this kind of thing as no skin will have the new event in them. I guess this could be a problem for the people who aren't comfortable with editing skin files.
I recently installed the Google analytics plugin and it didn't work out of the box due to the fact that the skin I was using from the skin repository didn't have the trigger event code in for SkinEndHtmlBody. I'm not sure if there is a way around this really other than checking to see if all the skins and all new skins uploaded to the repository have the standard b2evo triggers in them. It would be great to make this process easier for newbies.
Thanks again for your help.
Lee
Well, I guess it is a little crude but I can just put the trigger event higher up in the skin to solve the problem...
<body>
<?php
$Plugins->trigger_event('SkinEndHtmlBody');
?>
.......