ButtonBar v1.1 released!

This discussion is related to the Button Bar addon.
2

Comments

  • Hmm related to the formatting of my last post I fear the range of allowed HTML is to broad.
  • LincLinc Director of Development Detroit 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. :)
  • TimTim Operations 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 COO [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 Operations Vanilla Staff
    Do you have the Spoilers plugin installed?

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • that'll probably be it - no i dont. doh.
  • jspautschjspautsch Themester ✭✭✭
    that'll probably be it - no i dont. doh.
    Don't feel bad, I didn't even know it was a plugin. ;)
  • Back to my issue - willing to pay someone to get this thing working for me. Shoot me a pm if interested. Riches beyond imagining.
  • jspautschjspautsch Themester ✭✭✭
    edited November 2011
    Any chance we could have a look at the forum? Might be able to see what's going on.
  • I did a test install and buttonbar works fine so It must be a JS conflict. Other wysiwygs work fine though.

    The problem version is at http://www.camping-usa.com/forum/ - this isn't live or open to the public yet so you wont be able to sign up although I could create an account for anyone that wanted a closer look.
  • I figured it out... for some reason ButtonBar doesn't like my non-default theme. Switching to the default "Vanilla" theme makes it work. Hmm. I'm using public_vforg by the way.
  • Fixed! I was using a custom comment.php in my theme's design/views/post/comment.php. I copied the 2.0.18.1 version over from applications/vanilla/views/post/comment.php, inserted the code I needed to, and now it's working... almost. Now it works, but only if I click somewhere on the page. Not sure why that'd be...

    @DirtyDog, hopefully that's what's wrong on your end too.
  • Upon further investigation, if the "Quote selection" plugin is enabled, the button bar works properly after I click somewhere on the page (and after doing the fix I mentioned above). If it's disabled, the button bar doesn't work at all.

    I later found out that after disabling the WhosOnline plugin, that issue no longer occurs and I don't have to click in order for the ButtonBar to start working... it works right away.

    Now, a while back I modified the WhosOnline plugin JS file as explained here, to fix an infinite loop issue: http://vanillaforums.org/discussion/comment/127827#Comment_127827

    After reverting that change, everything works perfectly together, even if the WhosOnline plugin is enabled -- however, the infinite loop issue with the WhosOnline plugin still exists, unfortunately. According to someone else, the infinite loop issue is probably being caused by the theme I (and others) are using (not sure if this is true).

    So it's looking like this is a theme-related issue again. Hope I wasn't too confusing in my post.

    Side note, @Tim, it'd be cool if the button bar was disabled (or better yet, hidden) when "previewing" a post.
  • ShmizzleShmizzle New
    edited November 2011
    Figured it out! In my theme's .tpl file, it had custom HTML inside of <div id="Foot"></div>, but no {asset name="Foot"}. After adding {asset name="Foot"} in between the "Foot" div, everything seems to be working perfectly now (knock on wood).
  • For those interested, I modded my discussion.js file to hide the bar when previewing, and re-show it when the user clicks the "write" tab again by adding $(".ButtonBar").hide(); and $(".ButtonBar").show(); in (what looks to me like, and seems to be) the right positions in said discussion.js file.

    I put the $(".ButtonBar").hide(); after line 166 (v2.0.18.1), directly underneath the following lines of code:

    // Remove any old errors from the form $(frm).find('div.Errors').remove(); if (json.FormSaved == false) { $(frm).prepend(json.ErrorMessages); json.ErrorMessages = null; } else if (preview) { $(frm).trigger('PreviewLoaded', [frm]); $(parent).find('li.Active').removeClass('Active'); $(btn).parents('li').addClass('Active'); $(frm).find('#Form_Body').after(json.Data); $(frm).find('#Form_Body').hide();

    And I put the $(".ButtonBar").hide(); after line 24 (v2.0.18.1), directly underneath the following lines of code:

    // Reveal the textarea and hide previews. $('a.WriteButton, a.Cancel').livequery('click', function() { if ($(this).hasClass('WriteButton')) { var frm = $(this).parents('.MessageForm').find('form'); frm.trigger('WriteButtonClick', [frm]);

    @Todd, et al, do you think there's a better way to do this or a better place to put the .hide and .show?
2
Sign In or Register to comment.