Forum Replies Created
-
In reply to: testbp.org down
wow! i found that site quite useful. any reason for the closure?
In reply to: Getting the large avatarI’m not 100% sure this will resolve the issue but try deleting your avatar and then uploading a new one.
BuddyPress may have ‘crunched’ the image on upload (it may have created a full size image and also a much smaller thumb image). It is possible that it is still serving your old ‘very small’ thumbnail image at the bigger 192×192 size which will account for why it looks like it does.
In reply to: Getting the large avatarYou could always att this to bp-custom.php
define ( 'BP_AVATAR_THUMB_WIDTH', 192 ); define ( 'BP_AVATAR_THUMB_HEIGHT', 192 );Then use this in your post page
$author = get_the_author(); echo get_avatar( get_the_author_meta('ID'), 120, '', $author );Not the ideal solution but it should work. Note that all you’ve really done is increased the default BuddyPress thumb size. As i say, not the ideal approach but i can’t see how you can use
get_avatar()for your objective when BuddyPress filters it in the way it does.In reply to: Getting the large avatarI’ve just raised a BP Trac ticket for this
https://buddypress.trac.wordpress.org/ticket/5074In reply to: Getting the large avatarBuddyPress seems to attempt to filter get_avatar() – see bp_core_fetch_avatar_filter(). I did bring this issue up a while ago at WordPress Trac but the call was closed.
https://core.trac.wordpress.org/ticket/24596
Wonder if anyone thinks it’s worthy of a BP Trac ticket?
In reply to: Show members based on custom field checkboxesJust a little tip for when you get your code working – check the pagination count is updated to account for the members you’ve excluded from the loop.
In reply to: Xprofile get field data checkbox returns arrayThanks for pasting everything. I see now exactly what you’re trying to do. This should work:
<?php if ( $sectors = xprofile_get_field_data( 'Specialist Sectors', get_the_author_id() ) ) { ?> <?php foreach ( $sectors as $sector ) { ?> <?php echo $sector; ?> <?php } ?> <?php } ?>In reply to: Xprofile get field data checkbox returns arrayCan you paste the exact code which you are using in the text widget on the post page that works, and can you then paste the code you are using in the post page widget that does not work?
In reply to: Xprofile get field data checkbox returns arrayTry using the code in your user profile template, then if that works you’ll know the widget is the issue.
@musickjl thanks!
@musickjl which theme are you using? i’d be interested to see how to redirect users to the change-avatar page directly after registration
In reply to: Hide members from Members DirectorySo 2 issues remain.
1. Pagination count
2. Filter by roleWith reference to the first issue, you’d need to rewrite function
bp_members_pagination_count()which is found in bp-members-template.php. Your new function would go into your theme’s functions.php and would have to account for the recently inactive and blocked users.With reference to the second issue, I think the logic you have is OK – just not sure about the role “blocked” – still hoping for a bbPress expert to advise…
In reply to: Xprofile get field data checkbox returns arrayMay I ask where in your theme you’re using the code?
Also, double check the exact spelling you’ve used for the field name matches “Specialist Sectors”. Also try editing your profile making sure a few checkboxes have actually been checked. Sometimes it is the most obvious parts of the process that cause the issue.
In reply to: Xprofile get field data checkbox returns arrayThat doesn’t look quite right to me. I’ve never used the $multi_format approach myself so perhaps shanebpdev can advise on that. My approach would be this:
<?php if ( $sectors = bp_get_profile_field_data( 'field=Specialist Sectors' ) ) { ?> <?php foreach ( $sectors as $sector ) { ?> <?php echo $sector; ?> <?php } ?> <?php } ?>In reply to: Hide members from Members DirectoryHumm, never used the ‘blocked’ role in bbPress. You could try changing the line:
if ( $days_since_last_active > 60 ) continue;to
$user = new WP_User( bp_get_member_user_id() ); if ( ($user->roles[0] == 'blocked') || ($days_since_last_active > 60 ) ) continue;I am not exactly sure if there is a role called “blocked” in bbPress. Perhaps someone else familiar with bbPress can chip in here to confirm?
My approach was taken from this thread:
https://buddypress.org/support/topic/excluding-roles-from-the-member-loop/In reply to: Hide members from Members DirectoryWhat do you mean by locking an account? i’m not sure i’ve ever come across that before. Is it standard functionality to WordPress/ BuddyPress or does the functionality come as a plugin?
In reply to: Xprofile get field data checkbox returns arraythanks @shanebp, nice one for explaining it all properly :}
In reply to: Xprofile get field data checkbox returns arrayOr of course use shanebpdev’s approach if you need a comma separated list
In reply to: Xprofile get field data checkbox returns arrayWith checkboxes you’re not storing a single item of data as the user can check many checkboxes. This is why the the data is stored in an array. If you want to display the list of values you can easily process the array with a for loop, echoing the value on each cycle.
As far as I am aware this isn’t default behaviour of BuddyPress or bbPress so it would seem you have a rogue redirect in place somewhere which is resulting in users being taken to the register page. Places to check for the redirect are:
1. .htaccess
2. Any plugins you’ve installed
3. Any custom code you’ve addedI’d start by deactivating every plugin (aside from BuddyPress), remove any custom coding you have in place, use the default theme and then see if the problem is resolved.
In reply to: Checking profile field values with PHPNote: With checkboxes you have to be careful because the user can choose both A and B, they can even choose A B and C. The way you’ve wrote your pseudo logic above you might want to go with radio buttons.
In reply to: Bug in comment feed???Bug reports can be raised at Trac once you’re sure it’s a bug:
In reply to: Import Social ContactsAlthough it doesn’t let you import friends, the Invite Anyone plugin will allow your site members to invite their contacts to sign up. Although not exactly what you’re looking for, it may be helpful.
In reply to: [Resolved] How to customize register-pageWhen a new version of BuddyPress is released and you decide to upgrade, you’ll lose all of the changes you’ve made to BuddyPress core files. Poedit enables you to change labels, URLs and text without editing any BuddyPress core files so you are free to upgrade painlessly each time a new version of the software is released.
In reply to: Hide members from Members Directory@shanebp thanks – i’ll take a look at pre_query hooks in 1.8 – just about to download the beta and have a play around.