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.
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.
i took a look in the php but only found a setting in a clear() function. this is in 0.9.2.
0
This discussion has been closed.
Comments
// String Formatting Settings define("agDEFAULTSTRINGFORMAT", "Text");
Change to:
// String Formatting Settings define("agDEFAULTSTRINGFORMAT", "Html");
I added this lines:
// String Formatting Settings
define("agDEFAULTSTRINGFORMAT", "Text");
to appg/settings.php, but default format is still undefined. What's wrong ?
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.
$Configuration['DEFAULT_FORMAT_TYPE'] = 'Text';
Change it to:
$Configuration['DEFAULT_FORMAT_TYPE'] = 'Html';
Does that work?
Posted: Wednesday, 29 August 2007 at 11:50AM
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).