Plugin development 2 - Joomla! Forum - community, help and support
hi,
well, interesting day... couple of grey hairs more have say. still struggling lot write plugin in object orientated fashion described here. http://dev.joomla.org/component/option,com_jd-wiki/itemid,/id,plugins:create_plugin/
triggering event works fine (or believe):
listening event core issue me:
the 'legacy' way works fine:
the object orientated way fails , don't know way @ all:
it seems me joomla! access file doesn't execute member function 'onsearchsuccesfull ' reflects events name.... missing?
thanks , sorry starting new post other 1 became bit messy.
thanks,
uwe
well, interesting day... couple of grey hairs more have say. still struggling lot write plugin in object orientated fashion described here. http://dev.joomla.org/component/option,com_jd-wiki/itemid,/id,plugins:create_plugin/
triggering event works fine (or believe):
code: select all
jpluginhelper::importplugin('search');
$result = $mainframe->triggerevent('onsearchsuccesfull',array(&$sresult));
listening event core issue me:
the 'legacy' way works fine:
code: select all
<?php
// no direct access
defined( '_jexec' ) or die( 'restricted access' );
$mainframe->registerevent( 'onsearchsuccesfull', 'plgpopulatemodule' );
function plgpopulatemodule ($param) {
return $param;
}
the object orientated way fails , don't know way @ all:
code: select all
<?php
defined('_jexec') or die();
jimport('joomla.event.plugin');
class plgsearchbar extends jplugin{
var $param = null;
function plgsearchbar(& $subject) {
parent::__construct($subject);
$this->_plugin = jpluginhelper::getplugin( 'search', 'plgehivesearchbar' );
$this->_params = new jparameter( $this->_plugin->params );
}
function onsearchsuccesfull ($param) {
$param = "testpluginehive";
return $param;
}
}
it seems me joomla! access file doesn't execute member function 'onsearchsuccesfull ' reflects events name.... missing?
thanks , sorry starting new post other 1 became bit messy.
thanks,
uwe
uwe -
is possible onsearchsuccesfull spelled incorrectly (should onsearchsuccessful) problem?
just guess?
amy
is possible onsearchsuccesfull spelled incorrectly (should onsearchsuccessful) problem?
just guess?
amy
Comments
Post a Comment