Hi guys,
I've been trying to work this out for HOURS now - and am having no luck
I have tried using the override folder, but couldn't get it to work - so for now, im just editing the original files -- once it works, i'll try and move my mods to the override files)
In themes\{my-theme}\header.tpl. I added this...
{$HOOK_MYTEST}
In classes\FrontController.php. I added the following line...
self::$smarty->assign(array(
'HOOK_HEADER' => Module::hookExec('header'),
'HOOK_TOP' => Module::hookExec('top'),
'HOOK_MYTEST' => Module::hookExec('mytest'), /// MY NEW LINE!!!
'HOOK_LEFT_COLUMN' => Module::hookExec('leftColumn')
));
In modules\blockpermanentlinks\blockpermanentlinks.php.
I added $this->registerHook('mytest') into the install function...
function install()
{
return (parent::install() AND $this->registerHook('top') AND $this->registerHook('mytest') AND $this->registerHook('header'));
}
I also added...
function hookmytest($params)
{
echo 'hello hello hello hello';
return 'hello hello hello hello';
}
Then, in my database, in the ps_hook table, i added a new row, with...
name: mytest
title: mytest
desc: just a test
position: 1
live_edit 0
I have turned on.. Back Office > Preferences > Performance > Force compile.
And i have disabled Cache.
I have tried so many guides on the net, and in this forum, but none seem to work.
Please help!
Thanks for reading.