Notifications
Clear all

wpForo 1.x.x [Solved] Security

3 Posts
2 Users
1 Reactions
670 Views
Posts: 7
Topic starter
(@cerealkey)
Active Member
Joined: 1 year ago

Hello everyone,

I'm tryin gto implement the security before going live with the forum. I would like to disable:

- attachments

- Code

- Souce code

How can I do it?

 

2 Replies
Chris
Posts: 3650
(@chris)
Famed Member
Joined: 3 years ago

Hi @cerealkey,

The “Attach file” can be disabled by the Forum Accesses.

Navigate to wpForo > Accesses, edit the needed access, disable "Can attach file" option, set the current access to the needed usergroup in Forum Permissions field.

Forum Accesses, Forum Permissions FAQ: https://wpforo.com/community/faq/wordpress-user-roles-wpforo-usergroups-and-forum-accesses/#post-39664

 

To remove the source code and code button from TinyMCE, Put this function in your active WordPress theme functions.php file:

add_filter('wpforo_editor_settings', function ($settings) {
    if (empty($settings['tinymce']) || !is_array($settings['tinymce'])) {
        $settings['tinymce'] = [];
    }

    // Remove the code and source code buttons from the toolbar
    $settings['tinymce']['toolbar1'] = str_replace(['pre', 'source_code'], '', $settings['tinymce']['toolbar1']);

    return $settings;
});

or > How to Easily Add Custom Code in WordPress (Without Breaking Your Site)

Posts: 7
Topic starter
(@cerealkey)
Active Member
Joined: 1 year ago

Thank you!