Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

How to Add this Kind Of Dropdown Menu

This discussion is related to the Bootstrap addon.
XfronterXfronter New
edited March 2015 in Vanilla 2.0 - 2.3

image
Im Prety newbe for vanilla. B) how can i add this kind of menu in to my forum..
Ex-:// I want to make dropdown For **Ask Questions Or Discussions **, With using Vanilla Q&A Plugin. Now i need good guide from seniors. thanks god bless. =)

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    There's a function in the framework that will make buttons like this. You can find the function in /library/core/functions.render.php

    Use it like this

    // Array of links, which can have individual css classes, but don't have to
    $Links = array(
        // start of first button
        array(
            'Url' => 'www.google.com',
            'Text' => 'Link to Google',
            'CssClass' => 'ButtonGoogle'
        ),
        // second button
        array(
            'Url' => 'www.bing.com',
            'Text' => 'Link to Bing'
        )
    );
    
    // Optional class that will be attached to all buttons
    $CssClass = 'ButtonSearchEngine';
    
    // That will echo the "ButtonGroup" to screen
    echo ButtonGroup($Links, $CssClass);
    

    Since you are a beginner, I could imagine that was not much of a help :(
    You would need to create a plugin that helps you writing that code at the place you like it to appear. Without exactly telling us where you like it to be seen, we wouldn't be able to help you, sorry.

    Xfronterhgtonight
  • @R_J said:
    There's a function in the framework that will make buttons like this. You can find the function in /library/core/functions.render.php

    I can Understand what are you tell :)
    @R_J at Where put this code in functions.render.php ... if you free tell some of part above this.. Thanks..

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Sorry, seems like I understood you wrong. You do not want to create anything by yourself, but the "Ask a Question" button is not working as you expected, right?

    Let me have a look at that...

    Xfronter
  • XfronterXfronter New
    edited March 2015

    @R_J said:
    Sorry, seems like I understood you wrong. You do not want to create anything by yourself, but the "Ask a Question" button is not working as you expected, right?

    Let me have a look at that...

    @R_J Yes.. in Vanilla 2.0.18 Its Work Perfectly..
    I want to make drop down menu for this. it will easy to select question or discussion.

    image

    In Vanilla forums also using this step.. is it make using CSS or What ?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Get the newest version from GitHub: https://github.com/vanilla/addons/blob/master/plugins/QnA/class.qna.plugin.php

    Then look at the class.qna.plugin.php and search for "AddButton". The complete function is commented. Delete all the "//" comments from the function and you'll have that drop down again.

    Makke375Xfronterhgtonight
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I was wondering why that hasn't been asked before, but that was a mistake: http://vanillaforums.org/discussion/comment/208152/#Comment_208152

    Xfronter
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    And I wonder why there have been no Issue on GitHub. Now there is B)

    Xfronterhgtonight
  • @R_J said:
    And I wonder why there have been no Issue on GitHub. Now there is B)

    :D Thanks Bro.. I will Try hard to get that B)

Sign In or Register to comment.