Search Results for 'hide fields'
-
AuthorSearch Results
-
February 13, 2012 at 10:02 pm #129738
In reply to: Can user profiles be public?
Hugo Ashmore
ParticipantProfiles are by default public, you can also extend them by creating your own custom xprofile fields, these and any profile fields can be further modified if wished to show or hide some based on whether the displayed user is also the logged in user.
January 27, 2012 at 9:37 am #128706In reply to: Interactive Profile Fields During Registration
Marcella
ParticipantHey @davidveldt this should do it if you are using the default theme. Otherwise you should integrate as you see fit.
theme/registration/register.php
You can add any groups or fields as you require. The groups and fields here are arbitrary.
` ‘player’, 4 => ‘coach’, 5 =>’parent’, 6 => ‘instructor’); ?>
$role) : ?>
<div id="” class=”role-fields”><label for="”>
<textarea rows="5" cols="40" name="” id=””>
<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="” />
`
Create some profile groups to cater for each role. You can find the group id within the BuddyPress admin… In the url bar or investigate your database.
You should set-up the $roles array above to match your requirements.
Within the loop you can show any fields you have created within that xprofile group. If you have a select box within that group you would add the following code as outlined in the bp-default register.php
`
<label for="”>
<select name="” id=””>
`
Finally add the following jQuery where you house any other code of similar ilk.
`
jQuery(“.role-fields”).hide();
$roles = jQuery(“#roles”);
jQuery(“#field_2”).change(function()
{
$role = jQuery(this).val().toLowerCase();
jQuery(“.role-fields”).hide();
jQuery(“#” + $role).toggle();
});
`Here’s a pastebin for all that above. http://pastebin.com/QFdTdstz
No need for tabs or accordion this time.
Hope that helps you on the Road.
January 26, 2012 at 2:27 pm #128632In reply to: Interactive Profile Fields During Registration
Marcella
ParticipantJust an example here, running with Paul Gibbs start point.
Create xprofile fields as normal.
Each career group would also have its own xprofile group.
Player would have his / her own set of fields.
Coach would have his / her own set of fields.
Parent would have his / her own set of fields.
Instructor would have his / her own set of fields.None of the above would be required fields. (as far as BuddyPress is concerned (unless you roll some PHP codes))
You’d have another xprofile group specifically for required fields (this would be your first group).
You would make the “type” part of the required group and set it as a select box.
You could then write your registration form mark-up matching the requirements of jQuery tabs or jQuery accordion.
The “type” would be the last item on the required fields. Once that was selected you could then show or hide the corresponding jQuery ui-tab-panel that holds those form fields.
You could then on-the-fly make those fields then required using some jQuery also but a bit hacky.
January 26, 2012 at 11:59 am #128623In reply to: Interactive Profile Fields During Registration
David Veldt
ParticipantHmmm good point. Definitely worth checking out, however I still run into figuring out how to show/hide info depending on what they select from the drop-down. Not sure how to go about this…
December 12, 2011 at 7:08 am #126155In reply to: remove xprofile ”name” from registration form?
freque.unce
ParticipantI changed register.php to display profile group 3 (optional profile fields I added via dash) instead of 1, to hide the required displayname option on signup, which forces it to clone username data by default. I then removed the ability to change names in xprofiles’ edit.php (with if/else, statements on textbox & submit button for profile group 1).
Those 2 steps take care of all future occurances, so I then went in and changed all of my existing users’ display names to match their usernames, manually, via the dashboard.
Problem solved. More of a substitute than a removal, but it works for me. Hopefully someone will find this useful.
November 27, 2011 at 7:41 pm #125090modemlooper
ModeratorJust read you don’t want to edit home.php. There isn’t a filter for privacy like there is with messages for showing profile sections. Messages and xprofile fields has logic for output and can be filtered but the actual page needs a code edit.
August 10, 2011 at 4:34 am #118111In reply to: Profile rating system
embergermedia
Member@christophg Sorry for the delay in getting the registration/profile idea to you. Here is what I do:
I use S2member to keep my customers and brands separate. I then created a new profile group called “Company Profile”. I made this the last profile group. I then added the following code to the file:
members/single/profile/edit.php`
<?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVELul.menu li:last-child{display:none;}
.company-profile{display:none;}`
The above code hides the profile group on the edit menu from users below level 2, my brand level. And it also hides the profile group edit fields from anyone below level two. In case the menu item shows for some reason. And, unfortunately, this will not hide the menu item from users in IE 8 and below. But it WILL hide the profile group from them.
I tried using jquery to affect last-child in IE. Although I can get the jq to work on a test page on IE, it won’t work on the menu item… not sure why.
Next, my brands all belong to a private group, and I use a group conditional script to show the brands profile info front and center on their profile page with custom styling. This allows the brand members only to have a slick looking page that is different from regular consumer pages.
`
`
Let me know if you need anything else. Or if something doesn’t make sense.
July 8, 2011 at 8:50 pm #116012In reply to: Is it possible to make some profile fields private?
danbpfr
ParticipantMaybe this can help ?
https://buddypress.org/community/groups/creating-extending/forum/topic/hide-profile-field/
https://buddypress.org/community/groups/bp-profile-privacy/
http://bp-tricks.com/snippets/displaying-certain-profile-fields-on-your-members-profile-page/also remember that privacy controls don’t apply to Admin. Admin can see everything. Log in as a regular user and then test.
July 6, 2011 at 7:59 pm #115874In reply to: Profile fields for specific user roles
embergermedia
MemberI use S2member to monitor my sites membership, it provides hooks and such (not too sure about the terminology) that allow you to display content to certain user roles. I have a user role for companies (experts). I also have a profile field group just for them. It is the last group.
I have added inline css using last-child selector to hide the menu option to edit this profile group from everyone except members that have a level 2 membership. And since Buddypress will only show profile data if the field has been filled in, it only shows on Experts (level 2 ) users public profiles.
If this is confusing, let me know and I’ll try to give exact steps for how I accomplished this.
April 14, 2011 at 10:49 pm #110277In reply to: How to hide "Base" group in the edit profile panel?
sdpkelkar
MemberHi.
Thanks for the code Brajesh! I just had one question. I’ve defined different profile field groups for different user types. I want to restrict the visibility of these filed groups to only those users (e.g. users of type A get to see only those profile fields for user type A). My problem is that when I use your code<?php global $bp;
if(bp_get_current_profile_group_id()==1)
bp_core_redirect($bp->displayed_user->domain.”profile/edit/group/2″);
?>it shows the same profile fields for all user types. I guessed it was because 1 is the base profile group ID and tried changing the if loop to
if(bp_get_current_profile_group_id()==ID number of group)
bp_core_redirect($bp->displayed_user->domain.”profile/edit/group/ID number of group”);but now it shows me only the ‘Editing base profile’ screen
Is this code correct?
Cheers
April 8, 2011 at 11:16 pm #109848In reply to: How to hide some profile fields from public
tiger625
MemberNot sure. I just downloaded and it worked. I did notice when I was in a member profile and looked at my public profile tab the fields showed up. When not logged in or logged in as another user, the fields were not visible. I am also using Role Manager plugin, not sure if that makes any difference.
February 10, 2011 at 2:15 pm #105081In reply to: How to hide some profile fields from public
Philipp
Participant@aljuk Another 6 hours of work and sill no solution. I tried exactly what you said. And I also tried it on my development installation – There it’s working like a charm. I don’t have an idear what to do… ;(
I use the latest versions of bp and wp. On my testdrive I use the same plugins. I also checked another theme.
All this work just to hide ONE profile field.
Do you have another idear?
Thanks a lot!
Philipp
February 7, 2011 at 8:24 pm #104856In reply to: How to hide some profile fields from public
aljuk
MemberHmm, that’s strange. It’s working for me exactly as advertised.
What’s the history of your theme? Is it default, child, custom etc?Maybe cookies…
In the Admin, set “let user decide” for some fields.
Log out.
Clear your cookies, make sure to delete all cookies from the domain, and from any test domains, and any local domains (eg. mamp wamp etc. if you’re using that) that you’re developing the site on.
Log in as a subscriber level user.
What result now?February 7, 2011 at 7:06 pm #104844In reply to: How to hide some profile fields from public
Philipp
Participant@aljuk Thanks a lot for you answer. But I also tried that and I logged out as admin and signed in as a normal user. Still the same.
Another idear?Thanks a lot for the link. I’ll take a look to it!

All the best!
February 7, 2011 at 6:00 pm #104829In reply to: How to hide some profile fields from public
aljuk
Member“If I activate it and set a field (e.g. birthdate) to “users only” – nothing happens. There are also no settings for the users in the frontend of buddypress.”
If you set it to “users only” in Admin, you’re not giving your user the choice, and that’s why there is no selector in the front end. The user will only get the selector if you choose “let user decide”.
February 7, 2011 at 5:57 pm #104828In reply to: How to hide some profile fields from public
aljuk
Member@philippmuenchen – it works fine. I’m guessing you’re trying to test it while you’re logged in as Admin? The privacy controls don’t apply to Admin. Admin can see everything. Log in as a regular user and then test.
Age calculation: http://code.hyperspatial.com/all-code/buddypress-code/buddypress-age/
@noizeburger – it works for all fieldgroups, not just Base.
February 7, 2011 at 5:26 pm #104824In reply to: How to hide some profile fields from public
Philipp
ParticipantHi and sorry for the second post. But I’m trying to find out since one week why the BP Profile Privacy PlugIn isn’t working for me.
If I activate it and set a field (e.g. birthdate) to “users only” – nothing happens. There are also no settings for the users in the frontend of buddypress. So there’s something wrong? Any idear what to try to fix it?I’m looking forward – Hopefully for an answer!

Philipp
February 1, 2011 at 9:17 am #104370In reply to: How to hide some profile fields from public
Philipp
ParticipantIt is in the fieldgroup “ID1”.
February 1, 2011 at 6:51 am #104358In reply to: How to hide some profile fields from public
noizeburger
ParticipantBP Profile Privacy only works for fields in the fieldgroup “Base” (ID 1). In which group did you place the birthday field?
February 1, 2011 at 12:14 am #104335In reply to: How to hide some profile fields from public
Philipp
ParticipantI activated it and made my settings but nothing happens. E.g. I said “Birthday” just for “User” but it’s still visible. There are also no settings in the frontend if I use “Let user decide”.
I already deleted all fields with “bp_profile_privacy” in the database and activated the plugin again. But it’s still the same… No idear!?Thanks a lot!
January 31, 2011 at 11:50 pm #104333In reply to: How to hide some profile fields from public
modemlooper
ModeratorI just tried that plugin and it seems to be working. What didn’t work for you?
January 31, 2011 at 8:17 pm #104323In reply to: How to hide some profile fields from public
Philipp
ParticipantI just tried BP Profile Privacy. It’s not working with the latest BP release, isn’t it!?

So maybe another idear?January 31, 2011 at 6:38 pm #104308In reply to: How to hide some profile fields from public
Philipp
ParticipantThanks for the answers. But I just want to hide one of the profile fields from public….
But you could also help me, if you tell me this:Is it possible to convert a date (e.g. Birthday 12.07.1987) to an “age” “23”?! That would solve the Problem also.
I just don’t want that anyone is able to see the birthdate of my users…Thanks a lot and all the best!
January 31, 2011 at 12:26 pm #104290In reply to: How to hide some profile fields from public
Dave Wright
ParticipantThere is a plugin called profile privacy that may do what you want
January 31, 2011 at 10:36 am #104287In reply to: How to hide some profile fields from public
Hugo Ashmore
ParticipantUse the conditional function `is_user_logged_in()` in an ‘if’ conditional before the field in question.
-
AuthorSearch Results