Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'hide xprofile fields'

Viewing 25 results - 101 through 125 (of 129 total)
  • Author
    Search Results
  • jivany
    Participant

    No worries. The code I gave should display everything except group 3 & 4. Sorry, I think I said it backwards in the previous post.

    That said, even without the code, I’m only getting group 1 showing up on the registration page so I’m not really sure what’s going on in register.php now. ;)

    Gene53
    Participant

    Darn, you’re right, I restored an original version of register.php and only group 1 shows. I’ll go and try your code to see if I can get group 2 to load.

    Sorry about that…

    jivany
    Participant

    OK, now I’m scratching my head.

    When I create a second group, even if I tag the fields in the second group as “required”, they don’t show up on the register page (the bp-default version). The second group only shows up on the user’s profile page where they can edit the fields. They are tagged as “required” but nothing seems to force the user to fill them out.

    I’m confused now as to what you’re seeing and/or trying to do.

    Gene53
    Participant

    Oops,sorry, I think there was a misunderstanding, bp-register loads all groups by default, what I’m trying to accomplish is to hide (or not load) groups 3 and 4 so the user can fill those optional field groups once they’ve activated their accounts..

    jivany
    Participant

    OK. I’m thinking you can do something like this. Find this part of the file in register.php:

    <?php /***** Extra Profile Details ******/ ?>

    <?php if ( bp_is_active( 'xprofile' ) ) : ?>
    <div class="register-section" id="profile-details-section">

    <h4><?php _e( 'Profile Details', 'buddypress' ) ?></h4>

    <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
    <?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>

    At this point, add in a line like:

    if( (bp_the_profile_group != "3") || (bp_the_profile_group != "4") ) :

    Then go down to this part of the file:

    <?php endwhile; ?>

    <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />

    <?php endwhile; endif; endif; ?>

    </div><!-- #profile-details-section -->

    Before the first endwhile line, insert this:

    <?php endif; ?>

    I *think* that should spit out groups 3 & 4 (assuming you have groups 3 & 4 defined in your profile groups). You might need to add in group “1” also to get the Base. The only part I’m not sure about right now is if the number need to be in double quotes or just bare. So it might be:

    if( (bp_the_profile_group != 3) || (bp_the_profile_group != 4) ) :

    I think. ;)

    Gene53
    Participant

    @jivany, I’ve been playing around with this all afternoon but to no avail (learning PHP as I go along), either group no. 2 shows up but group 1 (name) doesn’t, or group 1 and only 1 field out of 6 from group 2 or neither groups 1 and 2.

    I give up, LOL

    Thanks,

    Gene

    Gene53
    Participant

    Thanks, I’ll give it a whirl tomorrow.

    Gene53
    Participant

    Thanks, I’ll give it a whirl tomorrow.

    jivany
    Participant

    You would probably have to do something like:

    if( bp_the_profile_group != "3" || bp_the_profile_group != "4" ) {
    //display the profile stuff in register.php
    }

    You should be able to just toss that check near the top of that while loop and then remember your closing brace at the bottom.

    jivany
    Participant

    You would probably have to do something like:

    if( bp_the_profile_group != "3" || bp_the_profile_group != "4" ) {
    //display the profile stuff in register.php
    }

    You should be able to just toss that check near the top of that while loop and then remember your closing brace at the bottom.

    Gene53
    Participant

    Thanks jivany, if I want to filter out groups 3 and 4, do I simply need to replace your above code’s “group number” with “3, 4”?

    Thanks again

    Gene53
    Participant

    Thanks jivany, if I want to filter out groups 3 and 4, do I simply need to replace your above code’s “group number” with “3, 4”?

    Thanks again

    jivany
    Participant

    Basically, check your register.php main loop and only show the groups you want to show.

    You’re looking for the while loop after the bp_is_active( ‘xprofile’ ) call.

    Within the loop, you can filter out groups by doing a simple if check using if (bp_the_profile_group() == "group number") where group number is the number of the group you want to show.

    Similar sort of idea in this thread: https://buddypress.org/forums/topic/profile-fields-questions

    jivany
    Participant

    Basically, check your register.php main loop and only show the groups you want to show.

    You’re looking for the while loop after the bp_is_active( ‘xprofile’ ) call.

    Within the loop, you can filter out groups by doing a simple if check using if (bp_the_profile_group() == "group number") where group number is the number of the group you want to show.

    Similar sort of idea in this thread: https://buddypress.org/forums/topic/profile-fields-questions

    Gene53
    Participant

    Hi,

    I’m building a BP/WP single install site for a local organization and the extra profile fields are divided in 4 sections:

    Group 1- Full Name (base group)

    Group 2- General Info (location, age, gender, occupation)

    Group 3 – Personal Info (bio, interests, etc.)

    Group 4 – Contact (messengers ID’s, Twitter, etc.)

    What I’m trying to accomplish is to hide groups 3 and 4 on the registration page not to overwhelm the user with a bunch of fields to fill out during sign-up, those fields can be filled out once the user has activated her/his account via “edit profile”.

    Thanks,

    Gene

    #67022
    Paul Wong-Gibbs
    Keymaster

    If someone posts this on the Ideas forum, that’ll get this flagged for a future BP release. I know John’s working on xProfile in BP 1.3, so it’ll never work again properly *hides*

    #66327
    Windhamdavid
    Participant

    All in all, here’s my approach that I use on MU/BP sites ~

    1) modify the register/register.php wp-signup.php hardcoded default text and url slugs.

    2) enable xprofile and require additional fields upon registration.

    2) use a captcha ~ i’m fond of ReCatcha

    3) make sure you and check the NO setting under “Allow blog administrators to add new users to their blog via the Users->Add New page. ” in wp-admin/wpmu-options.php “Admin > Site Options”

    4) I ban or limit the registration domains (also in Admin > Site Options) so that the commonly used spammer domains are blocked from registration and then I add an email contact for owners of these addresses to manually request registration. I hide the email address from bots with HiveLogic EnKoder

    5) I then firewall off entire blocks of IP’s from my servers from commonly used spammer IP ranges you can find at sources like spamhaus.org .. and considering that these are one language sites, the need for access for the IP blocks on the pan asia network or eastern europe are unlikely. If you have a multilingual site, this might cause issues to very few users. Cpanel, Plesk, BSD, etc have tools to do this.. if you’re on a shared server, ask your hosting provider if they can do it for you, and they may be likely doing it already.

    6) I also recommend using Askimet.

    #61130
    Paul Wong-Gibbs
    Keymaster

    The only thing you might want to look into is to show/hide specific xprofile fields for different groups. That’s more advanced and requires some new code to be written by someone ;)

    This is possible without too much effort, I have recently done it for a client. I considered using usermeta to indicate the type but it worked better for my client’s site to have it is an xprofile field. I wrote some code to not display or permit changes to it after registration, too.

    #61121
    Bowe
    Participant

    I don’t have a solution for all your problems but assigning different “user” types to your site is easy:

    – Create a xprofile field in your BuddyPress admin. For example: What kind of user are you:

    a. Swimmer

    b. Skater

    c. Surfer

    – Install the BP Member filter plugin: https://buddypress.org/forums/topic/bp-member-filter

    – Users can now filter members on the member directory page to find certain usertypes

    The only thing you might want to look into is to show/hide specific xprofile fields for different groups. That’s more advanced and requires some new code to be written by someone ;)

    Good luck!

    edit: Maybe if you combine both tips from Boris and me you just got your solution ;)

    ps: I’m interested in the jquery profile fields stuff as well.. sounds handy!

    #60168

    In reply to: BuddyPress Geo plugin

    In my opinion, the downfall of this plugin is that it uses JS to hide xprofile fields that store the lat and lon instead of just using user-meta. That and it just works a little strangely, and I couldn’t really figure out why I wasn’t comfortable with it.

    I’ve got a re-engineered version of this plugin I’m using for a client at the moment, and will probably give that code back to the devs of this plugin to be reused for later.

    #6591
    Jeff Sayre
    Participant

    Many people have been inquiring about privacy options in BuddyPress. Some of you are aware that I am currently coding a Privacy Component for BuddyPress. I decided that it is time to fill the community in on my component, providing more details and a timeline.

    My Privacy Component will be entering a private alpha early next week. After the alpha phase is complete, it will then be available as a public Beta. If it goes well, and Andy likes it, it may be included in the BP core for version 1.2. If you look at the BP roadmap, you will see that that is when privacy filtering is scheduled to be included in core.

    In this screen capture of one of the privacy setting screens, you can see that there are actually six user classification filters that can be chosen for each BP object. The sixth option, “Relationship Mapped”, is made available by a separate plugin which I’ll be releasing later. The default Privacy Component will offer five levels.

    My current estimated release date for the first public beta is the week of October 5. This date may change depending on the feedback from the alpha phase.

    More Details

    This is taken from the Privacy Component’s current readme.txt file:

    BPAz is a privacy control component for BuddyPress that provides a site’s users a mechanism with which to control who has access to which pieces of their personal data.

    == Description ==

    The BuddyPress Authorization component (also referred to as BPAz, BP-Authz, or BuddyPress Privacy Component) is a BuddyPress component that allows users fine, granular control over who has access to which pieces of their personal data. It provides this service by hooking into BuddyPress’ core functionality, thereby giving users the ability to control (grant or deny) access to each piece, or grouping of, their personal data.

    The term “auth” is often used interchangeably for authentication or authorization. There is significant difference in meaning between them. Authentication is not authorization. Authorization is not authentication. Authentication must come before authorization. Authentication is handled by WPMU, initially by the registration process and subsequently by the login script. Authorization deals with verifying and managing the access rights a given authenticated user has to certain objects.

    Because of this confusion, the process of authentication is now often referred to as A1, or AuthN, or simply Au. The process of authorization is now often referred to as A2, or AuthZ, or simply Az. Since authentication must come before authorization, the A1-A2 ordinality of the terms is evident. This also explains the alternate names BPAz and BP-Authz.

    BPAz deals with authorization by verifying and managing access rights an authenticated user has to other’s objects–although a user may choose to expose their data to non-logged in users as well.

    The core BuddyPress objects on which rights can be set:

    • xprofile fields
    • activity stream actions
    • friends list
    • groups list
    • messaging
    • blogs
    • wire
    • status updates

    The basic access levels configurable per object (some objects offer only a subset of these rights):

    • allow/deny anyone (globally public or globally private). This is accomplished by setting an object’s viewing rights to either “All Users” or “Only Me”
    • allow only “Logged in Users” to view a given object
    • allow only friends to view a given object
    • allow only a specific list of users to view a given object. This is also called per user access control. This is accomplished by setting an object’s viewing rights to “These Users Only” and then entering a comma-separated list of usernames (a member’s login name) in a textbox that becomes visible.

    NOTE: Per relationship-type access control is possible if you use my BuddyPress Relationship Mapping plugin. For instance, allow by friend, colleague, partner, client, customer, fan, etcetera.

    Site Administration of BuddyPress User Privacy Tools

    Site administrators have ultimate control and oversight over the configuration of BPAz’s features and functionality via an additional administration panel under the BuddyPress menu hierarchy. The BuddyPress Privacy Component is enabled by default for all object groupings. However, Site Administrators can disable user-configurable sitewide privacy, or even individual privacy control objects, by using the Privacy Settings administration panel. As the Site Administrator, you will always be able to see each user’s complete content. Users do not have any options to hide content from Site Administrators.

    #51863
    Jeff Sayre
    Participant

    r-a-y

    There are a number of new hooks and an array object that need to be available for the privacy component to function. Although the alpha versions may work with v1.1, the full-blown version is really targeted for v1.2 and will require that as a minimum.

    Concerning your wire post, for some reason, I believe that I never received that email. Strange, since I do have all my email notifications set to “Yes”.

    But, to answer that specific question, your direct calls to xprofile fields should still function properly. Since you are pulling your data directly from the table and not from a templatetag function, you should be fine. Now, if you want your direct calls to be subjected to privacy control, then that is a different matter. You would then need to pull your data after the fields array has been filtered.

    There is a separate table that gets installed that handles all privacy object settings. The privacy component filters the fields array that populates the profile page, removing any field-level elements that a given user chooses to hide from a given viewer category.

    #51270
    peterverkooijen
    Participant

    Temporary solution how to customize registration form until 1.1 arrives, FYI and my own reference:

    Changed this line in function bp_show_register_page() in functions.php in my template:

    require ( BP_PLUGIN_DIR . '/bp-core/bp-core-signup.php' );

    to

    require ( 'custom-signup.php' );

    Copied bp-core-signup.php to the template folder, renamed to custom-signup.php.

    Go customize! :-)

    Unfortunately the custom fields are generated by yet another core function:

    do_action( 'signup_extra_fields', $errors );

    This action is associated with the function xprofile_add_signup_fields in bp-xprofile/bp-xprofile-signup.php.

    Copied the function to bp-custom.php, renamed action and function to custom_signup_extra_fields and custom_xprofile_add_signup_fields.

    Used this CSS trick to hide the avatar upload. Will use the same trick to hide the username field.

    #50787
    Paul Wong-Gibbs
    Keymaster

    See https://buddypress.org/forums/topic/faq-how-to-code-snippets-and-solutions, “How to hide selected profile fields” and “How to show secondary profile fields while hiding the “Base” profile fields in a user profile”.

    These should get you started and this has been discussed elsewhere on the forums, so do a search.

    enlightenmental1
    Participant

    Needed:

    filter for the bp-xprofile to hide and disabled profile fields if the profile field name is given? (hide so only level 10/admin can see, disable so it cannot be changed)

    i.e.

    if xprofile field = referred by, last name

    remove filter… add filter…

    then I can hide the profile fields on the member page after a user has registered…

    (dont want to show the world last names or referred by #)

    this probably easy enough for one of you gurus… let me know what you think

Viewing 25 results - 101 through 125 (of 129 total)
Skip to toolbar