Event Code Listener

Cupara

Well-known member
For what I need to do I discovered that I would need to use:

PHP:
XenForo_CodeEvent::fire('navigation_tabs', array(&$extraTabs, $selectedTabId));

Would it be possible to do an array merge with the $tabs array:
PHP:
        $tabs = array();
        foreach ($showTabs AS $tabId => $show)
        {
            if (!$show)
            {
                continue;
            }

            switch ($tabId)
            {
                case 'lorem':
                    $tab = array(
                        'title' => new XenForo_Phrase('xportal'),
                        'href' => XenForo_Link::buildPublicLink('full:xportal')
                    );

Cheers
 
Replace the Home tab so that when I am on my portal page it will highlight the home tab instead without having to run extraTabs cuz that would look weird being Forums | Home

I found that adding the code to Public.php would solve that and I want to see about an array merge so that I can just include the extra code in an event listener.
 
Better explanation: I am trying to replace the Home tab with one that will properly link to my portal and show as selected when viewing the portal. The only problem is that the home tab doesn't have a way to identify it for selecting. I am trying to avoid having people who install my portal addon to have to edit php files. Would be much easier to make it all automatic.
 
Was it necessary to make the text that big and bold? Could you please made it regular size?

Thanks
 
I'm pretty sure he just copy & pasted the title from the page, and that's how TinyMCE formatted it.
 
Top Bottom