New tab positioning not working

edited May 2006 in Vanilla 1.0 Help
Can anyone point out what I'm doing wrong here? I'm trying to make a new tab that signs the user out, and I would like that tab to be on the right-most side of the tab menu. No mater what I do with the positioning values I cannot get it to appear anywhere but the left-most side (to the left of "Discussions").

<?php /* Extension Name: Signout Tab Extension Url: http://www.gubbish.org Description: Adds Sign Out tab Version: 1 Author: Chead Author Url: http://www.gubbish.org */ if (in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))) { $Menu->AddTab("Sign Out", "Sign Out", "http://www.sanfrancisquad.com/vanilla/people.php?PostBackAction=SignOutNow", "Signout Tab", $Attributes = "", $Position = "6", $ForcePosition = "1"); } ?>

Comments

  • Try using position 60 or something. I think the position values run up in 10s.
  • "Tab position seem to be 10, 20, 30... therefore to insert a tab in second place it should be (2*10)-5 = 15"


    SkyBlueshoes
  • edited May 2006
    Nope, I tried "6", "60" and "600", and none of them work. I can't get it to move into any spot other than the left-most position.

    Edit: I also tried "15" and it didn't move.
  • edited May 2006
    Oh I see, you've got it in the wrong position in your AddTab statement. It should be the 5th element, like this: $Menu->AddTab('title', 'name', 'homepage', 'unused', 'position'); you've got something inbetween homepage and position there ;)
  • Ah, that was the problem! Thanks so much!
  • You're quite welcome! :D Now if only I can figure out how to get Vanilla to show a custom page by default at start rather than displaying the Discussions page
  • MarkMark Vanilla Staff
    @skyblue - throw a .htaccess file in the vanilla root (or alter the one there) so that apache points to a different file by default (instead of index.php) when accessing the folder.
This discussion has been closed.