Hello! I've been working on this for the last 2 - 3 days and I cannot get it to work. I've been following the advice on the forum. I want to add a button in the user's members area. This button should redirect to the forum we have set on the server (www.domainname.com/forum). I've tried the stuff in the following thread: http://www.amember.com/forum/threads/how-to-customise-amember-user-tab-menu.14129/ Though everything gives me an error... Parse error: syntax error, unexpected '<' in /home/private/public_html/membersarea/application/configs/site.php on line 7 Parse error: syntax error, unexpected '<' in /home/private/public_html/membersarea/application/configs/site.php on line 15 Obviously I am doing something wrong... I use the file located in the amember/applications/configs/site-dist.php and renamed it to site.php to override default functions.. After renaming it gives the error. So to summarize, adding a redirect button to a forum is I need to do.. Help would be appreciated! Steven
Code: <?php if (!defined('INCLUDED_AMEMBER_CONFIG')) die("Direct access to this location is not allowed"); <?php Am_Di::getInstance()->hook->add(Am_Event::USER_MENU, 'onUserMenu'); function onUserMenu(Am_Event $event) { $event->getMenu()->addPage( array( 'id' => 'pageid', 'label' => 'Forum', 'uri' => '/forum', 'order' => 1000 ) ); } ?>
There is unnecessary <?php try this PHP: <?php Am_Di::getInstance()->hook->add(Am_Event::USER_MENU, 'onUserMenu');function onUserMenu(Am_Event $event) { $event->getMenu()->addPage( array( 'id' => 'pageid', 'label' => 'Forum', 'uri' => '/forum', 'order' => 1000 ) ); }
Worked like a charm Thanks Alex. Immediately installed on both my licenses and another copy I manage for a partner.