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

Moving Plugins from main menu to side panel

2»

Comments

  • Options

    Shall I leave this plugin alone then? :)
    Is there an alternative, do you know?

  • Options

    you could also easily add links via

    messages option in dashboard

    or via pockets plugins

    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

    I can edit my post and delete the code (for future readers) if that's ok?

  • Options

    @x00, I've tried what he suggests (when he says to comment out if you want to add the link manually) which removes it from the menu, but I cannot find where & how to place it into the side panel.
    This is why I asked, after upgrading Vanilla, if it is now easier to achieve this.

  • Options
    peregrineperegrine MVP
    edited October 2013

    As per x00

    @x00 said:
    First removing the links

    create a file in your themes folder class.modsthemehooks.php and insert

    <?php if (!defined('APPLICATION')) exit();
    class ModsThemeHooks extends Gdn_Plugin{
      public function Base_BeforeFetchMaster_Hander($Sender){
           $Sender->Menu->RemoveLink('Members',T('Members'));
    }
    }
    

    I don't know which plugin is All Viewed so i can't comment on how to remove the links, till I have this info.

    Regarding adding links to the panel. Aolee method will work but it is not how I'd do it. The reason is that is hard coded, it is not making use of the panel asset by adding module, or adding to an existing module.

    It actually depends what you wan to do how you would do it.

        //ADD THIS TOO
    
       $Sender->Menu->RemoveLink('AllViewed', T('Mark All Viewed');
    

    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 said:
    you could also easily add links via

    messages option in dashboard

    or via pockets plugins

    I have the Pockets plugin installed, but I'm not sure how to get the plugins linked through a Pocket.

  • Options
    x00x00 MVP
    edited October 2013

    Sorry I should have checked in default plugins.
    in class.modsthemehooks.php in you them folder put

    <?php if (!defined('APPLICATION')) exit();
    class ModsThemeHooks extends Gdn_Plugin{
        public function Base_BeforeFetchMaster_Hander($Sender){
            $Sender->Menu->RemoveLink('Members',T('Members'));
            $Sender->Menu->RemoveLink('AllViewed', T('Mark All Viewed'));
        }
    }
    

    grep is your friend.

  • Options

    Thanks guys.

    I shall implement all you've given me.

    Again, I don't know what I'd do without your advice & experience.

  • Options
    peregrineperegrine MVP
    edited October 2013

    remove the links as specified above.

    add the links via pockets or dashboard messages.

    cut an paste the link that is shown when you hover over the link in the menu, if you want to hard code it the easy way via pockets or dashboard messages or read up on adding modules.

    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

    it doesn’t surprise me if the upgrade failed if you used one of the click installers, from a host panel. I've not found them to be reliable, and they have old version of the software. Better to install from scratch.

    grep is your friend.

  • Options
    peregrineperegrine MVP
    edited October 2013

    @marthajane77 said:
    Thanks guys.

    I shall implement all you've given me.

    Again, I don't know what I'd do without your advice & experience.

    No problem.

    You ask good questions, you provide version numbers of plugins and vanilla.

    You are responding to answers,

    some people ask a question, and never respond back when they get an answer, never say thanks and never click on reactions.

    you've done all four!

    And I learned a new function and use from @x00's :) thx. x00

    public function Base_BeforeFetchMaster_Hander($Sender){

    perhaps others will learn how to frame a question with the proper info - by following in your footsteps.

    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

    I was over-complicating it for myself, as usual :/
    I completely forgot how to add links, then after your suggestion @peregrine:

    @peregrine said: cut an paste the link that is shown when you hover over the link in the menu, if you want to hard code it the easy way via pockets or dashboard messages or read up on adding modules.

    it all came back!

    With that in mind, removing the links from the menu as stated in the code below:

    @x00 said:
    Sorry I should have checked in default plugins.
    in class.modsthemehooks.php in you them folder put

    <?php if (!defined('APPLICATION')) exit();
    class ModsThemeHooks extends Gdn_Plugin{
        public function Base_BeforeFetchMaster_Hander($Sender){
            $Sender->Menu->RemoveLink('Members',T('Members'));
            $Sender->Menu->RemoveLink('AllViewed', T('Mark All Viewed'));
        }
    }
    

    and sticking with the hard code - http://vanillaforums.org/discussion/comment/148713/#Comment_148713 - (thanks @Aolee)&gt;

    it all now works perfectly!!

    Thank you so much @x00 & @peregrine & @Aolee

  • Options

    Thanks @peregrine. You really have helped me several times now on different threads.
    I can't understand how other people asking questions can be so abrupt, when you guys all give up your time for their benefit.

  • Options
    peregrineperegrine MVP
    edited October 2013

    @marthajane77 said:

    I can't understand how other people asking questions can be so abrupt, when you guys all give up your time for their benefit.

    I think they don't understand the concept of etiquette or even care as long as they get the answer they want.

    and they certainly haven't read, understood, or followed these guidelines.

    there is a google translate to translate in their own language, so that couldn't be the problem.

    http://vanillaforums.org/discussion/23130/forum-post-ettikett-etiquette

    glad you do!

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

Sign In or Register to comment.