
$e = &$modx->Event;
switch ($e->name) {
case "OnDocPublished":

I’ve only found this ’documentation’ of it so far, the search isn’t too helpful and I didn’t find any examples yet, but it seems kind of straightforward.
I’m glad that the plugin works !!
I wasn’t sure of the event to use... I’m not so familiar with the event notion...
@doze: thanks to mention the use of $modx->invokeEvent("OnDocPublished");
Do a tutorial or a post exist on this subject ?
$modx->invokeEvent("OnDocPublished"); // redirect to post id
$modx->sendRedirect($modx->makeUrl($postid));That solved it, the code is really executed now, I’ve got a brand new error now though, concerning the plugin code,
In the snippet, try:
$modx->invokeEvent("OnDocPublished",array("docid"=>$lastInsertId));
and put it before the redirecting.. ..and no, I’m not very familiar with the event invoking either and don’t remember any posts about it, but I think it should work something like this..
« MODx Parse Error » MODx encountered the following error while attempting to parse the requested resource: « PHP Parse Error » PHP error debug Error: fsockopen() [function.fsockopen]: unable to connect to rpc.technorati.com:80 (Connection timed out) Error type/ Nr.: Warning - 2 File: /chroot/home/user/domain/html/assets/plugins/weblogpinger/xmlrpc.inc Line: 1304 Line 1304 source: $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr); Parser timing MySQL: 0.1009 s (22 Requests) PHP: 45.4746 s Total: 45.5755 s