Search Results for 'profile fields'
-
AuthorSearch Results
-
September 6, 2015 at 10:53 pm #244138
In reply to: required Username twice at Registration
nilje
ParticipantNo, there is no other plugin which could cause it
I’ve made a screenshot
http://www.danielaholl.de/Apublic/Unbenannt-1.jpg
I think the left side is the WordPress registration and right the one for buddypress.. there are my custom profile fields too.September 6, 2015 at 7:13 pm #244123In reply to: How to use bp_member_profile_data when its type URL
danbp
ParticipantTake a look at DB tables related to xprofile:
_bp_xprofile_data
_bp_xprofile_fields
_bp_xprofile_groups
_bp_xprofile_metaIf users entered data like
https://twitter.com/comandovictoruse a mysql command to wipe outhttps://twitter.com/via phpMyAdmin.UPDATE table_name SET col_name = REPLACE(col_name, 'old_value', 'new_value');wp_ is default table prefix, change it if you use another prefix.
UPDATE wp_bp_xprofile_data SET col_name = REPLACE(value, 'https://twitter.com/', '');That’s the fastest method. Don’t forget to backup the table BEFORE doing this.
Changing the field type can be done from the xprofile admin.
September 6, 2015 at 8:32 am #244118In reply to: Profile Signature
danbp
ParticipantIt is standard! At least if you use xprofile component to let your users enter their signature.
1) Create a new field. Call it Signature and give it a textarea type.
2) Once this field is edited by a user, during registration or later, the signature appears on his profile.3) if you want this field somewhere else, for ex on the profile header, you simply write a function to call this field and hook it into the template you want.
Ie. Add this to child theme functions.php or bp-custom.php
function my_signature() { if ( bp_is_active( 'xprofile' ) ) if ( $signature = xprofile_get_field_data( 'Signature', bp_get_member_user_id() ) ) : // field name; case sensitive echo $signature; endif; } add_filter( 'bp_before_member_header_meta', 'my_signature' );Or to use Henry’s advice
add_filter( 'bp_after_profile_content', 'my_signature' );Reference
August 31, 2015 at 3:40 pm #243899In reply to: Profile Fields not showing on 2.3.3
shanebp
ModeratorDid you put the profile fields in the ‘Base (Primary)’ group?
By default, only those fields appear on Register.Did you try switching to a WP theme like 2015 to determine if the issue is in your theme?
August 28, 2015 at 3:33 pm #243797In reply to: Video oembeds in Profile Field
bigkahunaburger
ParticipantFound it. The internet is written in ink. 😛
While you are here… It seems to be working great. It’s a bit old. Do you think it will cause any security or other issues with the current version of BP?
Thanks again.
August 28, 2015 at 3:07 pm #243792In reply to: [Resolved] Double profile fields??
Naisai
ParticipantYou know what! Hahaha I didnt know you could scroll the code-box. So, I saw the word ‘country when I posted it into the buddypress editor. Silly me…
But unfortunately…it didnt work There are no delete buttons to the profile fields.
August 28, 2015 at 1:23 pm #243776In reply to: [Resolved] Double profile fields??
shanebp
ModeratorDon’t replace the code.
Use this function, and change ‘Country’ to the name you gave the field.
function naisai_make_field_delete() { global $wpdb; $table = $wpdb->prefix . "bp_xprofile_fields"; $wpdb->query( "UPDATE $table SET can_delete = 1 WHERE name = 'Country'" ); } add_action( 'bp_ready', 'naisai_make_field_delete' );Then visit your site’s home page.
Then go to that field in wp-admin and you should see a Delete link.
If you have more than one field you want to Delete, then change the name in the function and repeat the process.
When you are done – remove the function.Then, if you want, get the code from the gist and run again.
August 28, 2015 at 1:13 pm #243775danbp
ParticipantAugust 28, 2015 at 1:04 pm #243772In reply to: [Resolved] Double profile fields??
Naisai
ParticipantThank you so much!
You need to find the row(s) in the bp_xprofile_fields table and for each row, change the can_delete field value to 1
But what if I have already deleted the code? Should I then replace it and overwrite according to your corrections?
August 28, 2015 at 7:35 am #243755In reply to: Buddypress & BBPress Signature
danbp
ParticipantThere is a way, if you use BBPress Signature. 😉 Modifying bbp_get_reply_content filter.
Here an example fetching 3 xprofile fields called Signature, Industry and Type. Change it to your need. Code goes into bp-custom.php or child theme functions.php
function my_bbp_reply_content_append_user_signature( $content = '', $reply_id = 0, $args = array() ) { // Default arguments $defaults = array( 'separator' => '<hr />', 'before' => '<div class="bbp-reply-signature">', 'after' => '</div>' ); $r = wp_parse_args( $args, $defaults ); extract( $r ); // Verify topic id, get author id and potential signature $reply_id = bbp_get_reply_id ( $reply_id ); $user_id = bbp_get_reply_author_id( $reply_id ); // Get fields data. Caution: name is case sensitive. if(function_exists('bbpress') ) { $signature = xprofile_get_field_data( 'Signature', $user_id ); $wowi = '<br>'. xprofile_get_field_data( 'Service', $user_id ); $wowt = '<br>'. xprofile_get_field_data( 'Type', $user_id ); } else { $signature = bbp_get_user_signature ( $user_id ); } // If signature exists, adjust the content accordingly if ( !empty( $signature ) ) $content = $content . $separator . $before . $signature . $wowi . $wowt . $after; return apply_filters( 'my_bbp_reply_content_append_signature', $content, $reply_id, $separator ); } if ( !is_admin() ) { // remove the original BBPress filter remove_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_user_signature', 1, 2 ); // add our custom filter add_filter( 'bbp_get_reply_content', 'my_bbp_reply_content_append_user_signature', 1, 2 ); }May this help. 😉
August 27, 2015 at 8:14 pm #243720In reply to: [Resolved] Double profile fields??
shanebp
ModeratorYou should remove that code as soon the field is created.
If you edit the field name, then a new field will be created – if you don’t remove the code.They dont have a delete button and now I cannot remove any of the fields.
That is because
'can_delete' => false,should be'can_delete' => true,.
I have corrected the gist.To delete the fields you already have, you can use a database tool like phpmyadmin.
You need to find the row(s) in the bp_xprofile_fields table and for each row, change the can_delete field value to 1. Then a ‘Delete’ will appear for that field in wp-admin.August 25, 2015 at 4:19 pm #243595In reply to: WP profile fields with BP XProfile Sync
shanebp
ModeratorHow about all other fields.
Your best bet is to not nibble at the problem.
Write a script to migrate all the WP profile fields & user data into BP xprofile fields & user data.August 20, 2015 at 11:34 pm #243430manicexpression
ParticipantIn the Dashbord, under users, go to profile fields, go to Add New Field, and in a box on the right there should be a requirement box, just switch it from Not Required to Required.
August 20, 2015 at 10:24 pm #243426djsteveb
Participant@katiemeeks
someone posted a similar question 4 days ago ( https://buddypress.org/support/topic/i-want-to-nobody-can-not-change-own-gender/ )someone else answered to take a look at http://buddydev.com/plugins/bp-non-editable-profile-fields/
I have not used this yet – but it sounds perfect for this kind of thing.
August 19, 2015 at 11:49 pm #243408In reply to: Translation: profile > edit
danbp
ParticipantOn a single install: danshboard > users > profile fields( your-site.com/wp-admin/users.php?page=bp-profile-setup).
Base(primary)tab, then use Edit button.
August 18, 2015 at 9:08 am #243322In reply to: how to check if the length of field is too long?
danbp
ParticipantHere an example for profile field lenght with some comments.
function bpfr_custom_textfield_length() { //Check if user is logged in & if xprofile component is activated if ( is_user_logged_in() && bp_is_active( 'xprofile' ) ) : $my_custom_textfield = bp_get_member_profile_data( 'field=Brief Biography&user_id='.bp_get_member_user_id() ); /* * The length = number of characters, not words. * Set the number of caracters to show. * The 3 dots are the appended text ending the excerpt. * Don't remove the quotes if you change this * BuddyPress 2.1 will add new class and id for custom fields. * The span can be omited to style this part. See ticket #5741 */ if ( strlen($my_custom_textfield) > 20) : //adjust to your need $my_custom_textfield = substr($my_custom_textfield, 20).'...'; //adjust to your need endif; // uncomment the following line to get a span around the displayed field content // echo '<span class="short-custom">'. $my_custom_textfield; .'</span>'; // comment the following line if you use the span echo $my_custom_textfield; endif; // is_user_logged_in } add_action( 'bp_directory_members_item', 'bpfr_custom_textfield_length' );Ticket #5741
August 17, 2015 at 7:36 pm #243298In reply to: i want to, nobody can not change own gender.
Kailan Wyatt
ParticipantYou can try this plugin by BuddyDev
August 15, 2015 at 11:51 pm #243239djsteveb
ParticipantI would GUESS that you could edit that plugin to add in the code as mentioned above https://buddypress.org/support/topic/how-users-can-link-to-their-profile/
Or ask the plugin author for clarification.
I stopped using that plugin when they added the extra security stuff for strong passwords that broke things for me.. however the plugin’s support page is pretty active, and given that he/she has options for redirecting users after login based on role – there may be an easy way to add such functionality to the plugin by asking the plugin author.
There is a bit of info with some of the functions here ->https://codex.buddypress.org/themes/members-navigation-menus/
I see others are asking about bp xprofile fields and such within the them my login support forum,
( wordpress.org/support/plugin/theme-my-login )
so hopefully this plugin author will add more and more BP options – I enjoyed using that plugin some time ago – hope it continues to mature.August 12, 2015 at 6:30 pm #243094In reply to: Creating marketplace using buddypress
djsteveb
Participant@olliecard – I’m sure there are many ways to accomplish this, however I am not sure that buddypress is easily adaptable to some of the requirements – privacy for certain things, restricting profiles and such. I hope someone can chime in an share methods for using BP in this way, I’d love to see those options.
You could play with things like s2member for some restrictions and payments even – but restricting BP stuff is a challenge I think. Using other member and restrictions plugins with regular wordpress is pretty solid.
I believe you may be able to achieve your goal using some other WP plugins – there are many others that get into profiles, membership, restrictions, classifieds and such.
It might be 50 hours of work to mash all the various components together in a perfect way – and if so you may want to look at what wpmudev has withe their “membership 2” plugin and others that mix with it. wpmudev peeps had quick answers and solutions for something similar I posted about there years ago. I think their prices are double what they should be – but the support there exists, and if you are looking at a serious project it may be best to get into a professional support system like that.
Of course you would mix and match some of the free plugins in the wp-repo and probably come out with something – press permit, profile plugins, s2member – custom fields, tweak some themes – maybe even go WP-MS multi site for some semi-separated static things – and you may achieve what you are describing as well.
I’d love to see others post about other options, and I’d love to see BP have more fine grained control over things – it’s moving in that direction with things like user levels and such so the future with bp is possible, I just don’t think it’s there yet, and likely won’t be playing well with others anytime soon – and getting code help with BP – even if you offer to pay for it – is not the easiest thing in the world.
2 cents from a random user – not an expert
August 6, 2015 at 6:32 pm #242856In reply to: Profile groups fields – bypass the base group
shanebp
ModeratorIt’s much easier to hide profile groups that aren’t Base.
Have you tried putting the Rider fields in another group?August 4, 2015 at 7:48 pm #242779In reply to: Feature Request: Filterable xProfile Field Labels
Garrett Hyder
ParticipantThanks @shanebp,
Sadly neither of these filters will allow me to modify the ‘(required)’ text itself which is what I’m looking for, I guess I’m a little off in my request encompassing the entire label text as you pointed out the field name is filterable it’s the required portion that is outside of it as you can see in the code snippet;
<label for="<?php bp_the_profile_field_input_name(); ?>"> <?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?> <?php esc_html_e( '(required)', 'buddypress' ); ?> <?php endif; ?> </label>And yes I realize I can replace it through the text-domain and a .po file, but I’d like to keep the (required) in the Buddypress Xprofile and target the inclusion of these fields specifically on the Woocommerce Checkout page where they’re included through the Buddypress for Woocommerce integration.
I’ll open an enhancement request, thanks for pointing that out, and specify the targetting of the (required) portion of the label specifically.
Appreciated,
CheersAugust 3, 2015 at 12:08 pm #242712In reply to: Display Your Profile fields to front end
startershut
ParticipantThere seems to be a gap between the two programs in terms of profile fields.
When you create a custom field via Events Manager Form Editor it stores it on the Your Profile view under ‘Further Information”. Now this field is not available under the domain.com/members/user view to edit. It is available to edit in the admin view but I don’t want to expose that view to users.
Is there a way to display these fields to user so they can edit them at domain.com/members/user
July 31, 2015 at 1:44 pm #242635sammjv
ParticipantMy coding skills are very less but want exactly what @Flush said I saw the code in bp but I don’t now what exact code to use to modify the above said piece of code.
Will you guys provide the conditional statement to load two files based on created profile fields.I don’t know weather @andy277 also wants same.
July 30, 2015 at 11:46 pm #242601In reply to: Identifying profile fields by field ID
djsteveb
ParticipantI am interested in finding out what you come up with in regards to this.
I tried to use something like:
‘field’ => 2,
);(some info from https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/ )
to replace the actual names I was using in a page title template thing, and never got it to work – but I have no idea what I am doing – trying to franken-hack a bit of code provided by one person and replace the field names with field numbers so the code would work with a different site I was playing with – when I tried replacing the name with this field number thing it did not work – but again I don’t understand php nor bp stuff well enough to know if I just missed a character, or something else was needed, or the function isn’t working as it should.July 30, 2015 at 4:12 pm #242591rgrober
ParticipantOne last question. I appreciate your patience, as I am definitely nascent when it comes to this.
The profile field I’m trying to display is a series of checkboxes. When I implement your code, the page is displaying “Array” for the field data.
Can you direct me to a resource or method to allow checkbox fields to be displayed?
Thank you again!
-
AuthorSearch Results