Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.

Icon in Tab

edited March 2007 in Vanilla 1.0 Help
Where are the actual tabs constructed?
I want to replace the word "Search" in the tab with an icon. pic

Posted: Friday, 23 March 2007 at 3:20PM (AEDT)


  • That would be Themes/Menu.php. You would need to put an IF in that while loop to check for the search tab and replace it with the icon source.

    Or I suppose you could add an class or ID attribute to it and style the tab with CSS.
  • Thanks WallPhone I did see this in themes/menu.php...
    while (list($Key, $Tab) = each($this->Tabs)) {
    echo 'TabClass($this->CurrentTab, $Tab['Value']).'>

    I thought there was a more expanded bit somewhere that was more human-readable.
    I can usually hack PHP to achieve my needs but this is too complex for me.
    Like a dog with a bone, I'll bury it soon.

    Posted: Friday, 23 March 2007 at 3:39PM (AEDT)

  • edited March 2007
    try this
    while (list($Key, $Tab) = each($this->Tabs)) {
    echo 'TabClass($this->CurrentTab, $Tab['Value']).' id="icon-'.$Tab['Text'].'">
    '.$Tab['Text'].''; }

    then u can add the icons using css

    #icon-Discussions {}
    #icon-Categories {}
  • Thanks mate but I think I've done it!

    It even hides the account icon pic for guests and only shows the settings icon pic for me.

    Not as neatly as your suggestion I'm sure but it seems to work, now to test it in exploder!

    I will however try and work out your suggestion, it's probably more efficient than my hack.

    Posted: Friday, 23 March 2007 at 5:41PM (AEDT)

  • @ Wanderer: nice job hacking vanilla.

    How did you get that front page set-up? is it an extension that I'm not aware of?
  • No special setup, simply Page Manager (with a little embedded php code).

    Posted: Friday, 23 March 2007 at 6:57PM (AEDT)

This discussion has been closed.