-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
choose editor in forum and quick reply #3318
Conversation
New prefs for forum: editor & quickreply editor makes it possible to choose between bbcode or tinymce (if installed and html enabled) quickreply gives the option to choose between the standard textarea or the choosen editor (from pref editor)
if (self::getPref('wysiwyg',false) != true) | ||
{ | ||
return false; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. I'm not a fan of this code here though. Using e107::wysiwyg(false); in the forum plugin should be enough to disable it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't work. I tried it already. Look at the bbarea() function, where wysiwyg() is called and you see that any previous change will be overwritten.
Changing the wysiwyg(true) in bbarea to wysiwyg() is also a bad idea, because wysiwyg() is saving the last setting in the registry, which means that the bbarea will not be replaced by tinymce system wide when wysiwyg(false) is called anywhere in the code.
As a systemwide change is not what I want to achieve, I had to add some code that checks for the current plugin and to return a value without touching the global settings in the registry.
@@ -183,6 +183,9 @@ class forum_ui extends e_admin_ui | |||
'popular' => array('title' => FORLAN_55, 'type'=>'number', 'data' => 'int','help'=>FORLAN_56), | |||
'postspage' => array('title' => FORLAN_57, 'type'=>'number', 'data' => 'int','help'=>FORLAN_58), | |||
'threadspage' => array('title' => FORLAN_186, 'type'=>'number', 'data' => 'int','help'=>FORLAN_187), | |||
|
|||
'editor' => array('title' => 'Post editor', 'type' => 'dropdown', 'data' => 'str', 'readParms' => array(), 'writeParms' => array('optArray' => array(), 'defaultValue' => 'default'), 'help' => 'Which editor should be used to create/edit posts?'), | |||
'quickreply' => array('title' => 'Quick replay editor', 'type' => 'dropdown', 'data' => 'str', 'readParms' => array(), 'writeParms' => array('optArray' => array(), 'defaultValue' => 'default'), 'help' => '') | |||
); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there should be a pref for 'quick reply' . The whole idea behind quick-reply was that there is no formatting. (that's what makes it quick). When formatting is required, then people should use the 'reply' button. I'm guessing removing this will also remove the need to change line 405 of the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally always modded the v1 forum to have bbcode in the quick reply field... And I could imagine, I was not alone. With this setting, the admin can decide if he/she wants a simple textarea or the chosen editor. Default is the textarea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay 👍
New prefs for forum: editor & quickreply
editor makes it possible to choose between bbcode or tinymce (if installed and html enabled)
quickreply gives the option to choose between the standard textarea or the choosen editor (from pref editor)