Search Results for 'hide fields'
-
AuthorSearch Results
-
May 18, 2014 at 3:29 pm #183084
In reply to: How add filter to bp_the_profile_group_field_ids?
SimpleOne
ParticipantThanks. I tried inserting your suggested code into my functions.php, but it did not hide the desire fields. Also, I looked at the references in the links you provided for me to read through. Thanks for those too. However, I’m still stuck on how to resolve my problem.
Just to be clear… I think what I specifically need to figure out is how to add a filter to bp_the_profile_group_field_ids(), which apparently creates a list of the expected field names (for the specific group tab that I’m currently on) when I click “Save Changes” button on Profile Edit page. Until I can find a way to filter out my 3 desired “required” fields during the Save Changes button press, I will continue to receive the error message: “Please make sure you fill in all required fields in this profile field group before saving“.
Is there some other type of coding I can try to insert inside functions.php to resolve this?
May 18, 2014 at 8:48 am #183075In reply to: How add filter to bp_the_profile_group_field_ids?
danbp
ParticipantHi @SimpleOne,
read from line 154 in bp-xprofile-classes.php file. It contains many information for what you want to do.
See also on Codex here and hereYou can also revert your changes back and use this kind of function (goes into theme’s functions.php or bp-custom.php):
function simple_one_hide_some_profile_fields( $retval ) { if( bp_is_profile_edit() ) { $retval['exclude_fields'] = '48'; //field ID's separated by comma } return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'simple_one_hide_some_profile_fields' );May this help ? š
May 17, 2014 at 6:01 am #183038In reply to: [Resolved] How to hide more than one profile field?
SimpleOne
ParticipantCorrection to my last post. I meant to say…
I was able to successfully hide certain profile fields from being displaying (by modifying profile-loop.php). And I was able to hide the same fields from being displayed when a user goes to edit their profile (by modifying edit.php).
NOTE: Both files are located in: /bp-templates/bp-legacy/buddypress/members/single/
I still need help figuring out how to avoid the above-mentioned “required fields” error message upon clicking the Save Changes button.
May 17, 2014 at 1:22 am #183032In reply to: [Resolved] How to hide more than one profile field?
SimpleOne
ParticipantOops… I just found a problem.
The good news is that I was able to successfully hide certain profile fields from being displaying (by modifying profile.php). That part works great. Also, I was able to hide the same fields from being displayed when a user goes to edit their profile.
However, the problem I just discovered is that if any of those fields that I’ve hidden (using the above code changes) are “required” fields, then when a user goes to the Edit Profile page, the following error message appears upon clicking the Save Changes button: “Please make sure you fill in all required fields in this profile field group before saving.”
Even though I’m certain those hidden fields have values in them, that error message appears and there’s no way to save changes.
Any solution to this?
April 12, 2014 at 3:33 pm #181170In reply to: Buddypress x-profile visibility doesn't work
serks
ParticipantHi have a very similar issue and I think it may be related to the same cause.
I have set up a xprofile group where I have a bunch of different radio fields like so…
About You Widget
Show | HideDisplay Avatar On Profile
Show | HideSubscribed Member Badge
Show | Hideetc.
I have put code all around my website to show or hide things according to a users settings and it all works as it should BUT, the only problem is that the settings don’t take effect until a user goes to edit the particular profile group and clicks the ‘Save Changes’ button.
Even though the defaults are set as they should be initially, they do not actually work until the user saves them.
Any help on this issue would be much appreciated.
Thanks
March 13, 2014 at 10:42 pm #179742In reply to: BP Profile Search – don't show members directory
Sowulo
ParticipantProposed solution solves the issue partly. Delete
div class=āitem-list-tabsā role=ānavigationāin your-theme/members/index.php lead to reflection of request which works right. But if you clear filter fields or refresh the page then the full list of members is appear.Appreciate if somebody can help to fix the issues above and hide the full list reflecting only results by search.
Thank you in advance,
AntonJanuary 3, 2014 at 1:21 pm #176347In reply to: Hide Some Fields from Registration page
Hugo Ashmore
ParticipantYou’re not attempting to hide anything, if you have created xprofile field groups other than the default ‘Base’ then anything in those groups for user profile input will not show on the standard BP registration form only on the users account profile screen. If you are following that principle and those fields are showing on the main registration form then something is going wrong and likely you have third party plugins at work?
December 19, 2013 at 2:04 pm #175772In reply to: Error: Missing argument 2 for wpdb::prepare
Shmoo
ParticipantIt’s my theme and I code WordPress themes for like 5 years now but I don’t see myself as a Developer it’s more a hobby š
I’m solid at HTML-CSS and can read PHP when I see it happen but I can’t write PHP it out of the box.
This error shows up when I try to hide a complete xProfile-group-ID or just an unique xProfile-field-ID from the loop.
This is what I did.
Inside: my-theme/buddypress/members/single/profile/profile-loop.php
I found the start of the loop<?php if ( bp_has_profile() ) : ?> ....My first thought was, maybe there are default options here to control the output of which ID’s will be visible so I started the search how the bp_has_profile() was build and looked into plugins/buddypress/bp-xprofile/bp-xprofile-template.php and found this at line 150:
.... $defaults = array( 'user_id' => bp_displayed_user_id(), 'profile_group_id' => false, 'hide_empty_groups' => true, 'hide_empty_fields' => $hide_empty_fields_default, 'fetch_fields' => true, 'fetch_field_data' => true, 'fetch_visibility_level' => $fetch_visibility_level_default, 'exclude_groups' => false, // Comma-separated list of profile field group IDs to exclude 'exclude_fields' => false // Comma-separated list of profile field IDs to exclude );This looks very familiar to bbPress so my first thoughts was lets try to add one of those Array’s to the loop and overwrite the default value.
Just like this.<?php if ( bp_has_profile( array ( 'exclude_groups' => 1 ) ) ) : ?> ...This works perfect, it hides all xProfile-fields from the first Base primary Tab (back-end). Just like I wanted it because I didn’t want all the fields to show up front-end, I’ve got a few xProfile-fields that I use for user-customization of the profile-page. Each user can add color-codes to change the default menu-color and add background-images to their profile-page to make each profile a little more unique.
Those field-ID’s are just urls or color-codes and don’t have to be visable to the public, thats why I try to hide them front-end.
November 20, 2013 at 4:41 am #174519In reply to: 2.0 top features – ideas
Martyn_
Participant* Better options for users to self delete
Expanding. Without backend access, it would be nice for a site allow a user to delete in several ways. Purge all their profile fields and networks (‘destroy all personal data’), Retain their profile fields and networks whilst making it look like they have vanished (‘hide’ if you like), Delete Uterly.
* Multiple networks. We have friends, and with plugins one sided friendships (aka followers). sometimes its useful to have different types of relationships identified – “close friends” or “have done business with” or “merely online buddies”. It would be nice for an admin to be able to define additional types of friendships either independently, or by associating a scale (an integer valued friendship, 1=I want to see your feed stuff 2=online mates 3=actual real life chums 4=we’re married).
October 27, 2013 at 2:27 pm #173441In reply to: Display user's social follow buttons in profile
jaxdestroyer
ParticipantThe only way I know how to hide it currently is through css. BP will give your sub group a class name based on what you sub group is called. For example, my sub group is About Me. The class name is about-me.
To make sure you are getting the right class name I suggest you use Firefox firebug or chromes built in element inspector. You should also see another class name of bg-widget when using either tool.
To make the css specific for that particular snippet all you need to do in your Themes or BuddyPress child themes style.css
.bp-widget.about-me{ display: none; }This will hide the whole sub group when someone is viewing the profile. It makes sure it has both class names before making it no longer display so the user can still see it when editing their profile.
If you want to only get rid of specific rows that contain this information then BP still has you covered. They also make a class based on your input field name. Using Facebook as an example again the class is field_facebook. To be as specific as possible without going too overboard in your Themes or BuddyPress child themes style.css put in
table.profile-fields tr.field_facebook{ display:none; }This will only get rid of the one row, however, there is a caveat. If you alternate colors between rows it will still count the hidden field. I suggest that if you are going to use this make sure that the fields are at the bottom of the group so they no longer break flowof alternating colors.
If you want to do multiple fields just seperate them via a comma as shown below
table.profile-fields tr.field_facebook, table.profile-fields tr.field_twiitter{ display:none; }October 27, 2013 at 11:29 am #173437In reply to: Display user's social follow buttons in profile
noizeburger
ParticipantNow, that your code makes it possible to show icons in my profile header, is there a way to hide the profile group that helds my input fields? Main reason is, that my youtube and twitter links won’t show in the fieldgroup as a result of the use of a snippet to use oembed-code in my profiles.
September 30, 2013 at 2:55 pm #172035In reply to: Function to update databse fields
martinbeaulne
ParticipantIf i hide the bottom tabs and the admin bar, each user can’t modify their profile.
September 12, 2013 at 6:17 pm #171233Ben Hansen
Participantyou can’t really hid the entire profile out of the box but you can hide most of the fields and info by setting the default visibility in the profile field setup screens.
July 9, 2013 at 5:17 am #167792In reply to: How Do I Hide Extended Profile Fileds from Users
nobodymove
Participant@bphelp. I think I have discovered the culprit to this little mystery.. I have been using the Buddypress Members Import plugin: http://www.youngtechleads.com/buddypress-members-import/
For some reason when I import my database, the plugin does not seem to process the xProfile Field visibility settings properly.. The profile fields are still listed as “Admins Only” But for some reason they are still visible to all users.
Earlier, I manually added some new test profile fields and they worked fine. I also discovered, that if I edit, and re-save a user’s profile field after import, all profile fields for that user will then revert to the proper visibility settings.
I have contacted the plugin author to make him aware of the issue, hopefully he can fix it. If you have any suggestions that might be a quick fix for this I’m all ears! š
July 8, 2013 at 8:57 pm #167767In reply to: How Do I Hide Extended Profile Fileds from Users
nobodymove
Participant@bphelp. Upon a little further research, I wanted to note that I created a new User Profile Group, created a private field seen by Admins Only in that group, and the settings seem to be working fine in that group. In my Base (Primary) group though, all profile fields still remain visible to all users. Does the Base (Primary) group automatically force all fields visibility public by default? If so, is there way to override?
If there is no way to change the visibility in the Base (Primary), I suppose I can just put private info in the other Profile Group, but I’m curious if or how that may effect my database import..
July 3, 2013 at 5:30 am #167443In reply to: How Do I Hide Extended Profile Fileds from Users
nobodymove
ParticipantThanks @bphelp. Info listed below:
1. Which version of WordPress are you running?
3.5.2
2. Did you install WordPress as a directory or subdomain install?
Directory
3. If a directory install, is it in root or in a subdirectory?
root
4. Did you upgrade from a previous version of WordPress? If so, from which version?
3.5
5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.
Wordpress seems to be working fine
6. Which version of BP are you running?
1.7.2
7. Did you upgraded from a previous version of BP? If so, from which version?
1.7
8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
Yes, a lot. š
Allow Multiple Accounts
amr users + buddypress
buddypress group email subscription
buddypress member import
buddypress message attachement
Buddypress Toolbar
Buddypress Xprofile custom fields type
comprehensive google map
contact form manager
events manager pro
easy table
form lightbox
GRAND Flash Album Gallery
Lightbox Galleries EWSEL
Mass Messaging in Buddypress
Online Backup for WordPress
Peter’s Login Redirect
SHortcode Widget
User Switching
WP Full Calendar
WP Wunderground9. Are you using the standard BuddyPress themes or customized themes?
I’m using Razor 1.1.3 from Themeforest/Parallelus
10. Have you modified the core files in any way?
No
11. Do you have any custom functions in bp-custom.php?
No
12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
13. Please provide a list of any errors in your serverās log files.
14. Which company provides your hosting?
Network Solutions
15. Is your server running Windows, or if Linux; Apache, nginx or something else?
VPS hosting package
June 19, 2013 at 6:17 pm #166414In reply to: Replace BuddyPress profile with custom profile
modemlooper
ModeratorYou can hide fields from being edited easy. in members/single/edit.php you can exclude fields by ID. Use comma separated list.
if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() . '&exclude_fields=2,3,4' ) ) :full code example https://gist.github.com/modemlooper/5816548
June 14, 2013 at 9:50 am #166035In reply to: Dynamic profile fields
Henry
MemberLoving the second approach! although not as clean as the first approach, it’ll be much easier to do. jQuery show, hide and toggle could all be used to get the desired effect! i’m going to have a crack at it this weekend…
June 14, 2013 at 8:52 am #166029In reply to: Dynamic profile fields
Hugo Ashmore
Participant@4ella one bump is sufficient!
@henrywright-1I think this is going to have attendant issues difficult to deal with. Gravity forms allows for forms with repeater fields and you can then tie submissions into existing functionality but profile fields are going to be hard to deal with, if they aren’t created. The repeater fields are created via JS on submission you have to tie it in to creating new profile field label etc then if you can do that you create those extra for all users.
What may be a better approach is to add in advance all the fields you may need then on front end hide them with JS and allow user to show them as and when needed, public profile would be set to ignore any empty fields & labels.
June 9, 2013 at 3:14 am #165641In reply to: [Resolved] Show empty fields in profile
junithorn
ParticipantJust an FYI to anyone curious, here is the solution:
<?php do_action( 'bp_before_profile_loop_content' ); ?> <?php if ( bp_has_profile('hide_empty_fields=0') ) : ?> <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <?php if ( bp_profile_group_has_fields() ) : ?> <?php do_action( 'bp_before_profile_field_content' ); ?> <div class="bp-widget <?php bp_the_profile_group_slug(); ?>"> <h4><?php bp_the_profile_group_name(); ?></h4> <table class="profile-fields"> <?php while ( bp_profile_fields() ) : bp_the_profile_field('hide_empty_fields=0'); ?> <?php if ( bp_field_has_data() ) : ?> <tr<?php bp_field_css_class(); ?>> <td class="label"><?php bp_the_profile_field_name(); ?></td> <td class="data"><?php bp_the_profile_field_value(); ?></td> </tr> <?php elseif ( !bp_field_has_data() ) : ?> <tr<?php bp_field_css_class(); ?>> <td class="label"><?php bp_the_profile_field_name(); ?></td> <td class="data"><?php bp_the_profile_field_value(); ?></td> </tr> <?php endif; ?> <?php do_action( 'bp_profile_field_item' ); ?> <?php endwhile; ?> </table> </div> <?php do_action( 'bp_after_profile_field_content' ); ?> <?php endif; ?> <?php endwhile; ?> <?php do_action( 'bp_profile_field_buttons' ); ?> <?php endif; ?> <?php do_action( 'bp_after_profile_loop_content' ); ?>May 3, 2013 at 12:06 pm #163334In reply to: Possible bug – last_activity missing
rypo73
ParticipantOK – you’re onto something… And it seems your initial hunch of PBCK was spot on – feeling foolish, but enlightened now!
SO… I had some code in my custom-functions.php file to ‘hide’ the site admin activity (see below). Because we have several users with ‘Administrator’ roles, it seems this particular user was affected. Others MAY have been if they had logged in more often…
Seems this code was not the best to use:
// Donāt record activity by the site admins or show them as recently active
function my_admin_stealth_mode(){
if ( is_site_admin() ) {
global $bp;
remove_action(‘wp_head’,’bp_core_record_activity’);
delete_user_meta($bp->loggedin_user->id, ‘last_activity’);
}
}
add_action(‘init’,’my_admin_stealth_mode’);SO I’ve removed it in favour of THIS version, specifically masking the activity of INDIVIDUAL users with ‘Administrator’ roles, like our site admin user.
// Donāt record activity for a user or show them as recently active
function my_user_stealth_mode(){
$current_user = wp_get_current_user();
if(is_user_logged_in()) {
if(‘YourUsername’ == $current_user->user_login) {
remove_action(‘wp_head’,’bp_core_record_activity’);
delete_user_meta($current_user->ID, ‘last_activity’);
}
}
}
add_action(‘init’,’my_user_stealth_mode’);Hope it might be of use to others in future. Thanks for responding to my post. I’m now a LOT more familiar with meta data fields as a result.
p.s. you’re right about # plugins, we do need a lot, but not ALL of those. It’s our dev environment after all. Often a case of playing with different ones to see what fits the bill.
November 26, 2012 at 5:21 pm #145683Ben Hansen
Participantstreams are not related to profile fields. stream is created by site activity. i don’t think theres a decent way to hide that other then for admin users using a plugin or by modifying code stuff.
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 26, 2012 at 3:36 am #143993In reply to: Could I Handle Registration This Way?
Toby Cryns (@themightymo)
ParticipantSure. You could just make all the fields optional and then hide them via CSS on your registration page.
October 16, 2012 at 6:17 am #143525In reply to: URGENT!!! PLS HELP -> Add new users from admin
benzine
ParticipantI’m in despair for such a solution right now. So, I think it’s better to have all custom fields mandatory while members can decide whether to hide or show them in public such that they can edit any fields later if they want to. Also, re-register from front end all manually created profiles from dashboard. This is the most plausible solution to me at this time.
Thanks for your time.
-
AuthorSearch Results