Xavier wrote: Hi,
Just one thing, you are using the "onAfterVoteUpdate" trigger but this trigger is called only when editing a vote or a comment.
Not when submitting one for the first time. I think that in your case you should use the trigger "onAfterVoteCreate".
we did try both with this amended code
<?php
class plgHikashopVote_karma extends JPlugin
{
function plgHikashopVote_karma(&$subject, $config){
parent::__construct($subject, $config);
}
public function onAfterVoteCreate(&$element,&$return_data)
{
$fp = fopen('test.txt', 'w');
fwrite($fp, 'TRIGGERED');
fclose($fp);
return true;
}
}
however, it was also not triggered, we did also try to submit new and editing existing vote and also posting comment
none of them trigerring this two event
also we notice $return_data parameter was not mentioned in documentation
is there any simple example we can sure that the event is triggered?
another thought is will template override cause some problem to event firing? we haven tried on other template