Search Results for 'hide xprofile fields'
-
AuthorSearch Results
-
April 13, 2010 at 7:11 pm #73344Gene53Participant
Thanks guys, I’ll drop the idea being that it’s way too complicated for what it’s worth.
My reason for having the mandatory name field only (which I renamed Username) in group 1 is that the site I’m working on is username only and thanks to Brajesh Singh’s modifications in edit.php, group 1 can’t be edited by the users.
So, my only alternative is to restore the original edit.php file, move the group 2 fields to group 1 so they may be filled out during registration but I wonder if there would be a simple way to hide or “gray out” the name field in edit.php so the user can’t change it.
April 13, 2010 at 11:38 am #73281Paul Wong-GibbsKeymasterSo, yes, by default, the register page only shows group 1 (the “base” group). You only retrieve one group via the profile_group_id= parameter in the bp_has_profile() call.
So, by default, this happens:
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”.
There have been other threads on the forum regarding showing more than one profile group on the registration page; I found several, but take a look at https://buddypress.org/forums/topic/all-fields-for-registration. It’s probably going to be really difficult to implement unless you have a decent understanding of PHP.
April 13, 2010 at 11:18 am #73280jivanyParticipantNope, I don’t think so. I was thinking you could remove the ‘profile_group_id=1’ arg from bp_has_profile but that doesn’t seem to allow the registration page to show more groups. I guess it appears that the only “required” fields for registration are the required ones in the Base group.
Might be worth opening a ticket on this one to see if that is the expect behaviour. Alternatively, ping R-a-y or DJPaul and see if they know.
April 13, 2010 at 2:24 am #73233Gene53ParticipantNope, only getting group 1. I wonder if:
<?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
can be modified to fetch group 2 also.
LOL, this is driving me nuts…
April 13, 2010 at 2:09 am #73229jivanyParticipantNo 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.
April 13, 2010 at 2:04 am #73228Gene53ParticipantDarn, 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…
April 13, 2010 at 1:24 am #73217jivanyParticipantOK, 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.
April 13, 2010 at 12:39 am #73210Gene53ParticipantOops,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..
April 12, 2010 at 10:54 pm #73202jivanyParticipantOK. 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.
April 12, 2010 at 9:59 pm #73193Gene53Participant@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
April 12, 2010 at 3:00 am #72806Gene53ParticipantThanks, I’ll give it a whirl tomorrow.
April 12, 2010 at 3:00 am #72906Gene53ParticipantThanks, I’ll give it a whirl tomorrow.
April 12, 2010 at 2:54 am #72803jivanyParticipantYou 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.
April 12, 2010 at 2:54 am #72903jivanyParticipantYou 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.
April 12, 2010 at 2:40 am #72800Gene53ParticipantThanks 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
April 12, 2010 at 2:40 am #72900Gene53ParticipantThanks 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
April 12, 2010 at 2:31 am #72797jivanyParticipantBasically, 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
April 12, 2010 at 2:31 am #72897jivanyParticipantBasically, 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
March 6, 2010 at 5:18 pm #67022In reply to: Turn off links for profile fields
Paul Wong-GibbsKeymasterIf 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*
March 2, 2010 at 1:44 pm #66327In reply to: How to control spam registration?
WindhamdavidParticipantAll 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.
January 19, 2010 at 6:03 pm #61130In reply to: Multiple user types – possible?
Paul Wong-GibbsKeymasterThe 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.
January 19, 2010 at 4:13 pm #61121In reply to: Multiple user types – possible?
BoweParticipantI 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!
January 6, 2010 at 6:09 pm #60168In reply to: BuddyPress Geo plugin
John James JacobyKeymasterIn 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.
September 1, 2009 at 2:19 am #51863In reply to: How to make a safe community?
Jeff SayreParticipantr-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.
August 19, 2009 at 8:41 pm #51270In reply to: Clean professional user registration?
peterverkooijenParticipantTemporary 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.
-
AuthorSearch Results