Search Results for 'profile fields'
-
Search Results
-
Hi there,
I have a profile field which i hided from the edit profile page, so it will basically function as a view only field. The data for this field is getting from another table (t2) i created in MYSQL, that data in t2 is generated from data from other profile fields from wp_bp_xprofile_data. (Data from all the users is used, you can see it has some kind of calculator. So i tried to update the wp_bp_xprofile_data table with a procedure triggered after an update on the profile fields, unfortunately this doesn’t seem to work (http://buddypress.org/support/topic/start-procedure-when-profile-is-edited/). So now i am asking if it is possible to load the data from profile field 15 directly from t2, instead of first transfer the data from t2 to wp_bp_xprofile_data? the columns from t2 are user_id | value and from wp_bp_xprofile_data are afcourse id | field_id | user_id | value. Where is the best place to start? Thanks in advance 🙂
ps. i use BP 2.0.1. and WP 3.9.1.I need to disable the Extended Profile fields for users. I’m importing their data from our database into WordPress so they can view their info and also search for other members; but they can’t be allowed to change the data as it’s not all data they have permission to update (like membership level, etc.) Plus, we’re not setup to sync their changes in buddypress with our internal database yet.
I’ve done some searching and can’t seem to find a solution. I hope there’s one out there.
Thanks in advance for your help.
I am trying to write a function that will send me an email whenever a user makes a change to one of their profile fields. Thanks to Chris Perryman at Revelation Concept I was able to figure out how to do this when the user makes changes to a standard wordpress profile field like nickname or user_email.
But she and I both got stuck trying to apply her awesome solution to buddypress xprofile fields. Here’s the thread from yesterday’s conversation between she and I.
I would be super grateful if anyone has any ideas on what we’re missing. Thanks!
Hi, I’m somewhat new to WordPress and a little newer to BuddyPress, and the site I’m working on right now is using Sweet-Date theme and the horizontal search bar for members is just UGLY. I’m looking to go in and make changes to the html code in the search fields loop. So certain fields use a certain percentage of the area. I’m not sure if the search-bar display code would be lying around in the SweetDate theme’s folder. (Assuming that’s where it is.) Or if this is a modification needed to be made somewhere else.
Also if this is a easy question to answers… Is there a way I can get the value of profile fields left blank by the user? I would like to make a little percentage system. 🙂
Happy coding!
Andrew
1. I was wondering whether it is possible to have facebook style cover photos in Buddypress user profiles?
If it needs to be custom coded please show me the way.
2. One more thing Can I make the user photo in a circle format? to make it look a little stylish.3. How do I have a menu only for user profiles, right now all the fields looks a little cluttered.
Hi,
Long time lurker first time poster – i’ve got a bit of a problem that I just can’t figure out;I’m trying to get the value of the ‘radius’ field for the displayed user into a piece of PHP code to be used later on, but I keep getting errors;
Here is the code that i’m using:
(it’s a function that gets the radius value for the user and returns it:function gmw_get_radius($user_id) { global $wpdb; $info = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM <code>wp_uotu_bp_xprofile_data</code> WHERE user_id = $user_id AND field_id =1255" )); return ( isset($info) ) ? $info : false; }The error that I receive via WP debug is :
Warning: Missing argument 2 for wpdb::prepare(), called in /home3/housepa7/public_html/wp-content/plugins/geo-my-wp/plugins/friends/includes/gmw-fl-functions.php on line 35 and defined in /home3/housepa7/public_html/wp-includes/wp-db.php on line 1147 Notice: wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.) in /home3/housepa7/public_html/wp-includes/functions.php on line 3245Any help towards this would be very much appreciated and I can provide any more info if needed, thanks!
NOTE: I just checked the post and it added code tags around some of the php – this is not intended and they should be apostrophes!
Hi there,
i´am looking for a way to show profile fields as a currency or a percentage. I use the xprofile custom profile fields plugin to use some profile fields as number fields. However it doesn´t support a currency filter jet. I tried to following code in the custom profile fields plugin on advice as a first step:
add_filter( 'bxcft_show_field_value', 'my_show_field', 15, 4); function my_show_field($value_to_return, $type, $id, $value) { if ($type == 'number') { $value = str_replace("<p>", "", $value); $value = str_replace("</p>", "", $value); $field = new BP_XProfile_Field($id); if ($field->name == 'Waarde van je gadget (€)') { setlocale(LC_MONETARY, 'nl_NL'); $value = money_format('%.2n', $value) . "\n"; $new_value = money_format('%.2n', $value) . "\n"; } else { $new_value = $value; } return '<p>'.$new_value.'</p>'; } return $value_to_return; }this code should change profile field 15 to a currency, unfortunatly it didn’t work. I hope there is a way to do this in buddypress itself. Can somebody please help me to the right direction? many many thanks in advance 🙂
I’ve modified the members-loop.php file so that my Members Directory page will display the list of members in a certain way (as shown below, for example purposes).
Member 1
Small Poodle
Los AngelesMember 2
Large Collie
BostonMember 3
Large Dalmatian
ChicagoMember 4
N/A No Dog
MiamiFollowing is the code I’ve placed in the members-loop.php file to successfully display the above results on the Members Directory page.
bp_member_profile_data('field=Dog Size'); echo ' '; bp_member_profile_data('field=Dog Breed'); echo '<br>'; bp_member_profile_data('field=Dog Weight'); ?>Question: Is it possible for me to not display the line for ‘N/A No Dog’ whenever a member has specificed “No Dog” in the ‘Dog Breed’ field on their profile? For example, in the above, I still want the Member 4 to be shown in the list of all members. However I do not want the ‘N/A No Dog’ line (which comes from the Dog Size and Dog Breed fields entered on their profile) to be displayed underneath their username. I would only want their location, Miami, to be shown.
Is this possible?
Hello People,
i got 2 Problems.
I Add for the Buddypress Profile that people can add their Homepage Links. The Problem is now that the URL´s opened in the same tab and not in a new. Its Possible to change this? Thats when somebody clicks on the URL Link that it opened in a New Tab?
ANd 2nd:
Its Possible do Hide the Dashboard on the left side for normal Users? They cant do nothing on my site (Just a Community with a Forum and later Groups) but i think when they click on the dashboard and edit profile they think that they can change nothing Oo
Sry for my bad english guys, but i think u understand what i mean
EDIT:
Oh yeah and i Use WordPress 3.9.1, Buddypress 2.0.1, Buddypress – Who clicked at my Profile? 1.7, BuddyPress Security Check 1.2.0, Buddypress Xprofile Custom Fields Type 1.5.9.5
Hello.
So I’m trying to do a member loop that shows only members with avatars.
Here is my code:
template member loop file has this line:
bp_has_members( gd_custom_ids( 'What are your interests?', $interests ) . '&per_page=6&type=random')functions.php
/********* SEARCH MEMBERS BASED ON PROFILE FIELDS *********/ function gd_custom_ids( $field_name, $field_value = '' ) { if ( empty( $field_name ) ) return ''; global $wpdb; $field_id = xprofile_get_field_id_from_name( $field_name ); if ( !empty( $field_id ) ) $query = "SELECT user_id FROM " . $wpdb->prefix . "bp_xprofile_data WHERE field_id = " . $field_id; else return ''; if ( $field_value != '' ) $query .= " AND value LIKE '%" . $field_value . "%'"; /* LIKE is slow. If you're sure the value has not been serialized, you can do this: $query .= " AND value = '" . $field_value . "'"; */ $custom_ids = $wpdb->get_col( $query ); $i = 0; $user_ids_loop = array(); foreach ($custom_ids as $custom_id){ if(gd_check_avatar($custom_id)){ $user_ids_loop[$i] = $custom_id; $i++; } } if ( !empty( $user_ids_loop ) ) { // convert the array to a csv string $custom_ids_str = 'include=' . implode(",", $custom_ids); return $custom_ids_str; } else return ''; } /********* CHECK IF MEMBER HAVE AVATARS *********/ function gd_check_avatar($user_id){ // Check for avatar. $fbavatar = false; $user_info = get_userdata($user_id); $username=$user_info->user_login; // Check what information is missing? Avatar? Profile info? $username = strtolower($username); $userfbavatar = get_user_meta($user_ID, 'facebook_uid', true); if (!empty( $userfbavatar ) ) { $fbavatar= true; //echo "DEBUG: user has a FB photo<br/>"; } if (bp_core_fetch_avatar( array( 'item_id' => $bp->loggedin_user->id, 'no_grav' => true,'html'=> false ) ) != bp_core_avatar_default() ) { $has_photo = true; //echo "DEBUG: user has a photo<br/>"; } if ( $has_photo || $fbavatar) { $avatarchk = true; } if(!$avatarchk){ $avatarchk=false;} return $avatarchk; }I have ~6,000 members on my site.
I get this error:
[30-May-2014 06:59:51 UTC] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 64 bytes) in /Users/giova/Sites/lam.dev/wp-content/mu-plugins/wpengine-common/patterns.php on line 331 [30-May-2014 06:59:51 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0I assume that the for loop in function gd_check_avatar() is not helping.
What would be the best way to do this to reduce resources and still get only members with avatars?
Or at least, sort the members so that the first members have an avatar.
Thanks!
Giovanni
Hi –
I have a site which uses the Membermouse plugin. Members on the sign up form set 4 Mmebermouse custom fields to say what their job is and where they work. I need the same data in Buddypress custom fields but only one input point. I don’t want to change the existing Membermouse implementation.
Is there a way that I could simply take the data from the Membermouse custom fields and copy it into Buddypress custom fields without allowing the member to alter anything in Buddypress? Ie, on the profile the data appears “automatically” copied across from the sign up information?
Many thanks.
Is it possible to have new user’s ‘profile fields’ already filled in when a users first registers and signs-in? Similar to how there’s a default avatar image when a users first signs-in, they know they need to add a picture unless they want to remain a grey silhouette, I’d like them to see profile fields filled in with generic data that they’ll need to change unless they want their fields to remain with sarcastic content of my choosing..
Thanks!
Up to date on BuddyPress and WordPress Multisite, Twenty Fourteen Theme.
Hi,
I use buddypress on my website and I would like to add a field to my registration form for my users to confirm their email addresses – the benefits of this option are very important in my opinion.
Can anyone help me out in this? How could I make this happen? I can’t just use Extra Profile Fields BP provides for this. I need the email fields to MATCH just like the Password and Confirm Password.
I have the latest version of Buddypress along with BBPress. My theme is Salutation. Thanks!
Ps: I have no coding skills, whatsoever…
Cheers
Hello,
i want to add a
<a href='#' target='_blank'>Terms</a>but it does not work !
BuddyPress is always removeing the target=’_blank’ and saves only\<a href=\'#\'\>Terms\<\/a\>in the Database.
In whitch file can i find the “Profile fields – Page”,
i want to fix it without changeing something in the Database.