Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Show panel on gallery page?

This discussion is related to the Galleries addon.
AaronWebsteyAaronWebstey Headband AfficionadoCole Harbour, NS ✭✭✭

I just want my gallery page to look like any other page on the site. The MeBox gets shown anyway, so I'd like to show the panel below it as well. Can anyone tell me how to do this? I'm a bit confused as to why MeBox is showing up, but not the panel.

Van 2.1.8, bittersweet theme.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    The MeBox is part of the master template in Bittersweet.

    What do you want to add to the panel? The standard discussions list has the following modules:

    $Sender->AddModule('DiscussionFilterModule');
    $Sender->AddModule('NewDiscussionModule');
    $Sender->AddModule('CategoriesModule');
    $Sender->AddModule('BookmarkedModule');
    

    I would also suggest setting the breadcrumbs:

    $Sender->SetData('Breadcrumbs', array(array('Name' => T('Gallery'), 'Url' => '/plugin/gallery')));
    

    Add that to the public function PluginController_Gallery_Create($Sender) method in your gallery plugin file.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    R_JAaronWebstey
  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    You're the man, @hgtonight ! Actually I only needed to link to /gallery, not /plugin/gallery, since @hgtonight used SetRoute to make that the URL :)

    Great plugin! Styling right now!

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited February 2015

    For the panel to be seen in the Galleries page all you need to do is change the display none to display block in the css file for the galleries plugin around line 42
    I did not want the panel so I used css to hide it. No need to reload the modules, you are loading them twice...

    body.Dashboard.Plugin.gallery #Panel {
    display: none;
    }
    

    The route is set in the default.php

    Gdn::Router()->SetRoute('gallery','plugin/gallery','Internal');

    this makes the url be gallery and not plugin/gallery if this is added

     $matchroute = '^gallery(/.*)?$';
                 $target = 'plugin/Galleries$1';
    
                 if(!Gdn::Router()->MatchRoute($matchroute))
                      Gdn::Router()->SetRoute($matchroute,$target,'Internal'); 
    

    It already has a link that goes to the menu it may be commented out...

        $Session = Gdn::Session();
    
                    if ($Sender->Menu){
                        $Sender->Menu->AddLink('Gallery', T('Gallery'),'/gallery',array('Garden.SignIn.Allow'),array(), array('target' => '_blank'));
                    }
    
    hgtonightAaronWebstey
  • hgtonighthgtonight ∞ · New Moderator

    @vrijvlinder said:
    I did not want the panel so I used css to hide it. No need to reload the modules, you are loading them twice...

    Good to know that the panel is hidden. The Plugin controller (which extends the Dashboard controller) doesn't load any modules by default, so you will have to load them in your plugin to have anything there.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    AaronWebstey
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes, it loads only what you have in the tpl panel. I have the search and UserInfo module and mebox in the master in the panel so they do get called in the plugin page. I suppose that is why I hid the panel with css.

    But look in the css for other hidden stuff. I do know that MeBox-SignIn is display-none in the main style.css not sure why maybe it is redundant. But it does show in the panel of the plugin page when I remove display none.... So there may be other things like that in the main style.css

    But make sure so you don't load two of something. It happened to me.

    hgtonightAaronWebstey
  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

    @hgtonight the panel is in the BS master template too, which is what confused me about why it wasn't showing up but the mebox was. @vrijvlinder in fact, the panel wasn't even showing up in the source - i.e. unhiding it didn't help. I had to add it as per HG's advice in the code.

    I've got it working now, just wanted to let you know what happened in my case.

  • hgtonighthgtonight ∞ · New Moderator

    @AaronWebstey said:
    hgtonight the panel is in the BS master template too, which is what confused me about why it wasn't showing up but the mebox was. vrijvlinder in fact, the panel wasn't even showing up in the source - i.e. unhiding it didn't help. I had to add it as per HG's advice in the code.

    I've got it working now, just wanted to let you know what happened in my case.

    Assets return an empty string if they have no associated modules. Since the plugin controller doesn't load any modules by default, the asset is blank.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.