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 force Simple HTML with Button Bar?

I imported a phpBB database to my new Vanilla forums, and on the new discussions, Button Bar buttons create Simple HTML (which is what I want), and the text at the bottom says as such. But on older discussions, the buttons create BBCode, and the text states that the user can use BBCode.

How do I force Simple HTML into Button Bar for those old discussions full of BBCode so that new comments using Button Bar will use HTML instead of BBCode? Thanks :)

«1

Comments

  • probably change the format column in the comment and discussion tables to bbcode

    using a set command

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

  • Wait, change the database to say bbcode even though I want it to be HTML?

    I thought it might be a plugin issue since button bar seems to pick up on the fly whether a discussion is using HTML (new) or bbcode (imported from phpbb)

  • peregrineperegrine MVP
    edited March 2013

    you said you want the old discussions and comments to be bbcode - if so change the database to bbcode. or change it to what you need to based on what you have for old comments and discussions if they don't display the way you want them to.

    Any thing new will be based on your config statement.

    e.g. this will do markdown

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

    or use this for html

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

    Also try the wiki, the documentation, and search the forum for other discussions.

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

  • Sorry for the confusion, but I asked the opposite of that: "How do I force Simple HTML into Button Bar for those old discussions full of BBCode so that new comments using Button Bar will use HTML instead of BBCode?"

    I don't care/I'm fine that the old discussion have bbcode, I just wanted Button Bar to default to Html for new comments in old (bbcode) discussions.

    I had added that config statement thinking that would have done the trick, but it didn't, so I had to ask here, sorry. If modifying the database is the only way to make Button Bar default to html then I guess that's what I have to do! Thanks :)

  • peregrineperegrine MVP
    edited March 2013

    As I said in previous conversations:

    changing the config statement changes the format for any new discussions added.

    changing the database format columns changes the format for anything already posted.

    That is the best I can explain. Change the appropriate formats in the appropriate places.

    If that doesn't work for you - maybe someone else can explain it better.

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

  • sounds clear enough to me

    There was an error rendering this rich post.

  • Ok, gotcha, thanks again :) I see the "Format" column in GDN_Discussion and will have at it.

  • @StumpyJoe said:
    Ok, gotcha, thanks again :) I see the "Format" column in GDN_Discussion and will have at it.

    don't forget the comments table as well

    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 want to add, @StumpyJoe, that modifying the format column will just change the parser used on the comment/discussion body text. It will not convert the discussion from one format to the other.

    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.

  • peregrineperegrine MVP
    edited March 2013

    @hgtonight said:
    I just want to add, StumpyJoe, that modifying the format column will just change the parser used on the comment/discussion body text. It will not convert the discussion from one format to the other.

    I suppose if that was the case he could write a parser to read each discussion and comment, replace the bbcodes with html codes and write each discussion back.

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

  • So long as it forces button bar to output html instead of bbcode when users click the buttons I'm happy. :)

  • @peregrine said:
    I suppose if that was the case he could write a parser to read each discussion and comment, replace the bbcodes with html codes and write each discussion back.

    @StumpyJoe, @peregrine is right, you will need to convert existing posts before changing the format column.
    To check if conversion works properly, you can use the following tool: http://bbcode-to-html.com. Simply paste original text of a few posts, compare it with your converted results and see if the output is the same. Not the easiest or fastest way, but it's better than nothing.
    Also, the page shows most of the common BBCode tags, which would help you understanding what to convert into what.

  • Sorry to push this but I also tried to make this work (change Button Bar from bbcode to html) and added the line
    $Configuration['Garden']['InputFormatter'] = 'Html';
    in my config.php. Nothing happens.. I guess I have to put it somewhere else but don't know where.

  • @cica said:
    Sorry to push this but I also tried to make this work (change Button Bar from bbcode to html) and added the line
    $Configuration['Garden']['InputFormatter'] = 'Html';
    in my config.php. Nothing happens.. I guess I have to put it somewhere else but don't know where.

    1 - does it show "You can use Html in your post." in the box where you add comment, if so, it is enabled.

    2 - It is enabled but only for new comments. You have to change the comments and discussions tables in db for old comments.

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

  • It works for new comments. Could you tell where exactly I can change that in the db? I really have no clue.

  • peregrineperegrine MVP
    edited January 2014

    someone posted a conversion script I believe, I could be wrong - did you try searching the forum. I don't have the link.

    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 searched a few times by now, but can't find anything I can work with. This thread is the exact same question I would have asked and it seemed not very difficult to solve the problem. I guess I just have to find that database file and change it or am I wrong?

  • @cica You are looking to update the format column in the discussion and comment db tables.

    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.

  • peregrineperegrine MVP
    edited January 2014

    if all he wants to do is change format for all comments and discussions

    http://vanillaforums.org/discussion/comment/156930/#Comment_156930

    i would do a backup first if it doesn't work out as expected, which it very well may not. But you never know. you may need to parse as suggested above if it doesn't work out for you.

    the question that arises is why for old comments?

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

  • cicacica New
    edited January 2014

    The Problem is only the button bar. Like StumpyJoe said: on old discussions it adds bbcode and on new discussions it adds HTML (when you write a comment). I wanna make it add HTML everywhere, because bbcode doesn't work. That's my problem. I thought it is a bug with the plugin, but since I read this thread I thought I can easily change it. Now I'm a bit confused, sorry.

Sign In or Register to comment.