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.
Options

How would one set view permissions for the Add Menu Item 1.1 plugin

retoidretoid New
edited May 2012 in Vanilla 2.0 - 2.8

http://vanillaforums.org/addon/addmenuitem-plugin

This addon adds 3 extra menu links. Though they are not viewable to unauthenticated users. How would I go about setting the permissions on these?
If not, is there possibly someone who could point me in the right direction to adding a few more menu items myself and allowing them to be viewable to all users/roles?

Thanks

Tagged:

Best Answer

  • Options
    peregrineperegrine MVP
    edited May 2012 Answer ✓

    If you want unauthenticated users to see it...

    comment this line in default.php

    if ($Sender->Menu && $Session->IsValid()) {

    add this line
    if ($Sender->Menu) {

    like so

    // if ($Sender->Menu && $Session->IsValid()) {  
    if ($Sender->Menu) { 
    

    let me know if that works for you.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Answers

  • Options
    peregrineperegrine MVP
    edited May 2012 Answer ✓

    If you want unauthenticated users to see it...

    comment this line in default.php

    if ($Sender->Menu && $Session->IsValid()) {

    add this line
    if ($Sender->Menu) {

    like so

    // if ($Sender->Menu && $Session->IsValid()) {  
    if ($Sender->Menu) { 
    

    let me know if that works for you.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    peregrine, Thank you very much, that worked perfectly. :)

  • Options
    peregrineperegrine MVP
    edited May 2012

    I aim to please. glad you "liked it"

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Thank you, I was also looking forward to change this behavior and just show my links to everyone regardless of being logged or not.

    Additional info, I also commented the line where the session is grabbed:
    //$Session = Gdn::Session();

  • Options

    peregrine said:
    If you want unauthenticated users to see it...

    comment this line in default.php

    if ($Sender->Menu && $Session->IsValid()) {

    add this line
    if ($Sender->Menu) {

    like so

    // if ($Sender->Menu && $Session->IsValid()) {  
    if ($Sender->Menu) { 
    

    let me know if that works for you.

    Made like that :) it's working, thank you for this tip

  • Options

    nunobrito said:
    Additional info, I also commented the line where the session is grabbed:
    //$Session = Gdn::Session();

    ok, I 'll do it :) thank you

Sign In or Register to comment.