Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthortimberford
    • CommentTimeDec 26th 2005 edited
     # 1
    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.
  1.  # 2
    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.
    •  
      CommentAuthorMark
    • CommentTimeDec 26th 2005
     # 3
    appg/settings.php
    // String Formatting Settings
    define("agDEFAULTSTRINGFORMAT", "Text");


    Change to:

    // String Formatting Settings
    define("agDEFAULTSTRINGFORMAT", "Html");
  2.  # 4
    *shuffles silently away
    •  
      CommentAuthorMark
    • CommentTimeDec 26th 2005
     # 5
    :)
    •  
      CommentAuthorBergamot
    • CommentTimeDec 26th 2005
     # 6
    roofles
    • CommentAuthortimberford
    • CommentTimeDec 27th 2005
     # 7
    thanks mark.
    • CommentAuthoradamos22
    • CommentTimeAug 28th 2007
     # 8
    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 ?
    •  
      CommentAuthorDinoboff
    • CommentTimeAug 28th 2007 edited
     # 9
    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.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeAug 28th 2007
     # 10
    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?
    •  
      CommentAuthorDinoboff
    • CommentTimeAug 28th 2007
     # 11
    No, it doesn't. When I try, the formatting options disappear. I have to look at the reason.
    •  
      CommentAuthorWanderer
    • CommentTimeAug 28th 2007
     # 12
    It works for me, yes the options disappear, that's what I want to happen.

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

    • CommentAuthorGrahack
    • CommentTimeOct 20th 2007
     # 13
    Hi, I made a little extension for that. Maybe it will help...
    • CommentAuthorOreganoflow
    • CommentTimeMay 19th 2008 edited
     # 14
    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?
  3.  # 15
    bump
    • CommentAuthorGrahack
    • CommentTimeJun 1st 2008
     # 16
    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).
Add your comments
    Username Password
  • Format comments as