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

Separate the edit button?

I want to take the Edit Post option out of the flyout menu and have it as a button I can style with CSS. How difficult would that be?

Cheers.

Comments

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Easy. You would have to create a custom theme where you override the view that you would like to change. The hardest thing would be to find out where that view is.
    I assume it will be either in /applications/vanilla/views/discussion or /applications/vanilla/views/comment
    But you can always look at the html of your forum, and search for e.g. the class name in the source (or on github: https://github.com/vanillaforums/Garden/search?q=Flyout&ref=cmdform)
    Look in your /themes directory, see how overriding of views is done in one of these themes and do so for the view you need to change.

  • Options
    peregrineperegrine MVP
    edited February 2014

    you might also need to figure out which event to trigger it on as to placement, and the events and views available are also dependent on the version of vanilla you use.

    e.g. in 2.1

    via a plugin or theme options....
    you could trigger on events and use

                     unset($Options["EditDiscussion"]);
                     $Sender->EventArguments['DiscussionOptions'] = $Options;
    

    to remove it.

    and then trigger on event and place it somewhere else.

    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 February 2014

    as well as comment options in 2.1

    $Options = $Sender->EventArguments['CommentOptions'];   
     unset($Options["EditDiscussion"]);
    $Sender->EventArguments['CommentOptions'] = $Options;
    

    and not a whole lot different for 2.0.x

    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.