Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


ButtonBar v1.1 released!

TimTim Lord of Servers Vanilla Staff
edited November 2011 in Blog
This discussion is related to the Button Bar addon.
This is the first release of ButtonBar, which places several simple formatting buttons above the Post Reply and New Discussion textareas, allowing easy access to HTML, BBCode and Markdown formatting.

The bar automatically uses your forum's default InputFormatter for New Discussions, and the Format of the Discussion in question when used in the Post Reply window.

Please report any bugs. Thanks!

Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

ddumont422JoZ3_69
«1

Comments

  • 422422 Developer MVP
    Pressure was mounting for this huh. Well done guys

    422 Real Estate Australia , now open Check it out

  • This is what mine looks like. Any idea what went wrong there?
    image
  • TimTim Lord of Servers Vanilla Staff
    Looks like its having trouble finding the image resources. Can you open Firebug or equivalent and look at the Net/Network tab and see what happens with those image requests?

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • I'm getting the same thing as DirtyDog... looking into it. I should mention I'm running 2.0.17 (I changed the "required" version so it would enable), I wonder if that's the problem? Tim, do you know if it's possible to hack the plugin to run on 2.0.17?
  • DirtyDogDirtyDog ✭✭
    edited November 2011
    I've never used firebug but I downloaded it and gave it a shot. The only error I see in the net tab is this:

    image

    Also to clarify, the buttons aren't working either so I don't think its just a matter of missing images.
  • @DirtyDog, the buttons aren't working for me either. Are you running 2.0.18?
  • TimTim Lord of Servers Vanilla Staff
    We upgraded our jQuery version to 1.6.x in 2.0.18, that could be the problem.

    I don't want to be a dick about this because I understand the pain of upgrading, but I really can't be responsible for the plugin on an old version of Vanilla. I suggest upgrading to 2.0.18

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Yes I am running 2.0.18.1
  • TimTim Lord of Servers Vanilla Staff
    So the buttonbar doesn't have a resource called 'buttonbg.jpg' - that is for something else.

    You should see something like this:
    image

    You should also have an entry for 'buttonbar.js' in there, so check for that.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • buttonbar.js is being loaded but there are no calls for any of those button png's
  • I don't want to be a dick about this because I understand the pain of upgrading, but I really can't be responsible for the plugin on an old version of Vanilla. I suggest upgrading to 2.0.18
    Totally get it, as you do say the required version is 2.0.18; I just wanted to know if you thought I'd be wasting my time even bothering to try and get it working with 2.0.17.

    Hopefully whatever solution works for DirtyDog with 2.0.18 will work for me with 2.0.17.
  • TimTim Lord of Servers Vanilla Staff
    buttonbar.js is being loaded but there are no calls for any of those button png's
    Are you getting any JS errors?

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Nope no errors.
  • 422422 Developer MVP
    your not using subdomain for forum by any chance ?

    422 Real Estate Australia , now open Check it out

  • I'm not, my forum is at domain.com
  • 422422 Developer MVP
    edited November 2011
    have you got a link @dirtydog ?

    assuming camping-usa.com is your site ? have you got beta code I will register and test if you want

    422 Real Estate Australia , now open Check it out

  • has anyone figured out how to activate the spoiler tag? We use it alot on my forum for images. So that it isn't so hard on mobile users.
  • jspautschjspautsch Themester ✭✭
    edited November 2011
    Two thumbs up! This is an amazing addon, simple and effective. At first I just thought it inserted the tags at the end the post, but it turns out it's smarter than that. :O I like how it encases selected text.
    has anyone figured out how to activate the spoiler tag? We use it alot on my forum for images. So that it isn't so hard on mobile users.
    I think you need to set your forum to use BBCode instead of HTML for that to work. Add the following line to your config file:

    $Configuration['Garden']['InputFormatter'] = 'BBCode';

    [Edit] Also it looks like discussions retain the format that was set when they were first posted (its a field in the database), so if you create a discussion while your forum's formatter is set to HTML and then change the formatter to BBCode, the button bar will still try to insert HTML tags for comments within that discussion. To fix this, you need to execute the following SQL query (backup your database first):

    Update GDN_Discussion set Format='BBCode';

    Or Format='HTML' if switching from BBCode back to HTML.
  • DirtyDogDirtyDog ✭✭
    edited November 2011
    I had my developer look at the button bar and he found that a fix to the images not being displayed was in the CSS:
    <div class="ButtonBar">
    <div><span>bold</span></div>
    <div><span>italic</span></div>
    <div><span>underline</span></div>
    <div><span>strike</span></div>
    <div><span>code</span></div>
    <div><span>image</span></div>
    <div><span>url</span></div>
    <div><span>quote</span></div>
    <div><span>spoiler</span></div>
    </div>
    to
    <div class="ButtonBar">
    <div class="ButtonBarBold"><span>bold</span></div>
    <div class="ButtonBarItalic"><span>italic</span></div>
    <div class="ButtonBarUnderline"><span>underline</span></div>
    <div class="ButtonBarStrike"><span>strike</span></div>
    <div class="ButtonBarCode"><span>code</span></div>
    <div class="ButtonBarImage"><span>image</span></div>
    <div class="ButtonBarUrl"><span>url</span></div>
    <div class="ButtonBarQuote"><span>quote</span></div>
    <div class="ButtonBarSpoiler"><span>spoiler</span></div>
    </div>

    in /views/buttonbar.php
    Now I realize this shouldn't be necessary but it did cause the button images to be displayed. However, even with the images displayed they buttons still did not do anything once clicked. Still looking for a solution here.
  • Hmm related to the formatting of my last post I fear the range of allowed HTML is to broad.
  • LincolnLincoln Community Instigator Vanilla Staff
    Hmm related to the formatting of my last post I fear the range of allowed HTML is to broad.
    Use pre and code tags, not blockquote. I fixed it. :)

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • TimTim Lord of Servers Vanilla Staff
    @DirtyDog Those classes are added by the javascript. If they aren't being added, it means the javascript isn't running. Remove those classes and focus on figuring out why your JS isn't being included, or being run once included.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • @DirtyDog Those classes are added by the javascript. If they aren't being added, it means the javascript isn't running. Remove those classes and focus on figuring out why your JS isn't being included, or being run once included.
    Any tips on how to do that?

  • you need to execute the following SQL query (backup your database first):

    Update GDN_Discussion set Format='BBCode';
    how do I do this? put that line in to my config?
  • jspautschjspautsch Themester ✭✭
    edited November 2011
    how do I do this? put that line in to my config?
    No, that's a SQL query you execute against your forum's database (back it up first). It converts all your old discussions to the same format.

    To change the format on all new discussions, THIS is the line you add (or change, see if it's not already there) to your config:

    $Configuration['Garden']['InputFormatter'] = 'BBCode';
  • Okay, I did the above and now the spoiler button appears. when pressed it envelopes teh selected text in a [spoiler] tag, as it should .... but that tag doesn't seem to DO anything. does that make sense?
  • jspautschjspautsch Themester ✭✭
    edited November 2011
    Sounds like it's not parsing the BBCode. Do other BBCode tags work? Is it parsing HTML tags? Are you testing this in an old discussion or a new discussion? Also make sure you don't have that config line entered in twice.
  • yeah thats the weird part. bold, iltalic, etc all parse fine it seems.
  • TimTim Lord of Servers Vanilla Staff
    Do you have the Spoilers plugin installed?

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

«1
Sign In or Register to comment.