Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 27,151 through 27,175 (of 64,535 total)
  • Author
    Search Results
  • This should  be addressed in bbPress 2.3 (beta 2 is out now, final release should be soon).

    It’s a bit more complicated than a filter toggle I believe.

    Check out https://codex.wordpress.org/Roles_and_Capabilities

    By default only Author roles and above have the ability to upload files, and that’s for security reasons so that’s probably a good thing.

    You can tweak your roles to change the ability to upload files, but at the moment it’s a little messy. Another issue is if you want to let all your users upload files.

    If you are just looking for images there is a bbPress attachment plugin in the .org repo that can handle that without having to mess with all the user stuff.

    #126308

    It depends what you setting you changed. Is this change breaking other parts of your site or just bbPress related pages?

    Have you tried clearing your permalinks (Settings > Permalinks)?

    #126307
    aberglas
    Participant

    I ended up getting
    $user = get_userdata( $user_id );
    $user->add_role(“bbp_participant”);
    to work. (I had been using the wrong method to get the $user.)

    But it is still messy. And @moonoi points out this will be lost whenever the UI is used, due to the set_role bug.

    get_role( ‘author’ )->add_cap( ‘read_private_topics’ );
    Still does not work, although it should. It would be a better solution for me because like 90% of sites I only actually need one role per user.

    It would be good to fix WP in this regard, and then remove the mess from bbPress. Or in the meantime just make BBPress work like everything else. Mucking about with roles is an orthogonal problem.


    @Moonoi
    I have not played with the Members Plugin, but WP by default does NOT store capabilities against users. It stores Roles agains users, and capabilities against Roles, at least by default.

    Anthony

    #126305

    In reply to: bbPress 2.2.4 Released

    Dedem
    Participant

    Good stuff, thanks.

    Mitesh Patel
    Participant

    A simple solution to this issue can be achieved by css the following way.

    On each bbPress related page, bbPress plugin adds a class ‘bbPress’ to the body html element, so adding something like below would solve the problem in a non-obtrusive way.

    body.bbPress #nav > li.menu-item-318 > a { formatting for the highlighted menu item class }

    Where, menu-item-318 is the id of the page which should have been highlighted by the current_page_parent or current_menu_item class, which are not attached (for which this ticket is for).

    Of course, this is just a hack, but it does get the work done.

    #126302
    xmasons
    Participant

    So here’s my solution.

    1.) Create a page template.

    2.) Using the power of current_user_can(), we may utilize the bbPress’s user roles.

    3.) Insert the Topic Index shortcode with the do_shortcode() function inside the user role wrapper.

    #126291
    kriskl
    Participant

    Hi!

    Not sure if I am the only one with this problem

    running bbpress 2.3 and BP1.6.2 on wp3.5.1

    every so often (1 in 10 to 1 in 20 ) new topics or replies ends up ‘pending’ not published

    and I have to manually publish them..

    what could be the reason? and how can it be prevented?

    No moderation plugins  etc are running.

     

    thanks

    moonoi
    Participant

    I have a few questions that I was hoping one of the bbPress developers would be able to give me a quick hint about offhand.

    I’m getting results that leave me completely puzzled, as I try to hook into or directly modify the `bbp_get_caps_for_role()` function in `/core/capabilities.php`.

    The `bbp_get_caps_for_role` filter
    My purpose is to try and return an array with true on all caps for any role, because I need to find out why only the keymaster gets to upload images.

    My first attempt is just to use the `’bbp_get_caps_for_role’` filter provided by the function. This is where the mysterious stuff starts…

    I can add the filter, and when I check the `$wp_filters` global afterwards, I can verify that the filter has been added correctly. However it doesn’t fire. When I check the `$wp_filters` array inside the `bbp_get_caps_for_role()` function, just before the hook is applied, my filter has vanished. So somewhere there must be a function removing my filter. But where, and why!?

    Testing by returning the `$caps` array with all caps set to `true`
    So giving up on the filter for now, I simply try to hardcode the all-true `$caps` array directly into the `bbp_get_caps_for_role()` function and returns this, regardless of role. What then happens is even weirder. – Now my user can not even post a reply in the forum.

    How can setting all caps to true end up giving my user less rights in the forum?!

    Thanks in advance guys!

    For reference, here is the bottom part of my hacked `bbp_get_caps_for_role()` function:
    `

    ‘assign_topic_tags’ => true,
    );

    break;
    }

    $caps = array(

    // Keymasters only
    //’keep_gate’ => true,

    // Primary caps
    ‘spectate’ => true,
    ‘participate’ => true,
    ‘moderate’ => true,
    ‘throttle’ => true,
    ‘view_trash’ => true,

    // Forum caps
    ‘publish_forums’ => true,
    ‘edit_forums’ => true,
    ‘edit_others_forums’ => true,
    ‘delete_forums’ => true,
    ‘delete_others_forums’ => true,
    ‘read_private_forums’ => true,
    ‘read_hidden_forums’ => true,

    // Topic caps
    ‘publish_topics’ => true,
    ‘edit_topics’ => true,
    ‘edit_others_topics’ => true,
    ‘delete_topics’ => true,
    ‘delete_others_topics’ => true,
    ‘read_private_topics’ => true,

    // Reply caps
    ‘publish_replies’ => true,
    ‘edit_replies’ => true,
    ‘edit_others_replies’ => true,
    ‘delete_replies’ => true,
    ‘delete_others_replies’ => true,
    ‘read_private_replies’ => true,

    // Topic tag caps
    ‘manage_topic_tags’ => true,
    ‘edit_topic_tags’ => true,
    ‘delete_topic_tags’ => true,
    ‘assign_topic_tags’ => true
    );

    return $caps;
    //return apply_filters( ‘bbp_get_caps_for_role’, $caps, $role );
    }
    `

    #126289
    moonoi
    Participant

    Ok so after digging and reading for many hours, getting a bit more into the situation, I’ve found answers to my questions above. So now I guess I’d just like to chime in to help find the best solution.

    Members plugin
    As I understand it, Justin’s Members plugin has pretty much fixed WP’s handling of capabilities by saving these roles in wp_usermeta as if they were capabilities, and allowing the assignment of capabilities to roles, instead of assigning them to individual user (which is just mad).

    Even though WP already supports multiple roles per user, its own user edit form sabotages this by removing all but one role if you click “save”.

    So it seems to me that if (hopefully when) the Members plugin become part of core, there shouldn’t be any need for bbPress to introduce a role handling interface – instead it would just add to the confusion, which I think is the case now, even though I realize that it is a valiant effort to fix a problem with WP core at this point in time.

    Solution?!
    So wouldn’t all this be solved right now by just modifying WP’s user edit form to allow for multiple role assignment?

    moonoi
    Participant

    Ok, so I fixed half of this problem. Turns out that somewhere, someone has made the bbP function that checks if the wp_editor should be used return false, if the user is not “keymaster”.

    Since I have no idea where or why this happens, I’ve overridden it by inserting this in my theme (maybe someone else has the same problem):
    `
    add_filter(‘bbp_use_wp_editor’, ‘ml_allow_wp_editor’, 1000, 2);
    function ml_allow_wp_editor($value, $default) {
    return true;
    }
    `

    The “participant” users still get an error, when they try to upload a file. I hope someone who knows the inner workings of bbP can help.

    Thanks!

    moonoi
    Participant

    I also just discovered that this is related to another problem I have:

    Only the keymaster can upload files in the new media manager screen. If a “participant” tries to upload, it just returns the standard “Error – try again later” message.

    #126282
    undyingearth
    Participant

    I’ve almost got this working, but my PHP-fu skills are not quite strong enough. @johnjamesjacoby and @thesnowjunkies pointed me in the right direction, but I feel like I must be making a basic mistake in the implementation.

    I found the function bbp_get_time_since in /plugins/bbpress/includes/common/functions.php

    I managed to achieve the desired effect by deleting the following:

    `
    // Step two: the second chunk
    if ( $i + 2 $since ) {
    $output = $unknown_text;

    // We only want to output two chunks of time here, eg:
    // x years, xx months
    // x days, xx hours
    // so there’s only two bits of calculation below:
    } else {

    // Step one: the first chunk
    for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
    $seconds = $chunks[$i][0];

    // Finding the biggest chunk (if the chunk fits, break)
    $count = floor( $since / $seconds );
    if ( 0 != $count ) {
    break;
    }
    }

    // If $i iterates all the way to $j, then the event happened 0 seconds ago
    if ( !isset( $chunks[$i] ) ) {
    $output = $right_now_text;

    } else {

    // Set output var
    $output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2];

    // Step two: the second chunk
    if ( $i + 2 < $j ) {
    $seconds2 = $chunks[$i + 1][0];
    $name2 = $chunks[$i + 1][1];
    $count2 = floor( ( $since – ( $seconds * $count ) ) / $seconds2 );

    // Add to output var
    if ( 0 != $count2 ) {
    $output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'bbpress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'bbpress' ) . ' ' . $count2 . ' ' . $chunks[$i + 1][2];
    }
    }

    // No output, so happened right now
    if ( ! (int) trim( $output ) ) {
    $output = $right_now_text;
    }
    }
    }

    // Append 'ago' to the end of time-since if not 'right now'
    if ( $output != $right_now_text ) {
    $output = sprintf( $ago_text, $output );
    }

    return apply_filters( 'bbp_get_time_short', $output, $older_date, $newer_date );
    }

    `

    This almost works. It cuts off the extra chunk. The problem is, it also returns a freshness value that is several years off. Instead of saying "10 minutes ago", it gives me "12 years ago"!

    Any ideas what I'm doing wrong? I can achieve what I want by editing the core plugin, but I'd really like to update-proof this.

    Thanks!

    J.S.

    #126281
    youngmoneychina
    Participant

    Hi,

    Sorry to jump in but this is exactly the function i am looking to implement.

    Did you get anywhere with it?

    I have found various plugins that will allow you to do option 2 and 3 but your first option is where i am also stumped. Justins “members” plugin seems to look like it should option 1 but it does not seem to.

    Like you i basically need a way of making forums or topics only visible to a specific member and the admin.

    for example:

    I post a topic “Johns support topic”

    When i log in as admin i can see it and participate in it.

    When other users log in they cannot see it or participate in it.

    When John logs in he can see it and participate in it.

    The issue is i will need a large amount of these “Support topics” so cannot make John able to see “hidden_forums” etc.

    Thanks, any advice is appreciated.

    #126279

    Topic: New Frugal Community

    in forum Showcase
    Ben
    Participant

    A huge thank you to the entire bbPress community!

    I am excited to launch my frugal community today. This has been a bucket list item for a long time, and thanks to the hard work of everyone here it is now a reality.

    Please feel free to take a look. Comments are always welcome and appreciated.
    http://www.afrugalreality.com/

    Best,
    Ben

    #126278
    Peter
    Participant

    Hello, Is there a way to edit the bbpress registration email when a user first registers. I know in previous version you could do this by editing the functions.bb-users.php file, But what about the new version? I am using version 2.2.4. Any help is appreciated.

    Thank you

    florianbottermann
    Participant

    I added a code line to functions.php. Now, the name of the commentator is linked. But the is only a forwarding to the blog entry, not to the bbPress profile page of the commentator…
    commentator name

    florianbottermann
    Participant

    Here comes the functions.php code:
    functions.php

    And here comes the bbPress code:
    bbPress

    florianbottermann
    Participant

    I’m working at a WordPress site in which I want to use the bbPress plugin. Now, I want to create a link between the normal WordPress comment function and bbPress. I just want to do one thing. Under my standard WordPress blog entries, the users of my site can post comments. The comments are listed under the respective blog article. Next to each comments there the picture of the user that creates the comment. Now I want to create a link between the picture of the commentator and his bbPress profile page. When someone presses the picture of the commentator, there should be a forwarding to the bbPress profile page of the commentator. Observer of my blog can get a few informations about the commentator by that. Unfortunately I’m not able to create the link.

    This is the code of my functions.php, that describes the comments setup of my normal WordPress commenting system:

    And this is the bbPress php code which creates the user avatar link to the profile page:

    Can somebody tell me the way how I have to modify the WordPress functions.php?

    Even now, many thanks for your Help!

    #126273
    kraigg
    Participant

    You could install the BuddyPress plugin, which has forums listed under groups. If you decide to go with this option, make sure to do a backup of your database first, just in case.

    Or you could customise your forum list page using bbPress shortcodes (https://codex.bbpress.org/shortcodes/). You would just need to get the IDs of the forums. Such as:

    Forums page
    ———–

    Main forums
    [bbp-single-forum id=32]
    [bbp-single-forum id=1]
    [bbp-single-forum id=5]

    Other forums
    [bbp-single-forum id=23]
    [bbp-single-forum id=12]
    [bbp-single-forum id=54]
    [bbp-single-forum id=3]
    [bbp-single-forum id=7]
    [bbp-single-forum id=8]

    #126270
    Stephen Edgar
    Keymaster
    #126268
    xmasons
    Participant

    I’m trying to create a page that includes only recent topics which would only be available to a forum role of Participant and a visibility of Private.

    Creating a new page and using the short code [bbp-topic-index] doesn’t work, as the Private page visibility is based on WordPress user roles and not bbPress.

    Is there a way to create an additional forum template that lists recent topics? This would not replace the main forum list view, but would be an additional page.

    #126267

    In reply to: bbPress 2.2.4 Released

    hatherley
    Participant

    Still, my music forum is still only capable of using BBpress 2.1.2 – The “Automatically assign default role to new, registered users upon visiting the site.” doesn’t seem to work for me. My newly registered users cant use the forum if I update 🙁

    moonoi
    Participant

    After upgrading to 2.2.4, only the “keymaster” role gets the normal fancy post editor with a choice between WYSIWYG view and source code view.

    Normal “participant” users only get the source code view (exactly like in this support forum). There’s the row of helper buttons to insert code, but you can’t switch to the WYSIWYG view.

    I checked that there are no JS errors. (This is usually what prevents the tabs for switching to show up).

    I figure it must have something to do with the capabilities of the forum roles, but I don’t know how I would be able to view or change these. I use the Members plugin to edit roles and caps for the rest of WP.

    #126265
    moonoi
    Participant

    Thanks Justin and John for all your amazing contributions to the community. I have a few questions/thoughts…

    Dynamic roles – how to edit their caps?
    The switch to “dynamic” roles in the most recent BBPress has left me completely puzzled. I’m still not sure what “dynamic” is supposed to mean?!

    I can’t seem to find anywhere to view and/or edit the caps of these new forum roles. I’d like to, for some reason only “keymaster” users get the wysiwyg post edit form, whereas “participant” can only see the source code pane (no, there are no js errors?!).

    Roles and capabilities in WP
    I have been using Justin’s Members plugin, which made roles and caps in WordPress work like I feel it should. In the same way as in Drupal core. Any number of roles can be assigned to a user. Caps are assigned to roles – never to one single user of course. One specific user will have the combined capabilities of the roles he/she has.

    Am I right that the only thing keeping us from just having a happy life together with Members plugin – assigning many roles to one user – is WP core’s User Edit screen that cuts everything else but one role away when you click save? If so, this should be easy to fix by just modifying this User Edit form. Right!?

    Thanks! 🙂

Viewing 25 results - 27,151 through 27,175 (of 64,535 total)
Skip to toolbar