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.

DefaultFormatter

edited March 2008 in Vanilla 1.0 Help
DefaultFormatter
«1

Comments

  • Maybe I should have named it ForceFormatter...
  • when you've got something like include($Configuration['SomePath'] . 'someFile.php'); and that $Configuration['SomePath'] is set in an other file, you should add at the top of the file:if (!defined('IN_VANILLA')) exit(); or you extension will be vulnerable when register_globals is on.
  • ok thanks, I'll update this ASAP
  • Uploaded version 0.0.2 of DefaultFormatter.
  • Hey! This is a total godsend. I had no idea how to override the default BBCode formatting. Just one question, probably a dumb one... where do I go to set the default formatter?
  • There is a settings.php file (or I hope so!) in the distribution.

    By the way, I have a problem: I don't know (yet) how to hide an item in the preference form of the account.php page.
    So whether users will choose to display the selector, his/her choice will be overriden.

    I'll try to overrive the AddPreference function of the PreferencesForm class...
  • Hi folks,

    Would there be a way to set different default formatters for different roles? I'm looking for a way to force BBCode for everyone, except for administrators who could choose between BBCode and HTML.
  • and a frontend when you get around to it :-P
  • Uploaded version 0.1.0 of DefaultFormatter.
  • 0.1.0 is roles based: no more settings.php, edit your roles.
    You should find
    • Can format the comments with any formatter
    • Can see the formatter selector
    • Will see the ??? formatter pre-selected
    in the permissions list.
  • sweet EDIT: with DefaultFormatter, it preselects bbcode for me, even though none of the "automatically select _______" are checked in the roles page, and I have the "can see the formatter selector", and "can format the comments with any formatter" checked for admin role.I didn't have any of the previous versions installed.
  • It must be your prefs. As we decided by email, we should rename
    Can format the comments with any formatter
    to
    Ignore DefaultFormatter extension for this role, and those few related settings below
    Because it's simply what this check box does.
    Gonna wait a bit for other glitches before the change (and maybe a better idea to replace Can format the comments with any formatter).
  • I get the following error messages at the top of my forum after adding DefaultFormatter:

    Notice: Undefined index: PERMISSION_FORMATTERS_ALL in /home/robom3/public_html/forum/extensions/DefaultFormatter/default.php on line 46

    Notice: Undefined index: PERMISSION_FORMATTERS_Text in /home/robom3/public_html/forum/extensions/DefaultFormatter/default.php on line 51

    Notice: Undefined index: PERMISSION_FORMATTERS_Text in /home/robom3/public_html/forum/extensions/DefaultFormatter/default.php on line 51

    Notice: Undefined index: PERMISSION_FORMATTERS_Html in /home/robom3/public_html/forum/extensions/DefaultFormatter/default.php on line 51

    Notice: Undefined index: PERMISSION_FORMATTERS_SHOW in /home/robom3/public_html/forum/extensions/DefaultFormatter/default.php on line 64



    I'm really not good with a lot of code. Is there something I need to fix?
  • Never mind, I figured it out. Solution was in a line of the readme that I missed.
  • Anyway this will occur if the 'Add your comments' textarea is displayed to guests (as in Guest Post). I must find a way to solve it.
    But what line were you missing? I don't quite understand...
  • I got the same until I made a selection in 'Roles & Permissions'. However I'm still getting it for guest users, even though they can't see the 'Add your comments' textarea. One oddity. If I disable this extension I'm left with these in the 'Roles & Permissions' list: # PERMISSION_FORMATTERS_ALL # PERMISSION_FORMATTERS_SHOW # PERMISSION_FORMATTERS_Text # PERMISSION_FORMATTERS_Markdown Although whether or not they're checked seems to make no difference. (As you can see, I have the Markdown extension installed but it's the same when that's disabled.)
  • yes, if you enable an extension that adds a permission, theres almost no possible way to get rid of it. they don't do anything once the extension is disabled.
  • Thanks.
  • With a bit of Googling I found a fix for the error messages showing for guests, by adding this line to default.php: error_reporting(5);
  • I added that to my file, and the errors still appear for guests. Does it have to be added to a specific place in the code? Am I missing something?
Sign In or Register to comment.