Skip to:
Content
Pages
Categories
Search
Top
Bottom

switching roles on different forums


  • amaros
    Participant

    @amaros

    Hello all,

    I got some trouble with my latest project.
    Here what I need to do:
    I am managing a forum with a few hundred members, it is not public. Right now I am using “Members” to manage WP roles and “private groups” for 6 different private subforums. Now I want to give all members the ability to read 5 of the private subforums, while only the members of the groups should be able to create topics and replies. I thought about something like override the bbp roles with the wp roles and hiding the bbp-form for different roles or switching the bbp roles (participant – spectator) depending on the forum id.

    Any suggestions or ideas?

Viewing 16 replies - 1 through 16 (of 16 total)

  • aurelienpierre
    Participant

    @aurelienpierre

    I kinda look for the same things, but I’m managing forum groups through BuddyPress groups :

    No access to the sub-forums of Buddypress groups forums for group members

    No answer in almost a year. The fact is group-based read/write permissions are a basis of serious forum management, but nobody cares in the bbP dev team…

    Tweaking the template to hide the topic/reply form looks nasty as it’s only front-end. This kind of permissions should be built-in CMS-side.


    Robin W
    Moderator

    @robin-w

    As author of ‘private groups’ this is quite do-able but would take a bunch of code. The problem is that whilst for those that want this it is seen as critical, the actual demand for this functionality is quite low.

    The core code is really quite straightforward – you just check what permissions a user has on a forum. and go from there.

    Like most plugins, writing the ‘settings page’ is what takes the time – probably a weeks worth of evenings to do this.

    I might get round to this at some stage, but my time has to fit around paid IT work !


    Robin W
    Moderator

    @robin-w

    ok, I’m close to a solution for @amaros using private groups, and might fix @aurelienpierre as well.

    Either of you got a test site where you can see if it does what is needed?


    amaros
    Participant

    @amaros

    Thanks a lot for your replies. I wonder why the demand for that feature is quite low. This is the first forum I created and setting up read/write permissions is one of the first things I thought about 😛
    Robin you´re great! I will donate for some (some more 🙂 ) Coffee soon when we break through the problem. I could never ever fix that problem on my own since i am a really coding newbie.
    Right now I don´t have a test site but I´ll clone the site I work with bbpress and set it up to another URL on saturday.
    Thank you Robin, I´m really looking forward to get this fixed.
    Cheers


    Robin W
    Moderator

    @robin-w

    I’ve done most of the work, but am away for a few days, so am hoping that a working version should be early next week.


    Robin W
    Moderator

    @robin-w

    ok, try this version and see what you think.

    You’ll see a new topic permissions tab, which will show yuou what to do, but you get a new meta box on the forum which lets you set a per forum restriction

    http://www.rewweb.co.uk/download/private-groups-3-2-1-rc/


    amaros
    Participant

    @amaros

    Thanks a lot for your fast work.

    Unfortunately it doesn´t work on my test system. Activating after installation causes an error. It says it can´t be activated and gives me that error message:

    Fatal error: Can’t use function return value in write context in /hp/bk/ab/vq/www/TR/wp-content/plugins/bbp-private-groups1/includes/meta-box.php on line 88


    Robin W
    Moderator

    @robin-w

    is this a local server installation?

    and also can you tell me what versions of wp, bbpress and php you are using?


    amaros
    Participant

    @amaros

    It´s WP 4.3.3, PHP 5.3 and bbpress 2.5.9 on a remote server

    EDIT: PHP is 5.3.10-1ubuntu3.23


    Robin W
    Moderator

    @robin-w

    suspect its a wordpress issue since I am calling a wp function

    if you can’t upgrade to 4.5.2, come back and I’ll take a guess at some retrospective code!


    Robin W
    Moderator

    @robin-w

    ok, Ive taken a further look, and the issue is that you are using a php version below php5.5.

    Given that others may do so, I’ve recoded to avoid the error, so can you delete the version you have, and try this one

    http://www.rewweb.co.uk/download/private-groups-3-2-1-rc/


    amaros
    Participant

    @amaros

    Thank you, great job! I just donated 😛

    First it didn`t work and gave me the same error message as before. So I updated the server to PHP 5.6 and activated the rc successfully. It works perfectly! After activation of the new feature I created a new group “common users” and assigned all subscribers to it. Next step I did was to set up the forums I wanted to be visible to all. Done in 5 Minutes…

    I tested it with a few different test users and found everything working properly. The only cute lil bug I found is that the permission “Create/Edit Topics and Replies” appears twice in a row in the menu of the forum pages.

    This is just an amazing Plugin!

    Cheers 🙂


    Robin W
    Moderator

    @robin-w

    Great – thanks for that.

    So with the new version you got exactly the same bug – that’s annoying. I’ll try and work a better solution.

    But I’m glad it works in a wider sense.

    Once I have fixed that I’ll release it as a final live version with a version number one greater so that you get it.

    Thanks again for testing for me.


    Robin W
    Moderator

    @robin-w

    ok, I think this is now all working for older php versions.

    I have also fixed a small bug, so the code is more robust.

    once the new version appears in your updates, can you upgrade, and just confirm that it all still works for you.

    Regards

    Robin


    amaros
    Participant

    @amaros

    Yeah, I just updated and it works as well as before 🙂

    It was a pleasure to support you by testing the plugin. Thanks again for your great work and fast solution!

    Regards

    Thomas


    Robin W
    Moderator

    @robin-w

    Great – thanks for doing that – much appreciated !

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