-
Henry replied to the topic Xprofile get field data checkbox returns array in the forum How-to & Troubleshooting 11 years, 5 months ago
May 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.
-
Henry replied to the topic Xprofile get field data checkbox returns array in the forum How-to & Troubleshooting 11 years, 5 months ago
That 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 }… -
Henry replied to the topic Hide members from Members Directory in the forum How-to & Troubleshooting 11 years, 5 months ago
Humm, 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…[Read more]
-
Henry replied to the topic Hide members from Members Directory in the forum How-to & Troubleshooting 11 years, 5 months ago
What 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?
-
Henry replied to the topic Xprofile get field data checkbox returns array in the forum How-to & Troubleshooting 11 years, 5 months ago
thanks @shanebp, nice one for explaining it all properly :}
-
Henry replied to the topic Xprofile get field data checkbox returns array in the forum How-to & Troubleshooting 11 years, 5 months ago
Or of course use shanebpdev’s approach if you need a comma separated list
-
Henry replied to the topic Xprofile get field data checkbox returns array in the forum How-to & Troubleshooting 11 years, 5 months ago
With 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.
-
Henry replied to the topic Anoying: Visiting main page will redirect to register page! in the forum How-to & Troubleshooting 11 years, 5 months ago
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…[Read more]
-
Henry replied to the topic Checking profile field values with PHP in the forum How-to & Troubleshooting 11 years, 5 months ago
Note: 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.
-
Henry replied to the topic Bug in comment feed??? in the forum Installing BuddyPress 11 years, 5 months ago
Bug reports can be raised at Trac once you’re sure it’s a bug:
-
Henry replied to the topic Import Social Contacts in the forum Creating & Extending 11 years, 5 months ago
Although 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.
-
Henry replied to the topic [Resolved] How to customize register-page in the forum How-to & Troubleshooting 11 years, 5 months ago
When 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.
-
Henry replied to the topic Hide members from Members Directory in the forum How-to & Troubleshooting 11 years, 5 months ago
@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.
-
Henry replied to the topic Hide members from Members Directory in the forum How-to & Troubleshooting 11 years, 5 months ago
OK, I think I might have cracked it for you. Just tested and this works for me. Add this directly after
bp_the_member()
in members-loop.php
<?php
[Read more]
$memberid = bp_get_member_user_id();
$now = time();
$last_active = bp_get_user_meta ( $memberid, 'last_activity', true );
$last_active = strtotime( $last_active );… -
Henry replied to the topic Hide members from Members Directory in the forum How-to & Troubleshooting 11 years, 5 months ago
The general idea would be to add something like this directly after
bp_the_member()
in members-loop.php
$days_since_last_login;if ( $days_since_last_login > 60 ) continue;
You just need to find out how to get the number of days since last login. -
Henry replied to the topic Amend Members Directory title in the forum How-to & Troubleshooting 11 years, 5 months ago
will do! i’ll get started on it this weekend and post on Trac if I come across any issues.
-
Henry replied to the topic Amend Members Directory title in the forum How-to & Troubleshooting 11 years, 5 months ago
@hnla i’m going to start using theme compat post 1.8 as i need the template hierarchy stuff you’ve been working on. Can’t wait for that!
-
Henry replied to the topic Amend Members Directory title in the forum How-to & Troubleshooting 11 years, 5 months ago
You certainly don’t have to set up a localisation file if changing the odd heading in BuddyPress is all you need to do.
That said – The benefits of having a localisation file in place are huge (i can name some if you like..?) and it isn’t difficult to set one up if you follow the tutorial on that page.
Going back to your method of editing your…[Read more]
-
Henry replied to the topic [Resolved] Conditional check for activate page in the forum How-to & Troubleshooting 11 years, 5 months ago
thanks again @sbrajesh – i shouldn’t have assumed exiting was automatic!
-
Henry replied to the topic [Resolved] Conditional check for activate page in the forum How-to & Troubleshooting 11 years, 5 months ago
@hnla you beat me to it – i was just reading that exact page. Thanks for your help!
- Load More
@henrywright-1
Active 9 years, 10 months ago