HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Spoiler button?

This discussion is related to the Button Bar addon.
2

Comments

  • hgtonighthgtonight ∞ · New Moderator

    @UnderDog said:

    UPDATE Discussions SET Format='BBCode' WHERE Format = 'Html'
    

    I think this will hurt more than help. Sure, new comments in existing discussions will now be using BBCode, but the old markup is now going to be parsed as BBCode. Honestly, probably won't do anything going html->markdown or html->bbcode. But markdown->bbcode? Things are going to look weird. This is just put out as information, because I am sure UnderDog already knew this. :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    UnderDog
  • @peregrine Is there any benefit to using HTML over BBCode?

  • I ask you the reverse question. Most people know html tags I would think, if they want to insert things,

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Yeah, though I think most people using forums would be at least somewhat familiar with BBCode, and anyone who isn't would probably be using the buttons anyway. But you may be right. I'll try using your code to check it out.

    peregrineUnderDog
  • peregrineperegrine MVP
    edited April 2013

    I'd like to hear if it works for you at least in test phase. I never used BBCode, but then again I'm not familiar with forums.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • OK, it works in the sense that it inserts code when you click the button, but it's the div class=spoiler code which isn't correct for the Spoilers plugin (AFAIK that's only set up to use BBCode). So it just displays the text as is, not hidden behind the spoiler tag.

  • It still works if I just switch back to BBCode in config but keep your edited buttonbar.js, though, so that's good at least.

    UnderDog
  • peregrineperegrine MVP
    edited April 2013

    You must not be using the js I posted.

    because my code does this when you click spoilers and you have

    test

    assuming you have.

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

    you need to clear your caches - make sure you are using the new code via firefox and you need to remove and duplicate js files.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Hm, wait. It's actually not showing any of the buttons now (with your replacement file).

  • I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I just cleared my cache (Chrome). I replaced the existing buttonbar.js with your file and updated config to HTML. Here's what I get:

  • peregrineperegrine MVP
    edited April 2013

    anybody else want to try it - it works for me.

    I don't think you are installing it correctly.

    post you filefolder structure with permissions owners and sizes

    for buttonbar/js

    and set your config with the exact statement for

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

    then post your config statement that you put in your config.

    If you made duplicates of the buttonbar plugin or files they are probably conflicted, it is good not have duplicate files and folders of the same plugins and files lingering around. You will always run into trouble, even though you think you renamed them.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • buttonbar.js 22KB.
    jquery.hotkeys.js 3KB

    Permissions for js folder: 755. Permissions for each of the above files: 644. No owner listed for buttonbar.js, but the other two (jquery.hotkeys.js and the js folder) match.

  • peregrineperegrine MVP
    edited April 2013

    the original buttonbar files should be the same as the original plugin except for buttonbar.js.

    I'll wait till some helping hand of someone else who is savvy with ownership wants to try it.

    I would install buttonbar plugin from source and overwrite it with modified buttonbar.js.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @Celeste

    I suspect you have duplicate Buttonbar plugins or you don't have the images folder, or you are not following the instructions closely.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Nope. The only thing I changed about Button Bar, at all, was to replace the .js file with yours. It works fine with the original buttonbar.js file:

  • peregrineperegrine MVP
    edited April 2013

    bizarre. I can't explain why the issue occurs on your machine.

    I downloaded the modified zip I uploaded. and copied the extracted buttonbar.js and copied it into the buttonbar/js directory and it work fine.

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

    We might not get any help here with other testers, because many people (except for the regulars) only come here if they have a problem, not to assist.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • SrggamerSrggamer HardCore Gamer ✭✭✭

    This works on my forum, strange.

  • 422422 Developer MVP
  • @peregrine I don't know — it's very weird! I'll just stick with BBCode for now anyway since I know that works, but thank you very much for your help! Your HTML fix might work for someone else who happens upon this anyway =)

Sign In or Register to comment.