Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

html as default input

i know individual users can go and change their preferences. but i was wondering if i could set the default input to html for all users when they first sign up.

i took a look in the php but only found a setting in a clear() function. this is in 0.9.2.

Comments

  • Options
    I dont think there is a setting in 0.9.2. You could do a database query to add it to the options array for each user (atleast, i assume thats where it's kept, i dont have access to a 0.9.2 database since i upgraded to play with 0.9.3) but i've a feeling theres no default setting as the html formatter is an extension. I'm still a little sleepy though so i could be wrong.
  • Options
    MarkMark Vanilla Staff
    appg/settings.php
    // String Formatting Settings define("agDEFAULTSTRINGFORMAT", "Text");

    Change to:

    // String Formatting Settings define("agDEFAULTSTRINGFORMAT", "Html");
  • Options
    *shuffles silently away
  • Options
    MarkMark Vanilla Staff
    :)
  • Options
    roofles
  • Options
    thanks mark.
  • Options
    I have a newest version of vanilla, and I haven't this option in settings.

    I added this lines:

    // String Formatting Settings
    define("agDEFAULTSTRINGFORMAT", "Text");

    to appg/settings.php, but default format is still undefined. What's wrong ?
  • Options
    edited September 2007
    This discussion is quite outdated.

    Since vanilla 1, you have to add the formatter extension from the addon repository.

    If you want to make the formatter the default formatter, use something like:if ( $Context->Session->UserID > 0 && $Context->Session->User->Permission('PERMISSION_HTML_ALLOWED') ) { //Make someFormatter the default formatter to post a new comment or to edit an old one $Context->Configuration['DEFAULT_FORMAT_TYPE'] = 'someFormatter'; $Context->Session->User->DefaultFormatType = 'someFormatter'; // Uncomment the following lines if you don't want the user to change of formatter // $Context->Session->User->Preferences['ShowFormatSelector'] = 0; }
    The best place to add this code is in Formatter "default.php" page.

    Replace 'someFormatter' with the formatter name, the one used by the formatter to register itself to vanilla. eg for Html Formatter:$Context->StringManipulator->AddManipulator('Html', $HtmlFormatter); it would be "Html".

    Update: It's not working; doing so, Vanilla will always set Html as the default option, even if you used an other format in your last post. It's only good for forcing the user in a format.
  • Options
    Alternatively, look around line 89 and you'll see something like this:$Configuration['DEFAULT_FORMAT_TYPE'] = 'Text';
    Change it to:$Configuration['DEFAULT_FORMAT_TYPE'] = 'Html';
    Does that work?
  • Options
    No, it doesn't. When I try, the formatting options disappear. I have to look at the reason.
  • Options
    It works for me, yes the options disappear, that's what I want to happen.

    Posted: Wednesday, 29 August 2007 at 11:50AM

  • Options
    Hi, I made a little extension for that. Maybe it will help...
  • Options
    edited May 2008
    Posts still default to BBCode for me. I have the most recent version of Default Formatter and have HTML selected as the default bullet in the profile settings. It still defaults to BBCode. Is there anything else I can do?
  • Options
    bump
  • Options
    No idea. You could try try search your code for DEFAULT_FORMAT_TYPE and see what happens.
    Look at the code in Default Formatter for another string to search. If you don't succed, email me a zip of all your Vanilla files (except the ones where there are passwords).
This discussion has been closed.