Trobee (@trobee)

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • in your bbpress theme file bbpress/content-single-user.php is what calls all the different sections of your forum profile, so you should be able to find the calls in there.

    Incase you are having trouble locating it

    <?php do_action( 'bbp_template_notices' );

    // Profile details
    bbp_get_template_part( 'bbpress/user', 'details' );

    // Subscriptions
    bbp_get_template_part( 'bbpress/user', 'subscriptions' );

    // Favorite topics
    bbp_get_template_part( 'bbpress/user', 'favorites' );

    // Topics created
    bbp_get_template_part( 'bbpress/user', 'topics-created' );

    I have a similar situation, although I will have forums on other subsites eventually, so I have it enabled over the whole site, but I only created forums on one subsite.

    The only thing I think I had to do was set up rewrites in .htaccess from all other subsites and the main site to view user profile pages.

    For the main page:

    RewriteRule ^users/(.*)$ /forums/users/$1 [L,R=301]

    For subsites:

    RewriteRule ^[subsite]/users/(.*)$ /forums/users/$1 [L,R=301]

    Also, I am using the “Move Privacy Options” plugin to make the subsite private, and I noticed that the bbpess rss feeds are not private. I am currently woking on fixing this and so far this is what I have got, which is by no means perfect.

    You will need to find the functions bbp_display_topics_feed_rss2 and bbp_display_replies_feed_rss2 in bbp-topic-functions.php and bbp-reply-functions.php respectively, and add this code to the beginning of each fuction

    if (!isset($_SERVER['PHP_AUTH_USER'])) {
    header('WWW-Authenticate: Basic realm="My Website"');
    header('HTTP/1.1 401 Authorization Required');
    exit;
    }
    $user = wp_authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);

    if ( !$user || is_wp_error($user) ) {
    header('WWW-Authenticate: Basic realm="My Website"');
    header('HTTP/1.1 401 Authorization Required');
    }

    Which should limit who can read the rss feeds to people who have a login to your wordpress site.

    I think you misunderstood my question. I have my roles and capabilites set up, I am just missing the php code to display the role in forum posts, (ie where it says member under my name and moderator underneath yours)

    In reply to: RSS feed vulnerability

    I am using the “more privacy options” plugin to control blog privacy and I am guessing the limitation is with the plugin, as it does not protect uploaded media either. Does anyone know of any other privacy plugins that may help me resolve this?

    In reply to: 2.0 – Require Login

    https://wordpress.org/extend/plugins/more-privacy-options/

    You will need to have your forums on a separate site if you have a public area for your site, then you can choose your required privacy settings from settings –> Privacy

    I believe there are some plug-ins that allow you to set the privacy of individual pages, which may suit you better, but I have not used them so I would not know which one to suggest

    If you are using a multisite install make sure you are viewing the template on the same site as the forums are in, otherwise it will not pick them up

    if you add

    .bbp-author-avatar {

    display: none;

    }

    to the css file andre pointed to it will probably stop all avatars being displayed anywhere in the forum

    In reply to: RSS feed vulnerability

    I have commented out bbp_display_topics_feed_rss2 in bbp-topic-functions and bbp_display_reply_feed_rss2 in bbp-reply-functions so the rss feeds now seem to be disabled.

    Is this going to break any other functionality at all?

    I don’t know if this is possible at the moment. I started writing a plugin to try and add this functionality but my knowledge of php is not good enough.

    I have achieved a similar solution, though it lacks some functionality, by using a multisite wordpress install, and having each site with its own forums, and making each site only viewable to members. Then, if you want a user to be able to see a forum you make them a member of the site. The downside of this is that you have multiple forum areas.

    I have created some shortcodes to allow you to list forums from multiple sites on single page, but have not got around to adding it as a plugin yet.

    If you would like to try it out then you can grab the code from the pastebin link here https://bbpress.org/forums/topic/multisite-displaying-forum-list and just create an empty folder in your plugins directory, then copy the text from pastebin into a new php file in that folder.

    The usage is a bit strange and explained in the other thread

    I am using bbPress 2.0 and in the end I managed to recover the posts by exporting the tables I wanted to keep from the database, nuking the database and the wordpress install and installing it again.

    Still have no idea how it happened though

    I can view each topic page, and you can see all the metainfo about the topic creator, as well as for the replies, but where the content should be there is just a blank box. I have checked with an inspector and the text is definately missing, and not just hidden on invisible.

    I have topics that have been created both from the back and front ends

    Thanks for the help.

    I did not end up having to reload the permalinks but that may something to do with my site settings.

    I also turned it into a plugin which can be seen here

    http://pastebin.com/2mDe0qpW

    It is set up so that

    [bbp-forum-header]

    [bbp-forum-site-index id=8]

    [bbp-forum-site-index id=7]

    [bbp-forum-footer]

    will provide a single list of all forums on sites 8 and 7 if anyone else would like to try it

    Well, I am currently modifying the bbp-forum-index shortcdde so that it will take a site id as an optional parameter.

    This is the method I have so far, but I am not sure how to call the bbp_has_forums() on the other site, as I do not know a huge amount of php

    Any help would be appreciated

    public function display_forum_index( $attr, $content = '' ) {
    global $bbp;

    if ( !empty( $content ) || !is_numeric( $attr['id'] ) ) )
    return $content;

    if ( empty( $attr['id'] )
    {
    $current_site = get_current_site();
    $site_id = $current_site->id;
    }
    else
    {
    $site_id = $attr['id'];
    }
    // Unset globals
    $this->unset_globals();

    // Start output buffer
    $this->start( 'bbp_forum_archive' );

    // Breadcrumb
    bbp_breadcrumb();

    // Before forums index
    do_action( 'bbp_template_before_forums_index' );

    // Load the forums index
    if ( bbp_has_forums() )
    bbp_get_template_part( 'bbpress/loop', 'forums' );

    // No forums
    else
    bbp_get_template_part( 'bbpress/feedback', 'no-forums' );

    // After forums index
    do_action( 'bbp_template_after_forums_index' );

    // Return contents of output buffer
    return $this->end();
    }

    https://wordpress.org/extend/plugins/tags/bbpress has most of the current plugins available for bbpress 2.0

    Is there an advantage for using this method rather than having a subsite for each group of users? I havn’t use buddypress before

    Bearing in mind that I will probably require a subsite for each group eventually anyway

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