Skip to content

choose editor in forum and quick reply#3318

Merged
CaMer0n merged 1 commit intoe107inc:masterfrom
SimSync:forum_editor
Jul 28, 2018
Merged

choose editor in forum and quick reply#3318
CaMer0n merged 1 commit intoe107inc:masterfrom
SimSync:forum_editor

Conversation

@SimSync
Copy link
Copy Markdown
Contributor

@SimSync SimSync commented Jul 25, 2018

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)

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)
return false;
}


Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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.

'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' => '')
);

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay 👍

@CaMer0n CaMer0n merged commit 3701765 into e107inc:master Jul 28, 2018
CaMer0n added a commit that referenced this pull request Jul 28, 2018
@SimSync SimSync deleted the forum_editor branch July 29, 2018 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants