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.

How to Add this Kind Of Dropdown Menu

XfronterXfronter New
edited March 2015 in Vanilla 2.0 - 2.8

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. =)

Tagged:

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    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.

  • @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 Ex-Fanboy Munich Admin

    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...

  • 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 Ex-Fanboy Munich Admin

    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.

  • R_JR_J Ex-Fanboy Munich Admin

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

  • R_JR_J Ex-Fanboy Munich Admin

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

  • @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.