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

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -