2015-01-11, 02:44 PM
hi!
I really don't know, what I am doing wrong. I have modified the header-template like this:
<ul class="menu top_links">
<!-- rpgchar -->{$rpgchar_menu}<!-- /rpgchar -->{$menu_portal}
{$menu_search}
Now I have tried several hooks, let's just take this one as an example:
$plugins->add_hook("index_start", "rpgchar_makemenu");
And it jumps in the following function:
function rpgchar_makemenu()
{
global $db,$rpgchar_menu;
$rpgchar_menu = "<li><a href=\"{$mybb->settings['bburl']}/mypage.php\" class=\"help\">My page</a></li>";
}
What am I doing wrong? The template works, I get the remarks. And I could echo the $rpgchar_menu, so the hook seems to work too. But it seems that the variable is not global or the template could not access it. I first thought of a wrong variable name in the template.
I solved so many problems the last days and now I am stuck with this little last thing, I want to link my page… Could anybody help me please?
I really don't know, what I am doing wrong. I have modified the header-template like this:
<ul class="menu top_links">
<!-- rpgchar -->{$rpgchar_menu}<!-- /rpgchar -->{$menu_portal}
{$menu_search}
Now I have tried several hooks, let's just take this one as an example:
$plugins->add_hook("index_start", "rpgchar_makemenu");
And it jumps in the following function:
function rpgchar_makemenu()
{
global $db,$rpgchar_menu;
$rpgchar_menu = "<li><a href=\"{$mybb->settings['bburl']}/mypage.php\" class=\"help\">My page</a></li>";
}
What am I doing wrong? The template works, I get the remarks. And I could echo the $rpgchar_menu, so the hook seems to work too. But it seems that the variable is not global or the template could not access it. I first thought of a wrong variable name in the template.
I solved so many problems the last days and now I am stuck with this little last thing, I want to link my page… Could anybody help me please?