Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 251 through 275 (of 1,585 total)
  • @boonebgorges

    Keymaster

    Here’s what I suggest.

    Copy the function `bp_blogs_record_post()` to your own plugin, and rename it. Near the beginning of the function, add a little logic that does the following:
    – Gets the post categories, based on` $post_id`
    – Based on the post categories, looks up the group(s) in which the post should appear

    With this additional information, do the following. I’m assuming here that you just have a single group as the result of the above logic, but if you have more than one, you’ll need to loop over them.
    – Change the call to `bp_blogs_record_activity()` to `groups_record_activity()`
    – Change the `hide_sitewide` value to `false`, so that you don’t get duplicates
    – Change the `item_id` to the group id

    That should make these posts show up in the group activity stream.

    To make sure they get sent to everyone, even if they are subscribed to Weekly Digests or New Topics Only, drop a line in your function above:

    `add_filter( ‘ass_this_activity_is_important’, ‘__return_true’ );`

    @boonebgorges

    Keymaster

    There’s a couple different things happening here.

    First, because you’re hardcoding the additional parameters directly in the template, they apply to everywhere in your theme where you show activity. You might consider either switching it to a filter of `bp_ajax_querystring`, so that you can put some logic into the function (eg, `if ( bp_is_current_action( ‘friends’ ) ) // do this; else // do this;`), or doing that logic right in the template:

    `$params = ”;
    if ( ! is_super_admin() ) {
    $params .= ‘&scope=friends’;
    }
    ?>
    `

    @boonebgorges

    Keymaster

    It looks like BuddyPress was not properly installed. You should never see the ‘You have no groups’ message, unless you have manually deleted something from the database.

    In reply to: Buddypress menus

    @boonebgorges

    Keymaster

    The purpose of the BuddyBar is to provide a number of handy links throughout an entire WP/BP installation. I’d suggest that you just get rid of it on small screen sizes.

    > Has anyone been able to reduce all the basic menu items into one easy to understand menu?

    Easier said than done. The top tab menu (in the header) plays a fundamentally different role in the site than the profile-level menu; the former is for sitewide content, while the latter is for user-specific content. They can be combined into a single menu pretty simply, but such a combined menu quickly becomes overrun with many options and submenu. It’s not obvious that this is preferable to having several simpler menus.

    For the purposes of device size responsiveness, I might suggest that you think of the profile-level nav as the primary navigation, and that the top-tab global nav be considered secondary; you could drop that down to the bottom of the page without much loss in overall functionality, especially for logged in users.

    Please share your thoughts and your results as you continue to work on responsive designs for BP. It’s a new area for everyone working on the project, and we’re always interested in hearing new ideas about how it might be done in a user-friendly way.

    @boonebgorges

    Keymaster

    > I got this error when I click on the groups tab

    This is a problem with the BuddyPress Groups Extras plugin. Try disabling it. You should also turn down the PHP error reporting level; it should never show this kind of (relatively harmless) error on the public site.

    > And I can’t seem to create my test group’s own forum. In the link I gave in my first post, they have their own forum separately each in each group.

    You’ll have to give more details about “can’t seem to create”. Are you getting an error message? What are you doing to try to set it up? You should have done the following:
    1) Gone through the Group Forums setup at Dashboard > BuddyPress > Forums Setup
    2) Gone to an individual group’s Admin tab, and then to Settings
    3) Checked the ‘Enable group forum’ checkbox, and saved changes.

    @boonebgorges

    Keymaster

    What theme are you using?

    @boonebgorges

    Keymaster

    Works fine for me. If you’re being redirected to the home page, it’s probably because you are logged in – logged-in users are not allowed to look at the Register page.

    @boonebgorges

    Keymaster

    If you don’t want anyone in any group to be able to send invites, put the following in your bp-custom.php file:

    function bbg_no_send_invites( $can_send_invites ) {
    $can_send_invites = false;
    
    return $can_send_invites;
    }
    add_filter( 'bp_groups_user_can_send_invites', 'bbg_no_send_invites' );

    If you want to be more selective than that – for instance, allowing only group admins to invite, or blocking invites only in private groups – you’ll need to put some more logic in there before setting $can_send_invites to false.

    @boonebgorges

    Keymaster

    It sounds like you have a javascript issue with your theme. What theme is it? Did it come with BuddyPress compatibility built in, or did you use the BP Template Pack to set it up yourself?

    @boonebgorges

    Keymaster

    Anything’s possible ;)

    You won’t be able to do it with `bp_the_topic_pagination()` because that function requires that you are inside of a single topic loop, which you’re not.

    Try something like:

    `global $forum_template;

    $per_page = 5;
    $total_posts = $forum_template->topic->topic_posts;

    $pag_links = paginate_links( array(
    ‘base’ => add_query_arg( array( ‘topic_page’ => ‘%#%’, ‘num’ => (int) $per_page ), bp_get_the_topic_permalink() ),
    ‘format’ => ”,
    ‘total’ => ceil( (int) $total_posts / (int) $per_page ),
    ‘mid_size’ => 1
    ) );
    echo $pag_links;`

    @boonebgorges

    Keymaster

    > By default on my install, BP_ENABLE_USERNAME_COMPATIBILITY_MODE was “true”. I’m not sure why.

    I’m not sure why either. By default, BP does not define it at all, much less to `true`. It sounds like setting it to `false` has solved your problem. (In brief, when `BP_ENABLE_USERNAME_COMPATIBILITY_MODE` is true, BP uses the `user_login` to create URLs; otherwise it uses `user_nicename`.)

    The reason the `/ragnar/` URL is not working is because, as you can see in the first query above, the user_nicename has been changed to `ragnar-2`. You’ll want to change it back manually, in this case and in any other case where changes have occurred.

    There does appear to be a bug somewhere here. I opened a Trac ticket: https://buddypress.trac.wordpress.org/ticket/4101 Thanks for your help debugging – feel free to follow along there.

    @boonebgorges

    Keymaster

    It sounds like the BuddyPress Stalker plugin is the culprit – my guess is that it is not initializing itself properly, so that when WP deactivates BuddyPress momentarily during the upgrade process, Stalker continues to try to load (incorrectly). If you can’t do what Paul suggests (perhaps because you can’t access your Dashboard), use an FTP client to navigate to `wp-content/plugins/` and rename the BuddyPress Stalker plugin directory to something like `bp-stalker-backup`. That should bring your site back, at which point you can change that plugin’s folder back and/or reactivate it.

    @boonebgorges

    Keymaster

    I don’t think we can just ignore the -2 issue, because I think that it points to a larger confusion between `user_nicename` and `user_login` on your installation. I’m not sure what kind of further debugging can be easily done at this point, though, without direct access to your system. I guess I would check a couple of things if this were my system:

    – Drop some debug `var_dump()`s around https://buddypress.trac.wordpress.org/browser/tags/1.5.4/bp-core/bp-core-catchuri.php#L239, to see how BP is determining your displayed user ID
    – Check directly in your database to see if there is some strangeness in the way that your user_nicename is defined in wp_users. The nicename should not contain capital letters or spaces, though user_login can.

    @boonebgorges

    Keymaster

    Not sure where to start with this, but the `-2-2` problem reminds me of https://buddypress.trac.wordpress.org/ticket/2642. Note that that ticket had to do with a very specific problem which is, I think, different from yours in the details, but may have the same root issue. As an experiment, try commenting out the following line in `bp-members/bp-members-functions.php`:

    `add_action( ‘pre_user_login’, ‘bp_core_strip_username_spaces’ );`

    @boonebgorges

    Keymaster

    Are you, by chance, using the following configuration setting?

    `define( ‘BP_ENABLE_USERNAME_COMPATIBILITY_MODE’, true );`

    It would be in your wp-config.php file, or perhaps bp-custom.php.

    In reply to: Logging Bugs

    @boonebgorges

    Keymaster

    Do you have strict cookie settings on your browser? Make sure you’re set up to accept cookies from buddypress.trac.wordpress.org (or try on a browser with default cookies). You may also try clearing your cache.

    @boonebgorges

    Keymaster

    I don’t know off the top of my head how to do that, unfortunately. The only way I can imagine is something like this:
    – filter bp_activity_allowed_tags and disallow all tags except for ``
    – then write another filter that catches the content very late in the process (eg ‘bp_activity_content_before_save’ with a priority of 9999) and does some fancy regex to figure out which remaining `
    ` tags are @-mentions and which are not, and strips the latter.

    Good luck!

    In reply to: Sitewide Forum Help

    @boonebgorges

    Keymaster

    Right now, BP is transitioning between an old version of bbPress (1.x) to the newest version (2.x), which is totally rewritten. The implementation of Sitewide Forums in BP 1.5 uses bbPress 2.x, while group forums use 1.x. (Complicated, I know :) ) The appearance and integration of sitewide forums will be much improved in BP 1.6, where we’ll have written the code necessary for bbPress 2.x to replace all forums in BP.

    In the meantime, I suggest only using *either* Sitewide Forums or Group Forums. You could probably do some work to hack them together in a more seamless way, but much of the work will be done for you in the next major BP release.

    In reply to: Migrating from Drupal

    @boonebgorges

    Keymaster

    The standard WP import XML format is really meant to handle WP content (posts, pages, tags, etc) rather than users and BP data. If you want to see an example of some PHP that processes data for import into BP, you may be interested in https://github.com/boonebgorges/Import-from-Ning/blob/master/bp-functions.php

    @boonebgorges

    Keymaster

    To elaborate on what @DJPaul said – BP uses WP’s logout, which is handled by wp-login.php. In particular, a request is sent to wp-login.php?action=logout, with a redirect_to argument of the current BP page.

    @boonebgorges

    Keymaster

    Which comment boxes are you talking about? Which theme are you using?

    @boonebgorges

    Keymaster

    If you want to remove all HTML, this should work:

    `function bbg_remove_activity_html( $content ) {
    return strip_tags( $content );
    }
    add_filter( ‘bp_get_activity_content_body’, ‘bbg_remove_activity_html’, 1 );
    add_filter( ‘bp_get_activity_content’, ‘bbg_remove_activity_html’, 1 );
    add_filter( ‘bp_activity_content_before_save’, ‘bbg_remove_activity_html’, 1 );`

    If you want to remove HTML tags more selectively, check out the filter at the end of this function, which will allow you to modify which tags are allowed: https://buddypress.trac.wordpress.org/browser/tags/1.5.4/bp-activity/bp-activity-filters.php#L90

    @boonebgorges

    Keymaster

    I’m a bit unclear on the use of the word ‘groups’ here (BP is not entirely clear either). There are ‘profile field groups’, which are groupings of profile fields, and then there are Groups. You’re talking about profile field groups, right?

    Note that profile fields will only show up on a user’s profile if the user has filled in some data for that field. So if you’ve added new fields, they won’t show up on a user’s public profile until they have filled something in.

    @boonebgorges

    Keymaster

    The function you want is `xprofile_get_field_data()`. It takes two parameters: the field name/ID, and the user_id. So, for the logged in user,

    `$county = xprofile_get_field_data( ‘County’, bp_loggedin_user_id() );`

    In reply to: Migrating from Drupal

    @boonebgorges

    Keymaster

    I don’t know of any straightforward migration tools, unfortunately. I don’t know much about Drupal’s export capabilities – maybe something like this http://groups.drupal.org/content-migration-import-and-export would get the data into a usable format. Then you could write a couple of basic WP/BP loops to do the importing. Do you know anything about PHP programming?

Viewing 25 replies - 251 through 275 (of 1,585 total)
Skip to toolbar