Search Results for 'profile fields'
-
AuthorSearch Results
-
June 16, 2016 at 7:14 pm #254701
In reply to: CV upload in Profile
danbp
ParticipantAdd a a new field group to profiles, call it CV, add some fields and options and you’re done.
As you certainly want to get this part a bit apart of the other profile fields, you can also use this plugin who brings a nice tabbed profile page.
June 16, 2016 at 2:23 pm #254641Masoud
Participant@shanebp
hi. tnx for answer and patience. got 5 more minutes? đ
i read and worked on what you said. and if i want to be honest, i could’t do anything special unfortunately.
now, i want to ask your opinion about this idea:
i’ve come up with the idea of hiding that field. (not email field), how?
with the use of if condition… (if it’s not empty show it. if it has data, hide it)!
——-
i’ve created a custom-meta with this code in theme functions:add_action( 'personal_options_update', 'my_save_extra_profile_fields' ); add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); function my_save_extra_profile_fields( $user_id ) { if ( !current_user_can( 'edit_user', $user_id ) ) return false; /* Copy and paste this line for additional fields. */ add_user_meta( $user_id, âperson_relationâ, 30318 ); update_usermeta( absint( $user_id ), 'person_relation', wp_kses_post( $_POST['person_relation'] ) ); update_user_meta( $user_id, 'person_relation', $_POST['person_relation'] ); }and used it in my buddypress signup form, to get data from users. ok?
after what you said, i went to edit.php (copy to my theme buddypress folder…)
and added these codes. but it seems that they do not recieve/send data at all.
it looks like they are empty!! đ
after<?phpat the start,
i added :global $user, $user_id; $person_relation = get_the_author_meta( 'person_relation', $user->ID ); $user_id = get_current_user_id();and in the
<form>,
i added this piece of code (not working)
then copied and changed the “save changes button”.
so there is 2 buttons. one is for my-custom-meta, and the other is for buddypress form.
buddypress edit page
if user writes the name and click save. the box/button, all should gone. and i have to see the data in Users admin panel.
but nothing is getting save… and i dont know where am i doing it wrong<?php if( $person_relation == '' ): ?> <tr> <th><label for="person_relation">Invitor's Name</label></th> <td> <input type="text" name="person_relation" id="person_relation" value="<?php update_usermeta( $user_id, 'person_relation', $_POST['person_relation'] ); ?>" class="regular-text" /><br /> <span class="description">Please enter your invitor's name.</span> </td> </tr> <input type="hidden" id="userID" value="<?php echo $user_id ?>"/> <div class="submit"> <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Name', 'buddypress' ); ?> " /> </div> <input type="hidden" name="person_relation" id="person_relation" value="<?php update_usermeta( $user_id, 'person_relation', $_POST['person_relation'] ); ?>" /> <?php add_action( 'personal_options_update', 'my_save_extra_profile_fields' ); ?> <?php add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); ?> <?php do_action( 'xprofile_profile_field_data_updated'); ?> <?php endif; ?>so sorry for long description. tnx for help.
any suggestions do you have?June 16, 2016 at 12:27 pm #254628In reply to: [Resolved] “Name” field in registration
danbp
ParticipantThe word Name can be changed on the profile fields admin screen. Simply edit it !
Dashboard > User > Profile Fields (wp-admin/users.php?page=bp-profile-setup)What do you call blanks ? Your field names are all aligned left and the width seems to be equal for all. You can reduce it via your child-thme style.css.
Note that you will anyway get different blank space as the width will be adjusted to the longest word. Ie. ABCDEF will go from left to right border, but ABC will left a blank space on the right.
June 14, 2016 at 5:41 pm #254548In reply to: how to create a new field in profile fields?
Masoud
Participanti’ve managed to create a extra field by ID, and this is the function to save it.
it’s name is “person_relation”.add_action( 'personal_options_update', 'my_save_extra_profile_fields' ); add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' ); function my_save_extra_profile_fields( $user_id ) { if ( !current_user_can( 'edit_user', $user_id ) ) return false; /* Copy and paste this line for additional fields. Make sure to change name '' to the field ID. */ update_usermeta( $user_id, 'person_relation', $_POST['person_relation'] ); }now
1) any suggestion on how should i make this box appear on group 1 ?
* or in the setting page?
and
2) how should i get the value of it? (it’s a text input)? i heard that i have to use “POST[]” method? is it the right way? and how?June 13, 2016 at 10:14 pm #254525danbp
ParticipantIn one of the comments, it’s yet explained. (july 9th 2015)
Read throught, built the ID list of the concerned users and add it to activity loop filter options
Another approach is to use the buit-in fonctionnality of profile fields. The value is linked to any member ho filled the same value.
This means that if you click New York on a profile, you get a list of all user who entered New York and by extension, you have access to all new-yorker activities.
But if you want to sort the site activity of NY users only, you need to use the first solution and to code a bit more to add also a SWA filter for any existing state…
June 8, 2016 at 4:57 pm #254323In reply to: User Profile Control By Admin
danbp
Participanthow and when do you generate the field value, if the user can’t edit it ?
The only place a user can acces a field is on his profile.On signup page, only fields who are part of the “Base” field group are shown.
You can create another field group who will contain the field you want after signup. Then, to enter something to it, the user must go on his profile. But if you disallow edition for that field, it’s quite impossible.Before signing in, a user doesn’t exist. He can only fill some registration fields before asking to be a member. Once he is approved, he can access to his profile and fill additionnal fields.
Aside, is the field value the same for all user ? Perhaps you could add this information differently to profile. Give details please.
June 6, 2016 at 11:39 am #254182Paul Wong-Gibbs
KeymasterBuddyPress doesn’t support conditional profile fields (yet?). This is asked frequently but I can’t remember if anyone’s built a plugin that handles this. You might have to hack something together bespoke for your theme.
Regarding the second point, I’d recommend creating a custom field type, if you know PHP. It’s not too hard to do — I worked on this code a year or two ago, and it’s pretty easy to do now. You could look at https://en-gb.wordpress.org/plugins/buddypress-xprofile-custom-fields-type/ for examples of how to add and register custom field types — specifically https://plugins.svn.wordpress.org/buddypress-xprofile-custom-fields-type/trunk/classes/Bxcft_Field_Type_SelectCustomPostType.php I think is a good example to work from as it displays custom post types in a list (you’d just query your custom table and pull in the values, wrap it in some caching, etc).
June 4, 2016 at 4:43 pm #254131In reply to: private buddy press
shanebp
ModeratorWP users are BP users, except for the profile fields you add in wp-admin > Users > Profile Fields
For granular control of both WP and BP content re logged-in vs. not-logged-in, have you tried BP Simple Private ?
You can get it here: WP Repo – BP Simple Private
Or here: PhiloPress – BP Simple Private
June 3, 2016 at 3:44 pm #254095In reply to: Replicate data to another database
sharmavishal
ParticipantSo you got only 1 db right? When not using bp users go into wp_users with bp installed they still go there…only 4 extra xprofile fields rows are created..which store the xprofile data
Does that solve your issue?
June 3, 2016 at 12:26 am #254078In reply to: Registration and Edit Profile Issue
r-a-y
KeymasterHmm… I forgot that those “Name” fields were not deletable from the admin dashboard.
I would recommend the following:
1. Disable the Extended Profiles component
2. Tell your developer to go into your database and drop the following DB tables:
– wp_bp_xprofile_data
– wp_bp_xprofile_fields
– wp_bp_xprofile_groups
– wp_bp_xprofile_meta
3. Next, go back to “Settings > BuddyPress > Components” and re-enable the Extended Profiles componentThis should recreate the Extended Profiles database tables from scratch and hopefully things should be okay afterwards.
June 3, 2016 at 12:02 am #254074In reply to: Registration and Edit Profile Issue
r-a-y
Keymasterthat worked!!
Glad to hear you’re up and running!
But should I now see 5 tabs of Field Groups that all say âBase (Primary)â when I go to Profile Fields under Users?
No, you shouldn’t.
You should leave the first “Base (Primary)” tab alone, but do delete the rest of them.
Do the same for the “Name (Primary)” field in the “Base” group. Keep the first one, but delete the rest.
Note that this is a new install. Iâve never used BuddyPress before
This does sound like a bug. It would be great to retrace your steps so we can duplicate this problem. Did you activate / deactivate / activate the plugin multiple times?
Same goes for the components list under “Settings > BuddyPress > Components” in the WP admin dashboard. Did you uncheck / check / submit certain components multiple times?
June 2, 2016 at 11:54 pm #254073In reply to: Registration and Edit Profile Issue
AngelaQ
Participantthat worked!! But should I now see 5 tabs of Field Groups that all say “Base (Primary)” when I go to Profile Fields under Users? Each of these have 5 fields called “Name (Primary) (Required)”.
Note that this is a new install. I’ve never used BuddyPress before and tried using xTended Profiles and gave up…
June 2, 2016 at 6:45 pm #254057In reply to: Buddypress member directory
shanebp
ModeratorThis premium plugin – BuddyProfileData – will add profile data to the members loop.
It will add fields in a vertical stack.
If you are comfortable with css and maybe a little php, you can change it to horizontal.Or you can write your own solution using this hook:
do_action( 'bp_directory_members_item' );
in this file:
buddypress\bp-templates\bp-legacy\buddypress\members\members-loop.phpOr you can create a template overload of that file and hardcode your solution directly in the template wherever and however you want it.
Re the ‘>’ – the best solution is to find out where it is being added by your theme css and change it.
June 1, 2016 at 7:36 pm #254003In reply to: Users cannot register since update 2.53
Earl_D
ParticipantI ran a test this morning with BP as the only plugin activated using tiny framework theme. Ran the same again two minutes ago with twenty twelve as theme. I do NOT use any special registration template only what comes with BP out of the box. This is the third time I have done that to prove convincingly that it isn’t simply plugins. Each time the result is the same. Whenever extended profile fields turned on registration does not go through.
I have removed all the extended profile fields except the one on the Base which cannot be removed. That is display name. That is the only thing other than account name, email and password fields that shows up on the registration form.
I am not the only one experiencing this issue I linked to support topic here on this board where someone else having the same problem.
This is literally ruining the launch of my site all my marketing has been wasted since no one can register. If his is not a problem that can be fixed can someone PLEASE tel me how to downgrade. So all my money and effort don’t get blown away.
June 1, 2016 at 6:37 pm #253998In reply to: Users cannot register since update 2.53
r-a-y
KeymasterI also tested BP 2.5.3 on WP 4.5.2 on a fresh install and cannot duplicate your problem, Earl_D.
I tested with the Extended Profiles component enabled.
Are you using any caching plugins? If so, try to disable it or whitelist the
registerandactivatepages from caching.Do you have any special extended profile registration fields? If so, can you list what they are and how they are configured?
June 1, 2016 at 1:42 pm #253992In reply to: Membership Codes
danbp
Participantit’s possible. I suppose you need a unique code for some later user specific actions. But that code exist nowhere when a user register. What can we do ?
1) generate a 6 digit code and show it on the register page
2) asign that code to the user
3) show the code on his profile1 – we use php mt_rand to generate the code and one of the available action hook on the register page for his output. Add this snippet to bp-custom.php
function bpfr_digit_generator() { $num = mt_rand ( 0, 0xffffff ); $output = sprintf ( "%06x" , $num ); echo '<strong>Your personnal code: '. $output .'</strong>'; } add_action( 'bp_after_account_details_fields', 'bpfr_digit_generator' );2) create a new xprofile field, call it Personnal Code or whatever. Make it mandatory and asign it the visibility level you want. In field description, ask the user to copy/paste in the code.
3) as the user entered the code in a xprofile field, you get automagically this field on his profile.
I’m a bit unsure how to insert this field value in the activation email, or if it’s even possible. Perhaps somebody else can help you. See email on codex.
A bit raw, but at least you have a start point how to do that.
Here also another method, you may use if you don’t want the user to copy/paste the code.
June 1, 2016 at 12:19 pm #253983In reply to: Admin approval for profile changes
danbp
Participantnothing out of the box on hand, but what if you make any of the fields with “only me” visibility level as default , for everybody ? If site admin approve the content, he can change the level to something more public.
For email notification, a solution is given in this topic.
Perhaps you can also use this plugin, with some custom restriction/adaptation.
May 31, 2016 at 3:38 pm #253939In reply to: Users cannot register since update 2.53
Earl_D
ParticipantI am running the lest version of Buddypress and WordPress on a VPS server NOT running multisite. Tiny framework is the theme I am using. However the first thing I did to trouble shoot was try to replicate problem without any plugin and using 2012 theme (which tiny frame is based on) and 2016 theme. The issues remained the same with but those thems and th social me theme.
I will try to check the MYSQL question as I am familiar with that having done MYSQL database programming. However I have narrowed done the problem to something related to the extended profile fields component. Through trial and error and some research I surfaced the correlation which one other person seems to have referred as well. If extended profile fields are turned OFF the registration is completed and the activation email sent. If it is on the registration process is not completed. I tested this extensively turning on and off and it followed that pattern. I currently have the component turned off and users are able to register. When I turned on again I was unable to complete a registration.
It may be unrelated but no registration spam protection plugins will work now either I have tried several with recaptcha and without and in every case the registration process short circuits.
Thanks for any help in advance. I would like to get the extended field working again.
EarlDMay 30, 2016 at 7:55 pm #253909shanebp
ModeratorHave you tried using a standard theme like WP 2015?
Are you running any membership plugins or code that affects profile fields?
You may want to wipe the installation, including the database, and start over.
May 25, 2016 at 3:03 am #253739In reply to: Is BuddyPress suitable for my project?
mcpeanut
Participant@insearchofasolution Just thought I would chime in on this.
You would be able to do this but it depends on the approach you take, You could use buddypress for the social network side of things for the messaging between users etc and profile pages/groups etc whilst building a custom user interface for most of the other options you mentioned and tie them together for each user.
Its good you are clear about what you are exactly wanting to build and its all down to research, You can most definitely create separate vendor pages and account pages using custom post types and fields and creating templates for these pages etc.
If you don’t know how to do all of this you may struggle though, unless a specific plugin meets your requirements, I myself have been using an amazing suite of plugins over the past year or so that will help you do a lot of this yourself , they are brilliant for creating complex websites and layouts without having to write everything from scratch. You will have to have knowledge of html and css etc at the very least to use them efficiently though, they do come at a cost and you are looking at $300 for the complete set, these plugins are a little more advanced than other plugins to use as they are developer orientated and can be overwhelming at first if you are new to them, but if you stick with them you will start to realize the doors these plugins can open for you on wordpress and can help make your workflow loads faster and make your project come to life. do a search for TOOLSET PLUGINS by wp-types.
I hope this helps a little bit, creating a complex website as you mentioned above will take patience and time if you are new to doing it, I am in the middle of a few complex builds myself and to be honest with you I now pre-fare to use these plugins for most of my projects now as I can easily create any type of custom post with custom fields and display them via content templates without having to create the templates from scratch on each project.
The best thing about the custom fields you can create with these plugins is that you can create user specific fields and control access to everything with the access plugin, giving you full control over everything and you can create quite complex membership sites yourself.
May 24, 2016 at 7:50 pm #253729In reply to: HTML not sticking in Profile Field…
danbp
ParticipantMost of bp files are in php, so i can’t answer for YOUR php file.
I you modify the register page, where xprofile fields are showing at first, the template file i’m talking about is in bp-templates/bp-legacy/buddypress/members/register.php.
If you don’t know about template overload, read here first.
Or if you use a custom function to fire your work via an action hook, perhaps you could try to use bp-custom.php
May 22, 2016 at 4:40 pm #253639In reply to: Link To Member Profile In Form Field
danbp
ParticipantThat’s unfortunately what i expected… GF is a third party premium plugin for which nobody can help you here, except if he/she use that plugin.
If you read here, it’s somehow explained in details.
What you already used (gform_field_value_linkuser), linkuser is a GF field name. If i’m right, see the advanced tab of that field and complete the name parameter.
Here a snippet which let you see how to link a username to his profile, when you’re outside of the member_loop. It will output the current user name on the site wide activity header. For test only.
Note that it use BuddyPress default Name field and that it comes from a BP form. As you use GF, you certainly need to find how to grab properly a GF field value.
Function goes to bp-cutom, may also work in theme’s functions.php
function bpfr_my_profile_link_on_SWA_header () { $user_id = get_current_user_id(); $profile_url = bp_loggedin_user_domain(); if( !is_user_logged_in() ) { return; } echo '<br>Test userlink: '; if ( !$data = bp_get_profile_field_data( 'field=Name' ) ) : echo xprofile_get_field_data( 'Name', bp_get_member_user_id() ) .'<a href="'. $profile_url .'">'. bp_core_get_username( $user_id ).'</a><br>'; endif; } add_action( 'bp_activity_type_tabs', 'bpfr_my_profile_link_on_SWA_header' );Sorry, I can’t help you more.
May 19, 2016 at 7:03 pm #253565In reply to: Finding profile field id
navyspitfire
ParticipantThank you. However, this only returns the value. How would I return the field name/label associated with that value?
Updated block:
$this->tabs_instance->fields_data[$name] = '<dt class="bp-field-name bp-field-id-' . bp_get_the_profile_field_id() . '">'. bp_get_the_profile_field_name().'</dt>'; $this->tabs_instance->fields_data[$name] = '<dd class="bp-field-value bp-field-id-' . bp_get_the_profile_field_id() . '">'. xprofile_get_field_data( 'Eye Color', bp_displayed_user_id() ) .'</dd>';May 18, 2016 at 5:52 pm #253525In reply to: Profile field visibiltiy
danbp
ParticipantPerhaps this can help you to go further.
For point 2, maybe this snippet can do the job. Give it a try ! Add it to bp-custom.php
function custom_display_xprofile_fields() { // single field item if ( $data = bp_get_profile_field_data( 'field=Industry' ) ) : // change field name to yours echo '<div class="industry">'. xprofile_get_field_data( 'Industry', bp_displayed_user_id() ) .'</div>'; endif; } add_action( 'bp_after_profile_loop_content' , 'custom_display_xprofile_fields' );May 18, 2016 at 11:52 am #253498In reply to: Import profile fields?
sharmavishal
Participantdont think so…just export the 4 xprofile fields rows form the db via phpmyadmin and import them back
-
AuthorSearch Results