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.
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...
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.
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).
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.
Comments
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.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...
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.
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.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).
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?
But what line were you missing? I don't quite understand...