Fork me on GitHub
Current releases are 2.1 (gold) and 2.0.18.11 (security patch for 2.0)
Ready for 2.1? Find out if your favorite plugins are compatible.
The 2.0 branch will no longer receive updates after Dec 2014.

Understanding / customizing "Panel"?

edited January 2011 in Questions
Howdy. I am currently working on custom theme with the goal being to replicate a more standard forum structure for Vanilla (a la phpBB and the like). My main issue with the stock layout is that it lacks the organization required to keep even a moderately sized discussion forum focussed by topic.

The traditional discussion board format has a folder like drill down mechanism. The user is not given the "create discussion" option until they have drilled down into a specific sub-forum. Vanilla is more than capable of replicating this behaviour but it requires adjusting the layout in "Panel" such that things like "Start New Discussion" do not appear until a category is chosen. Although I have managed to change "newdiscussion.php" to require a category to be displayed before showing the create control, I do not have a firm understanding of how to predict how Vanilla got to this file (so I predict where to look for other such changes).

I have looked through the source but so far cannot find any specific "Panel" template. So the first question is, is there currently a "Panel" template or is the only control provided via the config.php arrays and various class method declarations? Is there a tutorial anywhere that covers how "panel" and "content" get generated (hopefully with a focus on templating them)?

Cheers

Tagged:

Comments

  • I'm also looking how to customize the panel option. Any help is definitely appreciated...
  • edited January 2011
    @sticktacular

    Howdy. I am bumping this one as I have been struggling with controlling the panel behaviour and have a workaround for the obscure nature of the panel layout.

    Thankfully, by using the "{debug}" command, it is possible to see how "Panel" appears within Smarty. The Panel exists under an associative array called "Assets" with the panel objects under the key "Panel". If you want to control the order and placement of Panel entities within a template, you replace "{Panel}" in the master template with its core entries like this:

    themes/mythemename/views/default.master.tpl


    <div id="Body">
    <div id="Panel">
    {$Assets.Panel.GuestModule}
    {$Assets.Panel.SignedInModule}
    {$Assets.Panel.BookmarkedModule}
    </div>
    <div id="Content">{$Assets.Panel.NewDiscussionModule} {asset name="Content"}</div>
    </div>


    In the above example I have moved the "Start New Discussion" button to the content Panel. I believe that the full list of Panel objects can be discerned from the config-defaults.php file.

    One extra comment - if you install the "unassign" Smarty plugin, you can assign a Panel object to a new variable and then remove it from the given asset array. This may be simpler if the only thing you need to do is to move a single object around.

    Cheers
    UnderDogaeryJoZ3_69Jawad
  • JoZ3_69JoZ3_69 New
    edited March 2012

    @codegrunt Thank you very much, in the future I hope that VanillaForum have a manager modules.

    Do you know any way to control the pages where each module may appear?

  • Thanks! I was looking for that

  • Thanks for this information. I know it's old, but it's helpful.

    There lacks a lot of information on things like this. Thanks!

    If anyone has any updated information on the use of Panels, it would be greatly appreciated if you could share :)

  • hgtonighthgtonight ∞ · New At my desk Moderator

    The panel is just a specific asset container. Any module can be placed/removed from any asset pragmatically. What specifically are you looking to do?

    Search first

    Check out the Community Wiki! We are always looking for new content.

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

    vrijvlinder
Sign In or Register to comment.