Search Results for 'profile fields'
-
AuthorSearch Results
-
July 17, 2014 at 3:40 pm #185215
AIRFieldNotes
ParticipantThanks for the response. I think I was a bit confused, I am actually using Magazine Basic, not Buddypress Default, but thanks for the head’s up.
I created the extended profiles via Users>Profile Fields
July 17, 2014 at 11:10 am #185207The Doctor
ParticipantAnd I resolved it simply.
Just add
#buddypress table.profile-fields p { margin-top: 10px !important; margin-bottom: 10px !important; }or the kind of margin you want, to a custom css, and voíla!
July 15, 2014 at 12:48 am #185093@mercime
Participantusername appearing twice on registration form
@jaciando1 Change the “User Name” profile field name in the “Profile Details” box -> go to admin menu
Users > Profile Fields and click on the “edit” button under that profile field name.I also appear to have two different register forms???
You can add the following to your theme’s functions.php page:
/* If BuddyPress is active */ if ( class_exists('BuddyPress') ) { add_action('init','mme_redirect_register'); function mme_redirect_register(){ global $pagenow; if( 'wp-login.php?action=register' == $pagenow ) { wp_redirect('http://buddypress.dev/join-us'); exit(); } } }Change
http://buddypress.dev/join-usto your site’s register page.July 8, 2014 at 10:03 pm #184911In reply to: Adding xprofile data in my Activity Stream
JoshtheDesigner
ParticipantI tried the exact code that you put in your first response. I put it in my Functions file then updated one of the xProfile fields and it was not in the activity feed.
July 8, 2014 at 7:13 pm #184901In reply to: Adding xprofile data in my Activity Stream
JoshtheDesigner
ParticipantOk yes sorry I knew that. I tried to add it to my functions.php and I updated my profile but it did not show in the activity feed. I would like it to show in the activity feed if anyone updates their profile via the xprofile fields. It looks like from your code that it would only show if I update my profile. Any thoughts?
July 8, 2014 at 5:40 pm #184896In reply to: Adding xprofile data in my Activity Stream
shanebp
ModeratorUse the ‘xprofile_updated_profile’ hook
function josh_profile_check( $user_id, $posted_field_ids, $errors ) { /* check $posted_field_ids to see if one of the fields you are interested in has changed if yes, then use bp_activity_add to add to activity stream */ } add_action( 'xprofile_updated_profile', 'josh_profile_check', 10, 3 );July 3, 2014 at 7:45 pm #184784dzung
Participant@mercime – I just fix the issue with notification tab – and that seems to has effect on this too.
Now logged in members can see other members full profile fields. I want to make the full profile fields including base fields and xProfile group fields public to everyone even not logged in, how can I do this?
July 3, 2014 at 6:39 am #184763In reply to: How to have a Dynamic xProfile field?
dzung
ParticipantTo anyone who want the same thing, follow my below steps.
I have a text file contains about 600+ names of schools and I want to make a schools-drop-down – So It’s very time-consuming to click add option one by one. It needs another way:
1. Content of The Schools list text file.
Tamale Polytechnic
Kumasi Polytechnic
Accra Polytechnic
Cape Coast Polytechnic
Koforidua Polytechnic
Ho Polytechnic
….600+…
2. I go to xProfile and create a Drop-down named it Schools – I input one option say “A sample school” – save.
3. I go to phpMyadmin -to Database to table gsl_bp_xprofile_fields – Search “A sample school” to find the newly created Sample schools row – on the result look at the
columns: (group_id, parent_id, type , name) . they should have values like: (group_id: 1, parent_id: 127,type :’option’ ,name :’A sample school’).
4. Next I use a Core Java code(because I don’t know how to do this in PHP) to read the schools list text file one by one and custom the print out like this:String fileName = "D://Schools.txt"; String line = null; try { FileReader fileReader = new FileReader(fileName); BufferedReader bufferedReader = new BufferedReader(fileReader); while((line = bufferedReader.readLine()) != null) { line = line.replace("'", ""); String sqlBase = "INSERT INTO gsl_bp_xprofile_fields (group_id,parent_id, type,name) VALUES (1, 127,'option' ,"+"'"+line+"'"+");"; System.out.println(sqlBase); } bufferedReader.close(); }After running the above code I have a list of SQL insert commands printed on my eclipse they look like this:
INSERT INTO gsl_bp_xprofile_fields (group_id,parent_id, type,name) VALUES (1, 127,'option' ,'Tamale Polytechnic'); INSERT INTO gsl_bp_xprofile_fields (group_id,parent_id, type,name) VALUES (1, 127,'option' ,'Kumasi Polytechnic'); INSERT INTO gsl_bp_xprofile_fields (group_id,parent_id, type,name) VALUES (1, 127,'option' ,'Accra Polytechnic');….many more insert commands until the end of the schools file 600+
5. Next, I copy all these commands, come back phpMyadmin database- table gsl_bp_xprofile_fields – to SQL tab, paste all commands, click run/go to insert all the options.
That’s all done for me!
June 30, 2014 at 1:17 am #184564In reply to: Multi Select Box in Profile fields doesn't work
elihub
ParticipantI did the same research as @kansas3d – multiselect only saves the last of multiple fields on the xprofile edit screen. I am running BP 2.0.1 (WP 2.9.1), and have confirmed that rolling back to BP 1.9 (not BP 2.0) fixes the issue. I disabled all plugins and experienced the same problem in my custom theme (built on Bones, not TwentyFourteen-derived).
Converting multiselect to checkboxes allows for multiple value saving, but is not optimal. I have tracked down some similar tickets (#2176 from BP 1.2 and there’s another somewhere…)
Update – it appears there is an open ticket (#5672) related to this:
https://buddypress.trac.wordpress.org/ticket/5672June 26, 2014 at 8:10 am #184436In reply to: How to have Two Sign up forms?
dzung
ParticipantFor now, I’ve come to another solution, where I allow users to Register new account with base Fields and a Role selection (Student or Lecturer in my case). They then fill in only base field and then after account creation they can update their Student or Lecture xProfile Group Fields in their profile page edit.
I do these above by using 3 plugins:
1. https://wordpress.org/plugins/wpfront-user-role-editor/
This will allow me to add new Role: Student and Lecturer in my case (I have tried other Role plugin but they conflict with other plugins on my site, this one doesn’t).2. https://wordpress.org/extend/plugins/wp-roles-at-registration/
This one allow me to add a Drop down for New user to choose their wanted role : Student or Lecturer3. https://wordpress.org/extend/plugins/buddypress-xprofiles-acl/
This plug in allow me to set buddypress xProfile group to a specific user role. In my case, I created two xProfile Group fields named “Student” and “Lecture” each has different fields. Then using this plugin I assigne the xProfile Student to Student Role, and the xProfile Lecturer to Lecturer Role.That’s all done!
Meanwhile I will use this, but I still want to be able to have two sign up forms with different fields so that I can require New user to fill in the Required field to make the profile better. I can’t code much so hope someone will help!
June 25, 2014 at 6:58 pm #184407In reply to: How to display static text as a profile field?
nhalation
ParticipantWell, with a bit more Googling I’ve gotten this solved for the most part. I know these pages get indexed so here’s what I did for anyone’s future reference. For this example’s sake I’ll just cover the “Member Since” field.
– Created a copy of profile-loop.php in the appropriate child theme directory for update-safe modification.
– In the child copy of profile-loop.php, right beneath
<?php do_action( 'bp_after_profile_field_content' ); ?>, which is inside (and at the bottom) of the ‘if ( bp_profile_group_has_fields())’ if check, I put the following code to output this field for the base group only (assuming the base group has an ID of 1):<?php if ( bp_get_the_profile_group_id() == 1 ) : ?> <table class="profile-fields"> <tr<?php bp_field_css_class(); ?>> <td class="label">Member Since</td> <td class="data"><?php bp_custom_profile_fields(); ?></td> </tr> </table> <?php endif; ?>And then finally, in my child theme’s functions.php file (this could probably also go in bp-custom.php) I found and pasted this code to define and format the join date:
function bp_custom_profile_fields() { global $bp; $currentuser = get_userdata( $bp->displayed_user->id ); $joined = date("F jS, Y", strtotime($currentuser ->user_registered)); echo '' . $joined . ''; }June 25, 2014 at 4:16 pm #184399In reply to: How to viewing profiles
GT Director
ParticipantUPDATE: okay guys, I figured out that I needed to click onto the word “Edit” and fill out the new fields to see them displayed in my new profile – after clicking the word “View”. But there is no way to change the stupid avatar.
What is the simple way to click onto a user profile link (when a user wants to view their own profile – not the profiles of other users), view just their own information and edit it?? We have to click a “Members” page, search for our personal profile and try to access it that way?
Why is there no “Profile” page listed among the “Pages” portion of this plugin???? That would be an easy, self-explanatory page that we could preview to see how profiles appear to all users, decide which fields to display or rearrange fields. Change avatars, etc. Why is this program not that simple? What am I missing?
June 23, 2014 at 7:56 pm #184345In reply to: [Resolved] Odd Buddypress Problem with new signups?
godavid33
Participant@kaizerking you should probably start your own thread, as that is an entirely different problem ( actually, I would say same for you @dhyana , but your question was already answered haha)
but if I had to posit a suggestion (in a new thread of course) it would be to use the plugin Theme My Login. It has saved me a good bit of headache as far as getting xprofile fields to show up on registration
June 21, 2014 at 6:40 am #184293In reply to: [Resolved] Odd Buddypress Problem with new signups?
kaizerking
ParticipantAdded two fields in profile fields they are not displayed in registration form
June 19, 2014 at 8:48 am #184210In reply to: Set checbox value with xprofile_set_field_data
koendb
ParticipantGot it 🙂
All you need is the value of the checkbox.
<input id="nieuwsbrief" type="checkbox" value="newsletter"
You can find/set this value in the users –> profile fields pageThen just set the value of $newsletter to ‘newsletter’ when the box is checked or any other value if it’s not and use:
$meta_update = xprofile_set_field_data( '<em>name or id of field</em>', $user_id, $newsletter);Glad to answer any questions
June 18, 2014 at 12:22 pm #184178In reply to: Social Media Link Icons in profiles
danbp
Participant1) create your social fields on xprofile
2) give them a name like Twitter or Facebook
3) tell the user to enter their social username
4) install font-awesome or similar to get nice social iconsThis function works as of BP 1.7 and was tested on BP 2.0.1. Add it to bp-custom.php or your (child) theme’s functions.php
Icons are showed under @username | active since at the right of the user avatar on the profile header.
Remove the text Test… if you want to use only font-awesome icons or replace it with an image or text of your choice
function bpfr_socialize_profile () { echo '<br>'; // don't remove ! if ( $data = bp_get_profile_field_data( 'field=Twitter ' ) ) : ?> <a href="http://twitter.com/<?php echo xprofile_get_field_data( 'Twitter', bp_displayed_user_id() );?>/" target="_blank" title="Twitter"><i class="icon-twitter"> </i>Test Twitter</a> <?php endif; if ( $data = bp_get_profile_field_data( 'field=Facebook ' ) ) : ?> <a href="http://facebook.com/<?php echo xprofile_get_field_data( 'Facebook', bp_displayed_user_id() );?>/" target="_blank" title="Facebook"><i class="icon-facebook"></i>Test FB</a> <?php endif; } add_filter( 'bp_before_member_header_meta', 'bpfr_socialize_profile' );June 18, 2014 at 6:53 am #184168In reply to: Social Media Link Icons in profiles
dromy
ParticipantI agree, can you add option to create a field with a custom link not relating to the search?
like on the wp profile but on the bp edit profile fields selection.June 17, 2014 at 4:14 pm #184148In reply to: Birthday Notification with thumbnail
escudero95
ParticipantHi danbp,
I put the code you posted into functions.php but it didn’t seem to have any effect. I made the visibility of the date of birth field to ‘friends only’ first via the user selection, then via the profile fields settings area and ‘enforced default’. Is there a different way you mean for me to do that?
Thanks
June 16, 2014 at 3:01 am #184102In reply to: Front End Profile Editing
paton400
ParticipantNo, I need to grant the user role permission to ‘edit users’. But by granting that, I’m granting them access too much access.
I want only want them to be able to change the information in other users profile fields. I don’t want them to be able to read private messages.
Is this a question for Buddypress, WordPress or my user role permissions plugin?
June 15, 2014 at 8:44 am #184071In reply to: Help with profiles
danbp
ParticipantIt’s a field builder plugin, not a filter, so no it wouldn’t help you. BuddyPress already do this (building fields and fields section) for xprofile component, so such a plugin is not to use with BP.
Conditionnal fields is an old and remaining “must have” thing, but the state of the art is far away i guess.
https://buddypress.org/support/topic/buddypress-conditional-profile-fields-available-now/i would take a try over Gravity Form at your place.
June 13, 2014 at 1:13 pm #183996In reply to: [Resolved] Display xProfile field groups
pstidsen
ParticipantNow the function is runned, but no fields are shown. My code is:
//Prints xProfile function PrintKontaktinformationer() { // we need the user_id first (mandatory outside a loop) $user_id = bp_displayed_user_id(); // now we fetch the field data (separate field id's by comma) $my_field = xprofile_get_field_data('10, 9, 1, 11, 12, 13, 14, 15', $user_id); // we built the output echo '<div class="authorinfo">TEST'. $my_field . '</div>'; } // the new hook add_action( 'show_PrintKontaktinformationer', 'PrintKontaktinformationer' );June 12, 2014 at 7:54 pm #183977In reply to: [Resolved] Notify by Email when xProfile Updated
Chris Perryman
ParticipantJust wanted to follow up…we did come up with a solution for this in case any one else is looking for it.
Full details are now on my blog at Revelation Concept.
function rc_buddypress_profile_update( $user_id ) { $admin_email = "YOUR-EMAIL@DOMAIN.COM"; $message = sprintf( __( 'Member: %1$s', 'buddypress' ), bp_core_get_user_displayname( $user_id ) ) . "\r\n\r\n"; $message .= sprintf( __( 'Color: %s' ), bp_get_profile_field_data('field=Color') ). "\r\n\r\n"; wp_mail( $admin_email, sprintf( __( '[YOUR SITE] Member Profile Update' ), get_option('blogname') ), $message ); } add_action( 'xprofile_updated_profile', 'rc_buddypress_profile_update', 10, 5 );June 12, 2014 at 8:25 am #183942In reply to: Hot can I display the profile fields groups in tabs?
dromy
ParticipantThank you for the quick response.
when adding groups and more fields the groups and fields are displayed on the member page as a table.
I would like to create a tabs display to the member information (my created fields and group) when each group of (ex.wp-widget base) div\table is displayed on a different tab.hope I am clear.
on the admin or edit cases I do not want to touch for now. This relate only for the view buddypress member profile as a member or as anonymous.(and sorry, I meant how on topic and not hot)
June 12, 2014 at 8:18 am #183939In reply to: Hot can I display the profile fields groups in tabs?
danbp
ParticipantOn xprofile component, the default field group is called Name and contains only one field who will contain the username. This group is already tabed on a profile page and is the only group field who appears on the register page.
Now, on the xprofile admin you can add as many fields and group fields you want, and you can set each field to different visibility.
These new field can be grouped and each group you create will automatically be tabed on a profile page.https://codex.buddypress.org/buddypress-components-and-features/extended-profiles/
If you mean showing groups on the profile, this also made automatically by BP. On each profile, you have (if exist) the groups the member belongs to.
If all this is not what you mean, be more explicit 😉
June 11, 2014 at 12:33 pm #183913In reply to: [Resolved] How to hide more than one profile field?
CommonEasy
ParticipantHi there, i have an additional question… can this be used to hide profile groups from the edit profile group tab ? I tried;
// commoneasy hide fields function commoneasy_hide_some_profile_fields( $retval ) { if( bp_is_profile_edit() ) { $retval['exclude_fields'] = '15'; //multiple field ID's should be separated by comma } return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'commoneasy_hide_some_profile_fields' ); // commoneasy hide groups function commoneasy_hide_some_profile_groups( $retval ) { if( bp_is_profile_edit() ) { $retval['exclude_groups'] = '4'; //multiple field ID's should be separated by comma } return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'commoneasy_hide_some_profile_groups' );unfortunatly it didn’t work, i hope somebody can help!
-
AuthorSearch Results