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 Van2Shout Using Bootstrap Darkly?

I'd love some help if available. I've tried everything I can think of to move the shoutbox above the search box using the Bootstrap theme with the Darkly option. Seems like every other theme it defaults to the top, but not Bootstrap. And if you try to move the shoutbox via CSS (as suggested in this Q&A section) it brings the footer with it.

Anybody have any idea how this can be accomplished?

Thanks in advance!

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Hi, the shout box as well as the other parts in the panel and content are modules.

    All you need to do is re arrange how you want it and use the $Configuration in the config.php to sort them.

    http://vanillaforums.org/discussion/24995/tutorial-how-to-change-the-order-of-modules-and-menu-items#latest

  • Options
    hgtonighthgtonight ∞ · New Moderator

    The search box is hardcoded into the default master template to be above the panel asset. You will have to relocate it to another space (or forgo easy access search).

    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.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    You can move it to right below the search bar with the modules configuration sort.
    Or move the search in the panel to elsewhere like the head or content div. Or hide it with css altogether .

  • Options

    Awesome guys. I was able to figure it out. Thanks for your help

  • Options

    Any update on this? What is the code to add to the config.php file to make the van2shout appear at the top of the forum? :)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    go into the van2shout module and change Panel to Content

  • Options

    That doesnt work...That shows it on the right sidebar...I want it in content but displayed above the discussions right below the search box. I am using Bootstrap w/ Darkly...Let me know :)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
  • Options

    What would the exact code be for this said module on this said theme? That is where you loose me...lol...hence for asking for the code above ^^...Can you please provide the configuration code?

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    You would add the module sort configuration to the config.php
    Add all the modules in the order you want after you change in that specific module where you want it to render.

    $Configuration['Modules']['Vanilla']['Content'] = array('Van2ShoutModule','Gdn_MessageModule', 'Notices', 'Content', 'Ads');

    So look in the plugin for the module and find where it says it renders it and change it to Content or Panel or Foot whatever you want.

  • Options

    I want it above everything inside the content module....so that code does not work still displays at the bottom of the forum...I feel like it shouldn't be this difficult to move it to the top of the board...Am I missing something? The shoutbox is set to Content and I set my config.php file like that above, still displaying at the bottom of the content...I want it at the top?

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    You have special areas (called "assets" in Vanilla) where you can place modules: by default these are "Content" and "Panel". If you look at the default.master.tpl of the bootstrap theme (it's inside of the views folder), you'll find {asset name="Content"} and {asset name="Panel"}.
    1. You have to create something like that inside the default.master.tpl (maybe {asset name="MyHeader"})
    2. You'll have to change the modules source so that it is not rendered to "Content" but to "MyHeader"
    3. You'll have to style it and maybe add some html to it ;)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    I got it to show above the content by changing things as I explained above.

  • Options

    @R_J - Yes that is what I was thinking...I had tried that though and it just doesn't display at all...is there anywhere else that I have to state that "MyHeader" would be an asset? or should it be created automatically when I define asset name=?

    @vrijvlinder - I still wasen't able to get it to display at the top on Bootstrap with the Darkly theme with that code...if I switch themes the default theme displays it at the top but just not Bootstrap.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    In that case, if you want to use that theme then maybe @Kasper can shed some light.

  • Options
    peregrineperegrine MVP
    edited June 2014

    for below search box.

    in default master.tpl

    change from
    
    
          {if InSection(array("CategoryList", "CategoryDiscussionList", "DiscussionList"))}
                    <div class="SearchForm">{searchbox}</div>
                  {/if}
                {asset name="Content"}
                </main>
    
        to
    
    
          {if InSection(array("CategoryList", "CategoryDiscussionList", "DiscussionList"))}
                    <div class="SearchForm">{searchbox}</div>
                  {/if}
                 <div>
               {asset name="Shouting"}
                </div>  
                {asset name="Content"}
                </main>
    

        add this to Van2Shout/modules/class.van2shoutdiscussionsmodule.php
    
        public function AssetTarget() {
                     return SHOUTING; 
                   //  return VAN2SHOUT_ASSETTARGET;
            }
    

    in class.van2shout.plugin.php

    // Define the plugin:
    $PluginInfo['Van2Shout'] = array(
    
    
    to this 
    
    define('SHOUTING', 'Shouting');
    
    // Define the plugin:
    $PluginInfo['Van2Shout'] = array(
    

    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

    result of above changes.

    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
    peregrineperegrine MVP
    edited June 2014

    for above the search box - use above changes, but instead change default.master.tpl instead to this:

    add {asset name="Shouting"} after breadcrumbs.

    <

    section class="container">

             <div class="row">
    
            <main class="page-content" role="main">
              {breadcrumbs}
              {asset name="Shouting"}
           {if InSection(array("CategoryList", "CategoryDiscussionList", "DiscussionList"))}
                <div class="SearchForm">{searchbox}</div>
              {/if}
             <div>
    

    you might also need to change in .css or add.

        #van2shout input {
            color: black;
        }
    

    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

    Yea I got it working pregrine! :) Thank you so much!

  • Options

    @carsenk said:
    Yea I got it working pregrine! :) Thank you so much!

    awesome. thx for the feedback.

    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.