Skip to:
Content
Pages
Categories
Search
Top
Bottom

Allow Participant Role To Upload Image

  • @ajshanahan

    Participant

    Hello all – I know that the issue of user capabilities has been covered before but I’m stuck

    First off:
    http://www.manvfat.com/talk
    WordPress 3.9.1 running BuddyBoss 3.2.0 theme.
    BBPress 2.5.4
    GD BBpress Toolbox 3.1.3

    I have used GD BBpress Toolbox to allow the “Add Media” button to show up for all logged in users. Fine.

    However, the Participant role cannot actually upload an image – it tries to upload gets nearly to the end and then throws an error message:

    “An error occured in the upload. Please try again later.”

    After experimentation (I changed one test user to Moderator from Participant – and this allowed the image to be uploaded) it appears to be down to the fact that Participants do not have the capability to upload media.

    Using this plugin http://wordpress.org/plugins/capsman/ I am able to assign that capability to Participants but it still fails. My *guess* is that this is because the capability is not actually being saved, but I don’t know why or how to change it.

    Does anyone know how I can allow the Participant role to upload files – and thus be able to add images inline?

    Many thanks in advance for your help!

Viewing 12 replies - 1 through 12 (of 12 total)
  • @netweb

    Keymaster

    You will be best of contacting the plugin authors directly via http://www.gdbbpbox.com/support/

    They should be able to help you work out what is going on and help you fix it, or update their plugin.

    @ajshanahan

    Participant

    Thanks @netweb for your assistance. It’s not actually to do with the plugin though – that simply injects the button and as mentioned it works for a moderator level access – it’s simply amending the capabilities of the Participant to allow upload media – any ideas on that one?

    Thanks again!

    @netweb

    Keymaster

    I haven’t looked closely at the GD bbPress Attachments plugin (And never at GD bbPress Toolbox) though I was presuming that GD bbPress Toolbox included the same/similar/enhanced version of GD bbPress Attachments which I believe does allow participants to upload attachments.

    So, can you use (and/or ask @gdragon) if running both plugins side by side is the best solution.

    https://wordpress.org/plugins/gd-bbpress-attachments/

    @ajshanahan

    Participant

    Hi @netweb thanks again but I don’t think I’m explaining myself – the add media button is working fine – what ISN’T working is the ability to let participants Upload Files.

    I’ve added a role manager plugin which claims to have added this for Participants but it’s not “taking”. If I change a user to Moderator then it works no problem – my feeling is that this is purely to do with amending bbpress user capabilities – that’s where I’m stuck.

    Any ideas on that one?

    @netweb

    Keymaster

    Sorry, but I don’t see how any of the above is a bbPress issue, all of your issues above are from plugin/s not doing something that you expect the plugin to do, these are all issues you should raise with the plugin author/s.

    @ajshanahan

    Participant

    Ok sorry @netweb I sense I might be frustrating you with my ignorance (I’m feeling it too!) let me re-phrase my issue:

    how do I change the capability of a Participant to allow it to upload media?

    Alternatively, how do I add a new user type into the BBPress environment (as shown here – http://screencast.com/t/raxzzyIuSL)

    If you can answer either of those issues I can almost guarantee I’ll not bother you again ๐Ÿ™‚

    @netweb

    Keymaster

    I’m not frustrated, though I fully understand where you are coming from ๐Ÿ˜‰

    It is as simple as (to me at least) that bbPress does NOT include ANY support for uploading attachments, this includes any role or capability to facilitate that.

    That said, there is the plugin “GD bbPress attachments” that adds support to bbPress to upload attachments, how it does this and what changes it makes to either bbPress or WordPress roles and capabilities I do not know, as I stated above I have not looked closely at it (i.e. I have not looked at the source code to see how it works)

    If you want attachments in bbPress that is the ONLY solution I know of. ๐Ÿ™‚

    @ajshanahan

    Participant

    Ok, thanks for your time and help @netweb. I’ve asked @gdragon on the Toolbox support forum but he said it was a BBpress thing:

    This is purely WordPress/bbPress feature and my plugin has nothing to do with this. My plugin adds extra control to the WP editor you can use for bbPress, and you can use that to enable different features (like button). But, the way all that actually work is beyond this plugin, and depends on WordPress and bbPress only.
    But, you are correct that Participant has no capability to upload files, but I think that bbPress handles this wrong and should not allow media button to be visible in the first place if user has no capability. You need to add โ€˜upload_filesโ€™ capability to bbp_participant user role to enable this.

    I am now at the point where I simply need to know how to add ‘upload_files’ to bbp_participant – do you know Steve? Alternatively, do you know how I add a new user type into the BBPress environment (as shown here โ€“ http://screencast.com/t/raxzzyIuSL)

    Many thanks again.

    @netweb

    Keymaster

    As I have stated numerous times previously use the GD bbPress Attachments plugin, if the GD bbPress Toolbox does not support attachments for bbPress simply do not use it for a purpose it is not intended for.

    Here it is installed on my site, with zero configuration changes:

    null

    Login as a participant and attach a file:

    @palmdoc

    Participant

    Hi all
    Adding this function seems to work

    Add Media Upload Button to bbPress

    What I need now is to fine tune the user capabilities so that not only administrators but normal users can upload media direct to the form post

    I am using the Capability Manager Enhanced plugin
    https://wordpress.org/plugins/capability-manager-enhanced

    when I fine tune the forum user to add the ability to Upload files, the user can add existing media to the post but not upload new media.

    So close…. any ideas?

    @palmdoc

    Participant

    Replying to myself, it seems to work now if you enable
    1) Upload files
    2) Unfiltered HTML
    for the forum user

    I guess it comes with risks but it has the benefits of direct Media upload to the bbPress forum

    @bayanassaf

    Participant

    Hello,

    Here is your solution:
    Add the following to functions.php file in your child theme:

    add_action(‘media_buttons’, ‘ml_pre_media_buttons’, 1);
    add_action(‘media_buttons’, ‘ml_post_media_buttons’, 20);
    function ml_pre_media_buttons($editor_id) {
    if (!$editor_id == ‘bbp_reply_content’)
    return;

    $GLOBALS[‘post_temp’] = $GLOBALS[‘post’];
    $GLOBALS[‘post’] = null;
    }
    function ml_post_media_buttons($editor_id) {
    if (!$editor_id == ‘bbp_reply_content’)
    return;

    $GLOBALS[‘post’] = $GLOBALS[‘post_temp’];
    }

    Reference: https://bbpress.org/forums/topic/solved-only-keymasters-admin-can-upload-images/

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar