| Creating Custom Events -
17-11-2006, 05:10 PM
Anyone know how to do this?
With an event I mean one such as "View Downloaded Files". You trigger it with a link "index.php?_m=downloads&_a=view".
It is then setup in a class "downloads" as
$events->registerEvent(EVENT_CLIENT, MODULE_DOWNLOADS, "view");
And finally you call upon some code in a eventcallback such as
if ($eventtype == EVENT_CLIENT && $eventaction == "view")
include_once("something.php");
It seems like a perfect way of building a plugin, but it seems to be registered in includes/functions.php as well, which is encrypted...
Any thoughts? How do you setup your customizations?
//Magnus |