So I am trying to create a plugin so that I can add modules to the portal page, however I can not seem to figure out how to get this working. When I do the eval function directly in the portal.php file, it works, but when I hook into the portal with the plugin, it does not. However using die("Whatever.."); works just fine.
Above is my current code. Where the {$acarHighscores} will not work, and I am rather confused as to why. And please keep in mind that this is my first attempt on creating a MyBB plugin.
Thanks for any help, it will be greatly appreciated!
Solved this. Think all I did was changing the capitalized letter in my variable to a lowercase letter. $acarscores rather than $acarScores.
function acar_highscores_run_global()
{
global $plugins;
$plugins->add_hook('portal_end', 'acar_highscores_addModule');
}
function acar_highscores_addModule()
{
global $templates ;
$acarHighscores = '';
eval("\$acarHighscores = \"".$templates->get("acarnus_highscores_template")."\";");
}
Above is my current code. Where the {$acarHighscores} will not work, and I am rather confused as to why. And please keep in mind that this is my first attempt on creating a MyBB plugin.
Thanks for any help, it will be greatly appreciated!
Solved this. Think all I did was changing the capitalized letter in my variable to a lowercase letter. $acarscores rather than $acarScores.