Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Top menu items

edited January 2011 in Vanilla 2.0 - 2.8
Hi,
I'm one of the newbies in the community and trying to improve my web side(Vanilla2),so:
I'm trying to add a link at the top menu,for example in default:
"Dashboard" "Discussion" "Activity" "Inbox" "Profile"
and I want to add more items to the list,and i downloaded the Custom Page add-on.and create the page(for example chat) /plugin/page/chatt,and it's working.But i couldn't find the way to add that link into the top menu.I want to get these :
"Dashboard" "Discussion" "Activity" "Inbox" "Profile" "Chat" "and" "More" ...
thank you:)

edit: and i'm searching in the older posts before posting these questions.
Tagged:

Comments

  • no actually i'm using the newsroom theme & vanilla 2.
  • views>default.master.php
  • edited January 2011
    thank you:) but i add this line:
    $this->Menu->AddLink('Chat', T('Chat'), '/plugin/page/chatt');

    and i lost the "sign out" item from the list.

  • here is the full menu block:



    <?php
    $Session = Gdn::Session();
    if ($this->Menu) {
    $this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));
    $this->Menu->AddLink('Chat', T('Chat'), '/plugin/page/chatt');
    // $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete'));
    $this->Menu->AddLink('Activity', T('Activity'), '/activity');
    $Authenticator = Gdn::Authenticator();
    if ($Session->IsValid()) {
    $Name = $Session->User->Name;
    $CountNotifications = $Session->User->CountNotifications;
    if (is_numeric($CountNotifications) && $CountNotifications > 0)
    $Name .= ' '.$CountNotifications.'';

    $this->Menu->AddLink('User', $Name, '/profile/{UserID}/{Username}', array('Garden.SignIn.Allow'), array('class' => 'UserNotifications'));
    $this->Menu->AddLink('SignOut', T('Sign Out'), Gdn::Authenticator()->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
    } else {
    $Attribs = array();
    if (C('Garden.SignIn.Popup') && strpos(Gdn::Request()->Url(), 'entry') === FALSE)
    $Attribs['class'] = 'SignInPopup';

    $this->Menu->AddLink('Entry', T('Sign In'), Gdn::Authenticator()->SignInUrl(), FALSE, array('class' => 'NonTab'), $Attribs);
    }
    echo $this->Menu->ToString();
    }
    ?>


  • and one more question?
    How can i add mini icons from the top menu items like:
    (home icon)discussion (activity icon)activity ....etc.
    thank you for helping:) and i'm still can not find any solution for the sign out item
  • thank you for helping i just solve the problem:
    if you're using the newsroom theme(i don't check for the others) and turkish translation add-on together,and try to create new page via custom page plugin,you can not add more than one page and if you add new page to the main menu,you'll lost your "sign out" item from the list.
    to solve this problem change back to the original vanilla files(change these files : applications and conf)and translate the items yourself.do not use the TR translation add-on with custom page plugin.(maybe there is more than one solution,i just solve mine like that.)
  • I am using the default theme and would like to add a menu item to the top of the forum. I cannot find a views folder or default.master.php

    any help greatly apreciated, thank you.
Sign In or Register to comment.