1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Event Code Listener

Discussion in 'XenForo Development Discussions' started by Mythotical, Oct 13, 2010.

  1. Mythotical

    Mythotical Well-Known Member

    For what I need to do I discovered that I would need to use:

    XenForo_CodeEvent::fire('navigation_tabs', array(&$extraTabs$selectedTabId));
    Would it be possible to do an array merge with the $tabs array:
            $tabs = array();
            foreach (
    $showTabs AS $tabId => $show)
                if (!

                switch (
    $tab = array(
    'title' => new XenForo_Phrase('xportal'),
    'href' => XenForo_Link::buildPublicLink('full:xportal')
  2. Mythotical

    Mythotical Well-Known Member

    No answer at all?
  3. Kier

    Kier XenForo Developer Staff Member

    What are you actually trying to do?
  4. Mythotical

    Mythotical Well-Known Member

    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.
  5. Mythotical

    Mythotical Well-Known Member

    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.
    Digital Doctor likes this.
  6. Kier

    Kier XenForo Developer Staff Member

    I'll look into the feasibility of making the Home tab a genuine tab.
    Renada, Ben Cox, we_are_borg and 14 others like this.
  7. Mythotical

    Mythotical Well-Known Member

    Thanks Kier
  8. Digital Doctor

    Digital Doctor Well-Known Member

    Awesome !
    Until then...

    Would another approach be to
    (1) hide the current tab.
    (2) make a new tab called Home.
    (3) put the Home Page there.
    jonsidneyb likes this.
  9. Peggy

    Peggy Well-Known Member

    Yes PLEASE! :D
    jonsidneyb likes this.
  10. jonsidneyb

    jonsidneyb Well-Known Member


    Please do.
    Peggy likes this.
  11. Digital Doctor

    Digital Doctor Well-Known Member

  12. Mythotical

    Mythotical Well-Known Member

    Was it necessary to make the text that big and bold? Could you please made it regular size?

  13. Jeremy

    Jeremy Well-Known Member

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

    Mythotical Well-Known Member

    Oh I didn't think about that, thanks KK

Share This Page