joomla2.5 - Error plugin not run in joomla 2.5? -


i have sample:

plugins --shopping ----jcomments --------jcomment.php --------jcomment.xml 

in plugins/shopping/jcomments/jcomment.php

class plgshoppingjcomments extends jplugin function plgshoppingjcomments(&$subject, $config){ parent::__construct($subject, $config); } function onbeforedisplayproductview(&$view) { die('test'); } } 

and view.html.php of component com_shopping call

jpluginhelper::importplugin('shopping'); $dispatcher =& jdispatcher::getinstance(); $dispatcher->trigger( 'onbeforedisplayproductview', $view); 

but run code plugin not show result (die("test")), how fix plugin

try this... $dispatcher->trigger('onbeforedisplayproductview', array($view)); (i'm 60% sure work :d )


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -