Search Results for 'profile fields'
-
AuthorSearch Results
-
November 23, 2012 at 2:56 am #145534
In reply to: How to make Profile fields visible only to admins?
scorbic
ParticipantFurther, just had a quick look at the db, seems visibility levels are saved in the wp_usermeta field bp_xprofile_visibility_levels. Buddypress reads this field and enforces the policy there, so even though you have changed the site wide policy it still enforces the per user settings (if that makes any sense). What you need to do is update each users policies each time the site wide is changed. The plugin was only ever supposed to be an example on how to do it so I don’t think it is robust enough for a live server.
November 23, 2012 at 2:42 am #145533In reply to: How to make Profile fields visible only to admins?
scorbic
ParticipantI just installed this plugin and it does work but it seems that previous policies are remembered so even if you change the site wise privacy policy on a field to “Admin Only” each registered user still has it’s old setting. If you set the field so that the user can change their policy then log in as that user and change it to “Admin only” the policy is correctly enforced. I haven’t had time to delve into the db and see where the setting is saved but I suspect that when the site wise policy on a field is set to be enforced each individual user has to be changed at the same time.
November 22, 2012 at 10:45 pm #145531In reply to: How to make Profile fields visible only to admins?
robotnjik
Participant@modemlooper Well, that’s plugin/solution I used but now is not working. As you can see, last time was updated 8 months ago. Probably is not anymore compatible with latest versions of BP.
November 22, 2012 at 4:26 pm #145512In reply to: How to make Profile fields visible only to admins?
modemlooper
ModeratorYou can choose the my friends option to at least block all fields to a users friends. You can also look over @boone code to add your own visibility options. https://github.com/boonebgorges/bbg-custom-bp-field-visibility
November 22, 2012 at 3:01 pm #145507Haime Croeze
ParticipantSolved: this is the final version I got on superslider (and added a css class “third” where I removed the max width)
`
Registreer
<form action="/registreer” name=”signup_form” id=”signup_form” class=”standard-form” method=”post” enctype=”multipart/form-data”>
<input type="text" name="signup_username" id="signup_username" value="” />
<input type="text" name="signup_email" id="signup_email" value="” />
<label for="”>
<input type="text" name="” id=”” value=”” />
<label for="”>
<textarea rows="5" cols="40" name="” id=””>
<label for="”>
<select name="” id=””>
<label for="”>
<select name="” id=”” multiple=”multiple”>
<a class="clear-value" href="javascript:clear( '’ );”>
<label for="_day”><select name="_day” id=”_day”>
<select name="_month” id=”_month”>
<select name="_year” id=”_year”>
<p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-“>
<?php printf( __( 'This field can be seen by: %s‘, ‘buddypress’ ), bp_get_the_profile_field_visibility_level_label() ) ?> Change<div class="field-visibility-settings" id="field-visibility-settings-“>
<p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-“>
<?php printf( __( 'This field can be seen by: %s‘, ‘buddypress’ ), bp_get_the_profile_field_visibility_level_label() ) ?><input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="” />
<input type="submit" name="signup_submit" id="signup_submit" value="” />`
November 22, 2012 at 2:48 pm #145506Brajesh Singh
ParticipantIf the xprofile fields(custom profile fields) are not appearing, you may want to modify this in your code
``
to
``
That should make them appear.
November 22, 2012 at 9:52 am #145490In reply to: How to make Profile fields visible only to admins?
robotnjik
ParticipantThen, those are great news!
My site is still under construction and I was surprised when all hidden data suddenly went visible. That will be really bad for whole community. I think it’s better to rely on this future feature of BP and wait. Many thanks for this info. Anyway, I’ll inform plugin author about updating or fixing plugin.November 22, 2012 at 9:06 am #145485In reply to: How to make Profile fields visible only to admins?
Paul Wong-Gibbs
KeymasterIf a plugin doesn’t work, you need to contact its author for support. You’ll be glad to learn we’ve added this into the 1.7 version of BuddyPress (which is still in development) so it will help in future.
November 22, 2012 at 9:00 am #145484In reply to: How to make Profile fields visible only to admins?
robotnjik
Participant@modemlooper Yes, there are options:
Anyone
Logged In Users
My Friendsand enforce one of those values. The problem is, I need some fields to be visible only to admin or hidden from other members.
Example:
First Name (visible to anyone)
Last Name (visible to anyone)
Birth date (let’s user decide who will see this field)
Passport No (visible only to admin, cause it’s sensitive data)In plugin I mentioned above, that worked. Now, when I install that plugin, “only admins” option appears but doesn’t work and I’m looking for alternative.
November 22, 2012 at 1:20 am #145479Toby Cryns (@themightymo)
ParticipantYou could use jQuery to check the value of the drop-down.
Otherwise, you will need to hook into BuddyPress’ validation hook. Perhaps this link will get you pointed in the right direction:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/buddypress-validate-required-registration-field-but-not-with-bp-profile-setup/November 21, 2012 at 9:56 pm #145467In reply to: How to make Profile fields visible only to admins?
modemlooper
ModeratorGo into the wp-admin Users > Profile fields and change the visibility options to profiles fields
November 20, 2012 at 2:21 am #145368windows84u
ParticipantThanks.. I managed to show custom field on user profile.
Now i want to show custom fields on members directory page..
Which file i have to edit?
Thanks..November 18, 2012 at 1:41 am #145230Toby Cryns (@themightymo)
ParticipantYou will need to edit your theme to pull this off.
Try googling the following: “display xprofile fields on member page buddypress”
November 17, 2012 at 1:55 am #145184In reply to: Making the use of a Username more clear
modemlooper
ModeratorYou can remove the name field by going to the wp admin Users > profile fields.
Anything in the base/first section is required at sign up.
November 14, 2012 at 2:13 am #144962Toby Cryns (@themightymo)
ParticipantThis sounds like a basic jQuery+WordPress question and not necessarily a BuddyPress-specific question. You will need to do a couple of things to pull this off:
1) Enqueue jQuery
2) Write/copy-and-paste a jQuery script that limits the number of characters in a specific field. Then enqueue that scriptStart here (https://codex.wordpress.org/Function_Reference/wp_enqueue_script) and know that there will be a bit of a learning curve!
November 7, 2012 at 11:07 am #144653Stefan
ParticipantSo no one has used the xProfile fields with Woopra stats?
November 5, 2012 at 3:39 am #144528Ronnie_Fantastic
ParticipantHi @mercime
So close now…
Take a look at: http://www.liveanddangerous.co.uk/wptest/members/testy/profile/
I’d like the background colour for the navigation menus and the profile fields to be either black, or better still, transparent.
Is this possible? I’ve looked over the style sheet etc, but can’t find the function for this. If I view the source code for the page above, I can see the instruction for the background to be ‘rgb(254, 254, 254)’, but… can’t find that instruction anywhere in the css.
If I can fix that, then… I believe… we’re done.
Thanks,
Ronnie.
November 5, 2012 at 1:54 am #144523@mercime
Participant== In my profile page (http://www.luchotv.com/miembros/Luciano/profile/) it says “Base Name” with just my name as information, it looks like a group even though groups were disabled. ==
No, this is not part of a Group/Group Forums at all. /Luciano/profile/edit/group/1/ refers to the first group of Profile Fields. As you can create more profile fields based on your community, you can also create more than one group of Profile Fields to organize profile information – https://codex.buddypress.org/getting-started/configure-buddypress-components/#users-profile-fields
– Note that all the fields you add in the first group of Profile Fields will also show up in the Registration Form if you have that enabled. Those in the 2nd group or so will only show up in e.g. /Luciano/profile/edit/group/2/ and /Luciano/profile/edit/group/3/ if you have more than one or two groups of Profile Fields.November 4, 2012 at 11:48 pm #144516@mercime
Participant@ronnie_fantastic Looking good.
1. Missing BuddyPress styles: Go to Appearance > BP Compatibility. and uncheck “Disable BP Template Pack CSS”
– you need the BP template pack CSS to properly align the BuddyPress sections.2. Enable registration: Go to Settings > General and look for the line where you allow registration (it’s off by default)
3. “It has what looks like a 2 cell table with ‘Base’ written above it and the name/username within”
– This is the Profile page and it shows profile fields. BP Codex is your friend https://codex.buddypress.org/getting-started/configure-buddypress-components/November 1, 2012 at 11:35 am #144370parakeet
ParticipantHas this changed at all since you last posted?
I had the same question and got here.
I am new to BuddyPress. It seems ridiculous that a site admin couldn’t alter profile details of a user on his site.
In my case, I want to pre-populate a site with an set of guaranteed users whose info I want to enter for them.
Surely, if BuddyPress was just a part of WordPress alongside it, all BuddyPress user profile info should be accessible and editable under WordPress user profile admin, not just the core WordPress fields?October 31, 2012 at 5:03 pm #144322In reply to: Need original WordPress Registration page back
David Cavins
KeymasterI think a better bet is to collect that info on the BP registration page and then not display it on the user profile (that way you’ll still be able to use it in other ways). With BP 1.6. you can change the visibility of each xprofile field to friends only, logged-in users, or public (and force that level or allow the user to override your selection). (Visible to admin only is coming in BP 1.7, btw, which would totally fix you up.) At the moment, you can modify your theme template file (themes/yourtheme/members/single/profile/profile-loop.php) to hide some fields like this:
`about line 17:<?php $no_display_fields = array( // Enter the field name of any field that you don't want to appear on the user profile.
‘E-mail’,
‘Name of Field Hide’,
‘Another’
);if ( bp_field_has_data() && !in_array( bp_get_the_profile_field_name(), $no_display_fields ) ) : ?>`
It’s a hack, but it works for me (until BP 1.7).
October 31, 2012 at 12:30 am #144273In reply to: Custom profile fields issue
modemlooper
ModeratorFields are hidden on a profile until a user edits their profile and adds something to that field.
October 26, 2012 at 2:32 pm #144024evagorasc
ParticipantSure thing @modemlooper. The code below will look for all the custom fields that a user has filled in, compare them to what should be visible for the currently logged-in user and then loop and display the forum reply user’s data. Instead of simply looping the default titles and data of the xprofile fields, I do a custom switch/case so that I can format each field individually for more control.
`
$user_strAllFields = get_user_meta( bbp_get_reply_author_id(), bp_get_user_meta_key( ‘bp_xprofile_visibility_levels’ ), true );
// get all the completed user fields for this poster
if( $user_strAllFields != null ) :
$user_arrAllFields = array_keys( $user_strAllFields );
else :
$user_arrAllFields = array();
endif;
// get all the fields that should not be displayed for this poster
$user_arrHiddenFields = bp_xprofile_get_hidden_fields_for_user( bbp_get_reply_author_id() );// loop through all the poster filled-in fields
foreach( $user_arrAllFields as $field ) :
// exclude the ones that should not be displayed
if( !in_array( $field, $user_arrHiddenFields ) ) :
// turn the ID of a field into its object
$obj_field = xprofile_get_field( $field, bbp_get_reply_author_id() ) ;// depending on the field name, customize the display
switch( $obj_field->name ) :case ‘Location’ :
$user_location = xprofile_get_field_data( ‘Location’, bbp_get_reply_author_id() ) ;
if (strlen($user_location) > 0 ) :
echo ‘Location: ‘ . $user_location . ‘
‘;
endif;
break;endswitch;
endif; // !in_array( $field, $user_arrHiddenFields ) )
endforeach; //( $user_arrAllFields as $field )
`October 26, 2012 at 6:05 am #143998modemlooper
ModeratorCan you can post a code snippet so others that search can find info on this?
October 26, 2012 at 5:17 am #143996evagorasc
Participant@modemlooper thanks! I used a combination of your tips and info I found here https://bpdevel.wordpress.com/2012/03/16/profile-field-visibility-in-bp-1-6/ to make this work for me. I now have any custom field in Buddypress show up in my forums loop and it shows up conditionally as well for the appropriate users only.
-
AuthorSearch Results