Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,426 through 1,450 (of 1,585 total)
  • @boonebgorges

    Keymaster

    Two plugins is probably overkill. Maybe I’ll build both a group interface (as part of the Send Invites screen) and a profile interface (probably just a button from the profile that goes to a generic invitation screen) and have them both togglable by sitewide admins.

    @boonebgorges

    Keymaster

    Thanks so much, Peter. This is a killer plugin and it sounds like a welcome upgrade – especially the document path stuff.

    @boonebgorges

    Keymaster

    Gee whiz, there’s a lot of clamoring for this kind of plugin!

    Building an invite-via-email plugin is pretty high on my development list – probably within the next month or so – but before I start I’d be interested in gauging how people think it should work. Gpo1 says that it should be from a profile page. My own feeling is that it’s more of a group-centric thing – I might be part of a group and I know others would enjoy the group, so I’d want to invite from there. Could be in both places, I suppose.

    My plan is to make inviters able to select a certain number of groups when inviting someone, and when the invitee registers, invites will be sent for those groups.

    Things like FB, Twitter, Gmail contact harvesters would come later.

    Any suggestions are welcome.

    Boone

    @boonebgorges

    Keymaster

    You’re welcome! If you make more changes, please post them to this thread so that others can benefit.

    @boonebgorges

    Keymaster

    Yeah, you’re right. Try this. It seems to work for me. Make sure you clear your cookies before testing.

    function blog_posts_by_default( $query_string ) {
    global $bp;

    if ( ($bp->current_component == BP_ACTIVITY_SLUG || !$bp->current_component) && !$query_string)
    $query_string = 'type=new_blog_post&action=new_blog_post';

    return $query_string;
    }
    add_filter( 'bp_dtheme_ajax_querystring', 'blog_posts_by_default' );

    @boonebgorges

    Keymaster

    I don’t know how to fix this in a theme or through a plugin function. The reason is that the activity page is the default, which is shown when no $object is passed to bp_dtheme_ajax_querystring. bp_dtheme_ajax_querystring returns false when there’s no object, so there’s no content to filter.

    Here’s a way to more or less fix the problem:

    1) Put this in functions.php of your theme:

    function members_alpha_by_default( $query_string ) {
    global $bp;
    if ( $bp->current_component == BP_ACTIVITY_SLUG || !$bp->current_component)
    $query_string = 'type=new_blog_post&action=new_blog_post';

    return $query_string;
    }
    add_filter( 'bp_dtheme_ajax_querystring', 'members_alpha_by_default' );

    2) In bp-themes/default/_inc/ajax.php, comment out lines 23 and 24, which read

    if ( empty( $object ) )
    return false;

    You’ll lose this hack, of course, when you upgrade BP.

    @boonebgorges

    Keymaster

    I think Dwenaus’s solution works, but he forgot a line:

    function custom_group_alpha_first() {
    ?><option SELECTED value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option><?php
    }
    add_action( 'bp_members_directory_order_options', 'custom_group_alpha_first' );

    Another, less good, solution: Put the following in your theme’s functions.php:

    function members_alpha_by_default( $query_string ) {
    global $bp;

    if ( $bp->current_component == BP_MEMBERS_SLUG && !$bp->current_action)
    $query_string = 'type=alphabetical&action=alphabetical';

    return $query_string;
    }
    add_filter( 'bp_dtheme_ajax_querystring', 'members_alpha_by_default' );

    It’s not as good because it doesn’t change what the dropdown reads. A simple fix for that is just to move the Alphabetical option to the top of the list in your theme file, but if you’re going to do that you might as well just add SELECTED to the alphabetical option and skip the filtering function. Maybe I’m missing something with the bp_dtheme_ajax_querystring hook – is there a way to change what the dropdown reads? I thought that’s what ‘action’ was.

    @boonebgorges

    Keymaster

    I submitted a trac ticket https://trac.buddypress.org/ticket/2099 that will allow you to filter the output of bp_has_blogs. Once that goes in, it’ll make this sort of thing a bit less hacky – you can actually set up an exclude array in a plugin, and filter the blog list accordingly.

    @boonebgorges

    Keymaster

    Oho, I learn something new every day!

    So r-a-y – since it’s profile-field specific, you can probably skip while (bp_profile_fields() ) : bp_the_profile_field() right? #toolazytotrymyself

    @boonebgorges

    Keymaster

    If you want to get information out of the custom xprofile fields, you’ll need to use some of the functions in the profile-loop. I don’t think there are any core BP functions that allow you to pull a specific profile field by name or ID, so you’ll have to create a profile loop (<?php if ( bp_has_profile() ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>), then a profile field loop (<?php if( bp_profile_group_has_fields() : while ( bp_profile_fields() ) : bp_the_profile_field(); ?>) and then loop through the items, picking out the ones you want by field name. Use the code in profile-loop.php as a template for what you want to insert into members-loop.

    @boonebgorges

    Keymaster

    Hrm. No idea off the top of my head. I will install an instance of single-user WP and see if I can replicate.

    @boonebgorges

    Keymaster

    bpinspire – Just to be clear: you are going to the Edit page for a group, and you see all the current members on the left, but you only see friends in the list at the right?

    I haven’t tested on a single WP but I don’t think it should make a difference, as the user list is pulled right from the BP_Core_User class. Any more info you could give would be helpful – screenshot, maybe?

    @boonebgorges

    Keymaster

    stwc – I spent some time when I first ported that plugin to make inline images work, but I couldn’t manage to do it in the same way that the original bbPress plugin does. I kept coming up against problems with the way headers are sent to the browser, which is, to put it mildly, not my area of expertise :)

    I have literally not even glanced at the plugin on BP 1.2+. I’ll have to do so soon, though, as not having forum attachments will be a stumbling block for me to upgrade my production site from BP 1.1.3.

    As always, I’ll keep everyone updated via these forums and http://teleogistic.net.

    @boonebgorges

    Keymaster

    Yeah! r-a-y r-u-l-z!

    @boonebgorges

    Keymaster

    Thanks, Andy, and good call – that’s what I get for testing only on my local installations that have only a handful of groups!

    I made the fix in version 0.3. It was a bit tricky, because bp_groups_pagination_links() wasn’t adding the ‘order’ attribute to its links. I put together a slightly modified version of that core function and now the pagination links are being created properly.

    @boonebgorges

    Keymaster

    Hi Anointed. Glad it works!

    I have already written a plugin that does what you want! Search the repo for Invite Anyone and see what you think.

    @boonebgorges

    Keymaster

    Anointed – is that a new activity item? My fix won’t change things that have already been posted to the stream. Only new items will be correct. Is that the case for you?

    @boonebgorges

    Keymaster

    Thanks, Anointed. Fixed in version 0.2.

    @boonebgorges

    Keymaster

    Thanks for the plug, Erich :)

    https://wordpress.org/extend/plugins/custom-profile-filters-for-buddypress/ is the plugin you’re thinking of. I updated it about a week ago to work on versions of BP 1.2+ (though you should definitely let me know if it does not work!).

    @Nick – the plugin will do what you want. Check out the readme file, which will explain how to make it work.

    @gregfielding – That’s a good idea, but at the moment BP is not set up in a way that makes it easy to create those check marks with a plugin. Maybe I’ll submit a core patch that does it, as I’d like to see it too.

    @boonebgorges

    Keymaster

    Are you saying boo, or Boourns?

    @boonebgorges

    Keymaster

    This is a theme issue. The new bp-default has a main content area (where you’re seeing the “not found” message which signifies that you haven’t yet posted any blog entries on the main blog), and one sidebar at the right. You’ll have to create a child theme and register some new sidebars if you want to use the new bp-default and have a similar look to the old bp-sn-parent.

    Here’s a discussion on the subject: https://buddypress.org/forums/topic/three-columns

    @boonebgorges

    Keymaster

    Tim – we must be on similar wavelengths. I was just thinking about this problem yesterday and I wrote the following: http://teleogistic.net/code/buddypress/bp-import-blog-activity/. I assume that, because this creates activity items for all members who have ever posted/commented on the site, it will do the work of adding those members to the directory as well. (Still doesn’t do anything for members who have never contributed, probably.) Hope it helps.

    @boonebgorges

    Keymaster

    Duly noted, David :) thanks for your help – and it looks like you found the problem in exactly the same way that I did!

    @boonebgorges

    Keymaster

    The best solution at this time is something like Group Activity Notifications https://wordpress.org/extend/plugins/buddypress-group-activity-stream-subscription/. It does a bit more than what you’re asking for, and by default it has everyone subscribed to everything, but it does allow the user pretty fine-grained control over notifications.

    We’re working to make the plugin more customizable, so that the site admin could choose to turn notifications off by default. Then it would work just like the way you describe.

    @boonebgorges

    Keymaster

    OK, found the problem. I’m running BP on a blog other than blog_id=1. Apparently I had made the change to BP_ROOT_BLOG in a core file (not sure why). So when the new files were loaded, and bp-core-catchuri.php tried to parse the URL, it was getting hung up on the fact that the current blog was not (so it thought) the BP blog.

    I set the constant in a plugin, where it belongs, and everything is hunky dory now.

Viewing 25 replies - 1,426 through 1,450 (of 1,585 total)
Skip to toolbar