Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

I need a new tab- but I need it to link to a different site...

edited October 2005 in Vanilla 1.0 Help
I have no clue what I am doing here. I have a Wordpress run blog, and Vanilla was suggested as a good forum. I have to say, I love the way it functions. The only problem is, there isnt any way for me to link back to the site. I'd like a tab to go before the "discussions" tab, and I want it to link back to the homepage. I kinda know how to work extensions, but I have NO clue how to edit or write one. Can someone help please?

Comments

  • KrakKrak New
    edited September 2005
    http://forum.hatethis.org/downloads/NewPageTabMenu.php.txt Rename all the words "NewPage" With what you want the link to be called. And rename "NewPage.php" to the URL you want the new tab to go to. Edit "$Position = "5"" to what position you want it to show up in. Before the discussion tab, try 1 I'd imagine. Edit that file and place it in your extension folder then enable it. That should do it.
  • That's about right. Try 1, I am sure that will put that tab BEFORE the discussions tab. Just a question for those MORE familar with this. Does the tab and panel position numbers start at 1 or 0? Most arrays start at 0, and I am assuming this is something similar.
  • WEll, I did what you asked, but it doesn't read as an extention when I pu it in the folder. ITs no where on the "manage extentions" list. Sigh- I'm prolly doing something stupidly wrong. <?php /* * Extension Name: hometabmaker * Extension Url: http://leavesofivy.com * Description: adds a home tab * Version: 1 * Author: me * Author Url: http://leavesofivy.com */ if (in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php", "newpage.php"))) { $Menu->AddTab("Back To Legend", "Back To Legend", "http://leavesofivy.com/Legend", "NewPageTab", $Attributes = "", $Position = "1", $ForcePosition = "1"); } ?> thats what I put- If it helps
  • In the extensions folder? Strange. I also assume you use a .php file extension? I'll test it and report back shortly.
  • <?php /* Extension Name: Home Tab Extension Url: http://skoap.com/ Description: Adds home tab Version: 1 Author: Nathan Wheatley Author Url: http://skoap.com */ if (in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))) { $Menu->AddTab("Back To Legend", "Back To Legend", "http://leavesofivy.com/Legend/", "Home Tab", $Attributes = "accesskey=\"h\" target=\"_main\"", $Position = "2", $ForcePosition = "1"); } ?>

    Try that. That is just a modified version of one I made a little while ago. Just save is as homeTab.php and put it in your extensions folder.

    Sorry Krak if this is the same code you posted, but I did not read yours line for line, so i am not sure if there are errors.

    tell me how it goes.
  • The code formatter stripped the opening <?php tag, so you will have to add it to the top. Sorry.
  • edited September 2005
    Right.

    I tidied it up a little. it will now load that link in the SAME window. It was opening your homepage in a NEW window. Fixed now. Positioning is also fixed. it is now positioned to the RIGHT of the discussions tab.

    I also put an access key. If the user presses alt+h it will take them home. Just in case you have QuickKeys on.

    I have tested htis and it all works fine.

    Home that helped.

    The source is available here.

    or here (remeber to add the < ?php before the FIRST line!):
    /* Extension Name: Home Tab Extension Url: http://skoap.com/ Description: Adds home tab Version: 1 Author: Nathan Wheatley Author Url: http://skoap.com */ if (in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))) { $Menu->AddTab("Back To Legend", "Back To Legend", "http://leavesofivy.com/Legend/", "Home Tab", $Attributes = "accesskey=\"h\" target=\"_parent\"", $Position = "1", $ForcePosition = "1"); } ?>
  • Yeah that was the same code, cept you added the hot key, which is always good. Dunno why it didnt work for him, less he didnt drop the ".txt"
  • That is very possible. I did ask him, but he has yet to respond.
  • Gosh- you just made my whole day! =o) I was so worried that the support here would be less helpfull than at wordpress (I must have 50 WP questions a week that the forums help me with) but you realy came through for me. Thankyou so much! I don't know why it wasnt working for me. I made sure it was .php but, like I said before, I prolly did something random. But THANKYOU ALL this worked so well and its absolutely perfect.
  • Oh, and is the "him " referred to, me? because I've been away from the computer, or else I would have answered your questions, and BTW- I'm a she.
  • him is a very general term. We're very open minded round here you know. And ofcourse we're helpful, we kick ass! Welcome to vanilla, enjoy your stay.
  • Glad to hear its working for ya. Enjoy Vanilla! If you ever have any other questions/problems dont hesitate to ask.
  • I'm glad it worked for you. You are more than welcome.

    Oh, and is the "him " referred to, me? because I've been away from the computer, or else I would have answered your questions, and BTW- I'm a she.

    Sorry. I just assumed. That was bad of me.

    Please don't hesitate to ask us for more support. MOST of us will be as helpful as we can be.
  • Oh, and enjoy your stay.
  • hi guys...i downloaded nathan's php file and changed the links and uploaded it to my extensions folder but i still have no new tab.
    http://pluswars.com/Forum
  • have you enabled the extension?
This discussion has been closed.