Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,076 through 1,100 (of 3,593 total)
  • Author
    Search Results
  • #220257
    danbp
    Participant

    hi @tac28,

    as you’re a first timer, i would suggest that you read attentively the Codex, and try to understand how BuddyPres works.

    I am using a child theme based on Headway Base and have no need of a bp theme.

    You can use any theme you want with BuddyPress.

    Modifying the registration page is explained here.

    xProfile fields settings is explained here.

    #213735
    b2marketing
    Participant

    Hi

    Sorry had to go to bed.

    Yes it is a custom profile field I created and it is working when using Buddypress 2.0.2 but updating to latest 2.1.1 then all members disappear from the loop and I just get the “else” statement saying: No members found.

    I created the custom field by going to users -> profile fields.
    I then use the if statement above like this. Please see gist.
    https://gist.github.com/philipb2/bd689aa4b843235ec414

    Thanks

    #212524
    adamt19
    Participant

    @shanebp in wp_bp_xprofile_fields there is only one instance of each field/question

    #210720
    crell
    Participant

    Hi,
    Thanks for responding.
    It’s passing to an internal site URL.

    This link below is a recent post
    http://ashbournecyclingclub.co.uk/2014/10/group-ride-monsal-head

    If I then select “Edit my profile” from the menu, it takes me to:
    http://ashbournecyclingclub.co.uk/2014/10/group-ride-monsal-head/1/
    (note it’s appended “/1” to the end of the URL

    Theme is Heuman
    Wordpress 4.0

    Plugins are:
    Advanced Custom Fields
    Version 4.3.9 | By Elliot Condon | View details

    Akismet
    Version 3.0.2 | By Automattic | View details

    Black Studio TinyMCE Widget
    Version 2.0.4 | By Black Studio | View details | Home | FAQ | Support | Rate | Follow | Donate

    BuddyPress
    Version 2.1.1 | By The BuddyPress Community | View details

    Categories Images
    Version 2.4.2 | By Muhammad Said El Zahlan | View details

    Cat Post Type
    Version 1.0.1 | By Michel Bobillier aka Athos99 | View details

    Coming Soon / Maintenance mode Ready!
    Version 0.5.3 | By coming soon | View details

    Contact Form 7
    Version 3.9.3 | By Takayuki Miyoshi | View details

    Contact Form DB
    Version 2.8.16 | By Michael Simpson | View details

    Custom Facebook Feed
    Version 2.1.2 | By Smash Balloon | View details

    Enhanced Media Library
    Version 1.1.2 | By WordPress UX Solutions | View details

    Events Manager
    Version 5.5.3.1 | By Marcus Sykes | View details

    Jetpack by WordPress.com
    Version 3.1.1 | By Automattic | View details

    Leaflet Maps Marker
    Version 3.9.2 | By MapsMarker.com e.U. | View details

    Limit Login Attempts
    Version 1.7.1 | By Johan Eenfeldt | View details

    Maps Marker Pro ®
    Version 1.9 | By MapsMarker.com e.U.

    NextGEN Gallery by Photocrati
    Version 2.0.66.29 | By Photocrati Media | View details | Get help | Contribute

    Post Css Class
    Version 1.0.1 | By Michel Bobillier aka Athos99 | View details

    Quick Featured Images
    Version 8.2.1 | By Martin Stehle | View details

    Regenerate Thumbnails
    Version 2.2.4 | By Viper007Bond | View details

    TinyMCE Advanced
    Version 4.1.1 | By Andrew Ozz | View details

    Types – Complete Solution for Custom Fields and Types
    Version 1.6.3 | By OnTheGoSystems | View details

    Wordfence Security
    Version 5.2.6 | By Wordfence | View details

    WordPress SEO
    Version 1.6.3 | By Team Yoast | View details

    WP-PageNavi
    Version 2.86 | By Lester ‘GaMerZ’ Chan | View details

    WP FullCalendar

    1a-spielwiese
    Participant

    The problems are still unresolved:

    ++ Cfr. regarding problem A. (Making xProfile fields required only for members with a certain user role):

    https://wordpress.org/support/topic/making-bp-xprofile-fields-required-for-certain-user (posted today)

    ++ Hide theses xProfile fields for members with other user roles:

    https://wordpress.org/support/topic/bb-xprofiles-acl-does-not-work (posted one week ago)

    ++ Cfr. regarding problem D. (Making answers unchangeable):

    https://buddypress.org/support/topic/how-to-make-some-xprofile-field-to-uneditable/#post-206808 (posted two days ago).

    #207682
    Kris35
    Participant

    Hi @1a-spielwiese,

    Thanks for this. I had a look on your registration page where you have a few countries for members to select, but when I choose one, the same dropdown menu appears. Im not using any plugin at the moment – just the extended profiles in the components of Buddypress at the top of the list which includes checkboxes for activity streams, friend connections etc. I don’t want to use a plugin that hasn’t been updated in two years either.

    If I go to Users>Profile fields, this is where I was hoping to do this but the only way I can see to do it is to add, UK, then a list of counties. USA and then a list of states, and so on which would mean I would have a list a mile high of all the different countries and local areas.

    Am I missing something?

    Thanks a bunch,

    Kris

    #207115
    1a-spielwiese
    Participant

    A less elegant, but working solution regarding locations within states you can find on my registration page (section: ‘Profile Details – Teil III: Geographisches’):

    http://1a-spielwiese.de/registrieren/

    You can ask at first:

    • In which state (USA or UK?) do you live?
    • and then:

    • In which US-federal state respec. in which UK-county to you live?
    • and finally you can introduce the names of the federal states of the USA with ‘US-‘ and the names of the counties of the United Kingdom with ‘UK-‘.

    (You can ask this questions within the ‘base group’ of your xProfile fields – then they get displayed on your registration page automatically. Or you can make your further xProfile fields displayed on your registration page as well:

    https://buddypress.org/support/topic/reshaping-the-registration-page/#post-203615 [section 2nd].)

    #207114
    1a-spielwiese
    Participant

    Yes, there should be a way, but I was not able to follow the instructions / to realise that way.

    The basic idea is:

    • Create two (or more) new WordPress user roles, e.g.: Users-UK and Users-USA.
    • Then you can assign one xProfile-field, ‘In which [federal] state do you live?’, exclusively to your users with the user role Users-USA; and another x-Profile, ‘In which county do you live?’, to your users with the user role Users-UK.

    The instructions for that solution you find there:

    https://buddypress.org/support/topic/resolved-different-profile-types-and-different-user-roles/

    (The user roles there are ‘bands’ and ‘fans’).

    And my report about my attempt to apply that instructions you find there:

    https://buddypress.org/support/topic/different-profile-types-and-different-user-roles-part-ii/

    My user roles are (sport) ‘teams’ and ‘fans’.

    But unfortunately, I was not able to hinder, that ‘fans’ get displayed the questions (xProfile-fields) for ‘teams’ was well; and the ‘teams’ the questions for ‘fans’…

    Further problem:

    Even if there is a solution regarding later profile edits – even complicate seems to be, to make already the registration page “input senstive”, because during registration the new user isn’t yet registered (i.e.: has no user role yet).

    Cfr. there:

    http://forum.wpde.org/buddypress/133961-registrierungsseite-umgestalten-anleitung-und-fragen.html (section 4. – unfortunately in German).

    #206290
    danbp
    Participant

    To make a field uneditable, you can remove it from the edit page of each profile.
    You just have to enter the file ID, separated by coma if necessary to hide more than one.

    Add snippet to child-theme functions.php or bp-custom.php

    function bpfr_make_profile_field_uneditable( $retval ) {	
    	
    	if( is_user_logged_in()  && bp_is_profile_edit() ) {
    	
    	$retval['exclude_fields'] = '20,21,22';	// field id's
    	
    	} 
    	return $retval;
    	
    	}
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_make_profile_field_uneditable' );

    Reference:

    Using bp_parse_args() to filter BuddyPress template loops

    #206284
    1a-spielwiese
    Participant

    For me also not:

    I tried it with

    Mitglieder-Kategorie (Team oder Fan?)

    instead of

    'name of your field'

    as well as with

    'Mitglieder-Kategorie (Team oder Fan?)'

    But my users can still change the values for this field. –

    I tried as well – already before and now again – this code of @noizeburger:

    //hide the user role select field in edit-screen to prevent changes after registration
    add_filter("xprofile_group_fields","bpdev_filter_profile_fields_by_usertype",10,2);
    function bpdev_filter_profile_fields_by_usertype($fields,$group_id){
    //only disable these fields on edit page
    if(!bp_is_profile_edit())
    return $fields;
    //please change it with the name of fields you don't want to allow editing
    $field_to_remove=array("User Role");
    $count=count($fields);
    $flds=array();
    for($i=0;$i<$count;$i++){
    if(in_array($fields[$i]->name,$field_to_remove))
    unset($fields[$i]);
    else
    $flds[]=$fields[$i];//doh, I did not remember a way to reset the index, so creating a new array
    }
    return $flds;
    }

    It works neither with

    "Mitglieder-Kategorie (Team oder Fan?)"

    nor with

    Mitglieder-Kategorie (Team oder Fan?)

    nor with:

    'Mitglieder-Kategorie (Team oder Fan?)'

    #206262
    1a-spielwiese
    Participant

    However, not only dots are a problem: with ‘oder Entsprechendes’ (instead of ‘o.ä.’) it doesn’t word as well.

    As well it does not work with ‘Jahr der Teamgründung oder Geburt’.

    So, maybe the length of the field names is the problem. –

    Therefore again: Is there a possibility to address profile fields by other means than with their field names? Are there e.g. id-numbers or something like that, which I could use (instead of the names)?

    #205264
    Myg0t
    Participant

    Nice, I was actually looking at that a couple of days ago. I had tried a few things out, but to no avail.

    Here’s where i’m at: I’ve commented the above edited section of members-loop.php.

    In my bp-custom.php i’ve copy/pasted the code from the link you sent, and have applied the following edits to it:

        private function get_custom_ids() {
            global $wpdb;
     
            // collection based on an xprofile field
    		// WP_User_Query arguments
    		$args = array (
    			'role'           => 's2member_level2',
    			'fields'         => array( 'id' ),
    		);
    
    		// The User Query
    		$user_query = new WP_User_Query( $args );	
    		//The User Loop
    		if ( ! empty( $user_query->results ) ) {
    			foreach ( $user_query->results as $user ) {
    				$custom_ids = $user.",";
    			}
    		} else {
    			// no users found
    		}
            //$custom_ids = $wpdb->get_col("SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 8 AND value = 'no'");
    		
            return $custom_ids;
        }  

    I also, made the lower two edits you suggested to the $query_array and return $new_count.

    currently i’m getting this error:

    Catchable fatal error: Object of class stdClass could not be converted to string in /home/collegi8/public_html/wp-content/plugins/bp-custom.php on line 30

    line 30 is:

    $custom_ids = $user.",";

    Thanks for all your help man,

    M

    #205242
    Hugo Ashmore
    Participant

    Well if you think it’s the theme try asking the theme authors how they are doing this, if they reply ‘we aren’t’ then you know it’s not the theme! or conversely try swapping themes and see if that dob field stops working.

    What plugins that are listed as BP ones do you have running?, list them as there are ones that extend the profile field selectors such as this:

    ‘Buddypress Xprofile Custom Fields Type’

    which also will display the date picker as a age calculation if selected.

    At the end of the day if you want help it’s going to be important for you to understand how your installation is working so you can impart information as it’s required, especially where the issues are not strictly core BP ones.

    #205165
    Hugo Ashmore
    Participant

    It does though, have you tried creating profile fields? what version of BP have you got installed?

    #204276
    1a-spielwiese
    Participant

    The basic issue is resolved.

    Regarding the two persting problems I have started more specific topics:

    https://buddypress.org/support/topic/age-for-each-user-instead-of-age-for-logged-in-user/

    and

    https://buddypress.org/support/topic/addressing-profile-fields-with-complex-names/

    Therefore, for my point of view, this topic could be closed.

    1a-spielwiese
    Participant

    @hnla / https://buddypress.org/support/topic/different-profile-types-and-different-user-roles-part-ii/#post-201146:

    By chance I found the solution regarding the ‘default user role’-issue:

    Within the wp-admin-folder there is not only an options-general.php, rather as well an options.php.

    Within the comment at the beginning of this file is written: ‘If accessed directly in a browser this page shows a list of all saved options along with editable fields for their values.’

    Therefore I adressed this file with 1a-spielwiese/wp-admin/options.php – and there I found the opportunity to change the default user role:

    http://1a-spielwiese.de/wp-content/uploads/2014/10/wp-admin-options-php.jpg

    After changing it into ‘fan’ (note: it’s not possible to leave the line blank!), on the page options-general.php?page=wp-roles-at-registration it is now possible to select only the roles ‘fan’ and ‘team’:

    http://1a-spielwiese.de/wp-content/uploads/2014/10/rar-settings_without_subscriber.jpg

    And after saving it, ‘subscriber’ disappears from the registration page as well:

    http://1a-spielwiese.de/wp-content/uploads/2014/10/register-page_without_subscriber.jpg

    —-

    However, these other above mentioned problems:

    A. How can I make profile fields, which are asigned only to one member category / user role, ‘required’? Cfr. above.

    C. What is the purpose of the penultimate step of the instructions of @noizeburger? – What have I to check for seeing, whether it works or not?

    and

    D. Why does the last step of the instructions of @noizeburger do not work for me? How can I make the member category / user role unchangeable for my members?


    @amalsh
    / @jonaro / @lebearuk / @kamillamonkey and @jeffacubed:

    Do you have any idea regarding this issues?

    – cfr. regarding D.: http://kampfsportlerinnenneuwied.1a-spielwiese.de/wp-content/uploads/sites/2/2014/09/user_role_still_changeble.jpg

    are still unresolved.

    #203615
    1a-spielwiese
    Participant

    I found two more solutions:

    1st:

    a) The place of the field for determining the user role is depending on the plugins/wp-roles-at-registration/wp-roles-at-registration.php

    The relevant line of the original version of that file is:

    add_action('bp_after_signup_profile_fields', array($wp_rar_plugin, 'bp_choose_roles_registration_form'));

    I substituted there bp_after_signup_profile_fields by template_notices and now the field at issue is displayed not the end, rather at the beginning of my registration page:

    http://1a-spielwiese.de/registrieren/

    b)

    For creating the headline and the introductory text I made a second change within the same file. I changed the following section. The first and the last line of the quote is the original code, and the lines inbetween I inserted:

        <div class="register-section" id="user-role-section">
        
        <h4-a><?php _e( 'Benutzer/in/rolle', 'buddypress' ); ?></h4-a>
    
        <p><small><em>Entscheide Dich bitte als allererstes f&uuml;r eine der Benutzer/in/rollen "Team" oder "Fan" (bitte w&auml;hle nicht die Rolle "Subscriber"; diese Angabe soll noch gel&ouml;scht werden). In Abh&auml;ngigkeit von Deiner Antwort wirst Du nach Abschluss der Registrierung und wenn Du Dich das erste Mal bei 1a-Spielwiese einloggst und Dir Dein Profil ansiehst, die M&ouml;glichkeit haben, einige erg&auml;nzende rollenspezifische Profilangaben zu machen.</em></small></p>
    
        <label for="wp_rar_user_role"><?php echo $this->wp_rar_role_label; ?></label>

    2nd:

    As well I was able to integrate now not only the ‘base’-profile field group. For that it is neccessary to copy a long section of the buddypress register.php. This sections begins with:

    			<?php /***** Extra Profile Details ******/ ?>
    
    			<?php if ( bp_is_active( 'xprofile' ) ) : ?>
    
    				<?php do_action( 'bp_before_signup_profile_fields' ); ?>
    
    				<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 ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

    And it ends with:

    					<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
    
    					<?php endwhile; endif; endif; ?>
    
    					<?php do_action( 'bp_signup_profile_fields' ); ?>
    
    				</div><!-- #profile-details-section -->
    
    			<?php endif; ?>

    The only two things, which are obligatory then:

    • You have to insert the entire copied section behind the last line of the original section.
    • And you have to change 'profile_group_id' => 1, into 'profile_group_id' => 2, (for adressing your second profile field group – and so on regarding the further profile field groups).

    Besides I changed the <h4>-headline and inserted introductory text behind that headline. Therefore my code there is:

    					<h4-a><?php _e( 'Profile Details - Teil II: Kontaktendaten', 'buddypress' ); ?></h4-a>
    
    				<p><small><em>Beachte bitte, dass Du in zu den Profilfeldern in diesem Abschnitt selbst entscheiden kannst, wem Deine Angaben, die machst, angezeigt werden sollen.</small></em></p>
    #203221
    1a-spielwiese
    Participant

    I get now managed to place the information from the profile fields Geschlecht, Jahr, Bundesland/Kanton in one line (instead below each other):

    http://1a-spielwiese.de/teams/

    The code is now:

    <table-member border="0">
      <tr>
    	<td>| Geschlecht: <?php bp_member_profile_data( 'field=Geschlecht' ); ?> | </td>
    	<td>Geburts-/Gr&uuml;ndungsjahr: <strong><?php bp_member_profile_data( 'field=Jahr' ); ?></strong> | </td>
    	<td>Bundesland/Kanton: <?php bp_member_profile_data( 'field=Bundesland, Kanton oder Wahlkreis' ); ?> / </td>
    	<td><?php bp_member_profile_data( 'field=A:Bezirk oder Statutarstadt; CH: Bezirk o.ä.; D: LANDKREIS oder KREISFREIE STADT; Li: Gemeinde' ); ?> |</td>
       </tr>
    </table-member>

    Nevertheless

    • the problem regarding the field ‘A:Bezirk oder Statutarstadt; CH: Bezirk o.ä.; D: LANDKREIS oder KREISFREIE STADT; Li: Gemeinde’ persits: That information should appear at the ende of the line, betwen ‘/’ and ‘|’.
    • and as well I would still like to know, whether it is possible to transform the ‘year of birth’-information into an ‘age’-information.
    #203207
    1a-spielwiese
    Participant

    1. I renamed the second field from ‘Teamgründung bzw. Geburtsjahr’ into ‘year’ – and it works.

    2. With the field ‘Bezirk oder Statutarstadt; CH: Bezirk o.ä.; D: LANDKREIS oder KREISFREIE STADT; Li: Gemeinde’, again, it does not work. – Therefore I guess, the problem are blank, points etc. – Is true? Is there a any way to resolve the problem?

    3. Is there any way to get displayed the age at any current moment (instead of the year of brith or team fundation, which is inserted into profile fields)?

    #202802
    1a-spielwiese
    Participant

    @ https://buddypress.org/support/topic/modifying-the-member-list/#post-187019:

    wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php

    To modify this file, you make a copy of it and put it into your child-theme
    /your-child-theme/buddypress/members/members-loop.php

    I did it, and inserted behind:

    <?php
    
    /***
    * If you want to show specific profile fields here you can,
    * but it'll add an extra query for each member in the loop
    * (only one regardless of the number of fields you show):
    *
    * bp_member_profile_data( 'field=the field name' );
    */
    
    ?>

    the following code:

    				<?php bp_member_profile_data( 'field=Geschlecht' ); ?>
    				<br>
    				<?php bp_member_profile_data( 'field=Teamgründung bzw. Geburtsjahr' ); ?>
    				<br>
    				<?php bp_member_profile_data( 'field=Bundesland, Kanton oder Wahlkreis' ); ?>

    The first and the third fields are displayed; the second not. – Why and how can I change it?

    #202778
    1a-spielwiese
    Participant

    I decided to test theses instructions – and in general they work.

    My registration page has now a new design:

    http://1a-spielwiese.de/registrieren/

    This result I got using two means:

    1st:

    I tested with ‘Simple Custom CSS’-Plugin that code:

    #buddypress .standard-form #basic-details-section, #buddypress .standard-form #blog-details-section, #buddypress .standard-form #profile-details-section {
        border: 2px solid #8b008b;
    	float: none;
      	clear: left;
      	width: 100%;
      	padding: 10px;
      	margin-bottom: 1em;
    }
    
    #user-role-section {
      	border: 2px solid #8b008b;
        float: none;
        width: 100%;
      	padding: 10px;
    }
    
    #wp_rar_user_role {
          width: 100%;
        }
    
    h4-a {
    	color: #8b008b;
    	font-size: 11px;
    	font-size: 1.1rem;
      	font-weight: bold;
    	letter-spacing: 0.05em;
    	line-height: 1.9091;
    	text-transform: uppercase;
    }
    
    .wp-editor-container {
        border: 1px solid #DCDCDC;
    }

    Finally I will insert it into my child-theme.

    2nd:

    The relecant section of the register.php with in my reddle-child/buddypress/members-folder is now:

    		<?php if ( 'request-details' == bp_get_current_signup_step() ) : ?>
    
    			<?php do_action( 'template_notices' ); ?>
    
    			<p><?php _e( 'Mitglied bei 1a-Spielwiese zu werden, ist sehr einfach - und kostenlos. F&uuml;lle einfach die Felder unten aus und wir erstellen f&uuml;r Dich umgehend ein Benutzer/in/konto und in K&uuml;rze auch einen eigenen Blog (Webseite).', 'buddypress' ); ?></p>
    
    			<?php do_action( 'bp_before_account_details_fields' ); ?>
    
    			<div class="register-section" id="basic-details-section">
    
    				<?php /***** Basic Account Details ******/ ?>
    
    				<h4-a><?php _e( 'Account Details', 'buddypress' ); ?></h4-a>
    
    				<p><small><em>Diese Daten werden f&uuml;r Deine Registrierung als neues Mitglied und die Einrichtung Deines eigenen Blogs (Webseite) ben&ouml;tigt.</em></small></p>
    
    				<label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_username_errors' ); ?>
    				<input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" />
    
    				<label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_email_errors' ); ?>
    				<input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" />
    
    				<label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_password_errors' ); ?>
    				<input type="password" name="signup_password" id="signup_password" value="" class="password-entry" />
    				<div id="pass-strength-result"></div>
    
    				<label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
    				<?php do_action( 'bp_signup_password_confirm_errors' ); ?>
    				<input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" class="password-entry-confirm" />
    
    				<?php do_action( 'bp_account_details_fields' ); ?>
    
    			</div><!-- #basic-details-section -->
    
    			<?php do_action( 'bp_after_account_details_fields' ); ?>
    
    			<?php /***** Extra Profile Details ******/ ?>
    
    			<?php if ( bp_is_active( 'xprofile' ) ) : ?>
    
    				<?php do_action( 'bp_before_signup_profile_fields' ); ?>
    
    				<div class="register-section" id="profile-details-section">
    
    					<h4-a><?php _e( 'Profile Details', 'buddypress' ); ?></h4-a>
    
    				<p><small><em>Diese Daten werden k&uuml;nftig in Deinem Profil angezeigt. Einige Angaben sind verpflichtend, um aussagekr&auml;ftige Profile zu erhalten; bei anderen Formularfeldern ist es Dir selbst &uuml;berlassen, ob Du Angaben machst oder nicht.</small></em></p>
    
    					<?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
    
    					<?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    
    					<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    
    						<div<?php bp_field_css_class( 'editfield' ); ?>>
    
    							<?php
    							$field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    							$field_type->edit_field_html();
    
    							do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
    
    							if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    								<p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    									<?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a>
    								</p>
    
    								<div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
    									<fieldset>
    										<legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
    
    										<?php bp_profile_visibility_radio_buttons() ?>
    
    									</fieldset>
    									<a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
    
    								</div>
    							<?php else : ?>
    								<p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    									<?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
    								</p>
    							<?php endif ?>
    
    							<?php do_action( 'bp_custom_profile_edit_fields' ); ?>
    
    							<p class="description"><?php bp_the_profile_field_description(); ?></p>
    
    						</div>
    
    					<?php endwhile; ?>
    
    					<input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" />
    
    					<?php endwhile; endif; endif; ?>
    
    					<?php do_action( 'bp_signup_profile_fields' ); ?>
    
    				</div><!-- #profile-details-section -->
    
    				<?php do_action( 'bp_after_signup_profile_fields' ); ?>
    
    			<?php endif; ?>
    
    			<?php if ( bp_get_blog_signup_allowed() ) : ?>
    
    				<?php do_action( 'bp_before_blog_details_fields' ); ?>
    
    				<?php /***** Blog Creation Details ******/ ?>

    3nd:

    Nevertheless I have two questions regarding the design:

    a) Why the 100%-width for #wp_rar_user_role is ignored?

    b) How can I place the third section (‘Mitglieder-Kategorie’) above the other two sections (or between the other two sections)?

    4th:

    I recognised as well: Deleting there:

    <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

    'profile_group_id' => 1, results in getting not only displaying the ‘base group’ of the xProfile fields, rather all fields of all field groups. 🙂

    Questions:

    a) How can I get the names (titels) of the different xProfile field groups displayed as well?

    b) How can I ensure, that only new members, which choose the user role ‘team’, get displayed the profile fields for teams and new members, which choose the user role ‘fan’, get displayed the profile fields for fans?

    #202419
    DogGuyJosh
    Participant

    I’ve played with various membership plugins and user role assignments, but the more I play, the more combinations I stumble upon and the more customization is required (or additional plugins for mapping and linking fields).

    I’m currently exploring Users Ultra out of the box, which seems to do everything I want (minus geolocation), however their documentation isn’t very helpful so I’m waiting to hear from their support staff.

    Regarding Geo Mashup, does it have the ability to map a custom profile field (address) to display a map on the user’s profile via shortcode?

    The User Pro plugin is also starting to look like a viable option.

    #201156
    1a-spielwiese
    Participant

    So, the following questions remain:

    A. How can I make profile fields, which are asigned only to one member category / user role, ‘required’? Cfr. above.

    B. Anyone knows, whether there is a function already written, which allows to change or delete the standard user role in WP MultiSite?

    C. What is the purpose of the penultimate step of the instructions of @noizeburger? – What have I to check for seeing, whether it works or not?

    D. Why does the last step of the instructions of @noizeburger do not work for me? How can I make the member category / user role unchangeable for my members?


    @amalsh
    / @jonaro / @lebearuk / @kamillamonkey and @jeffacubed:

    Do you have any idea regarding this issues?

    #201151
    1a-spielwiese
    Participant

    Follow-up:

    7th:

    Capability Manager Enhanced to define custom user roles, if you’re not satisfied with the default wordpress roles (subscriber, contributor,…).
    The first step is to create your user roles

    https://buddypress.org/support/topic/resolved-different-profile-types-and-different-user-roles/

    As ready implied there: I did this – and it works so far.

    8th:

    Create a xprofile field (selectbox) with the title “User Role” and name the options “Band Role” and “Fan Role” – in my case. You can call them whatever you want. Place this field in the “base” profile group, otherwise it won’t be shown during registration. Also make the field “required”. In my case the user can’t decide, if the visibility of the field can be changed.

    I did it already, when I installed and activated ‘BP Profile Search’-plugin – and it works.

    However, to choosed a dropdown menu and the categories ‘team’ and ‘fan’.

    9th:

    I modified:

    ?php
    function custom_bp_core_signup_user($user_id) {
        $user_role = strtolower(xprofile_get_field_data('User Role', $user_id));
        switch($user_role) {
            case "Band Role":
                $new_role = 'band';
                break;
            case "Fan Role":
                $new_role = 'fan';
                break;
        }
        wp_update_user(array(
            'ID' => $user_id,
            'role' => $new_role
        ));
    }
    add_action( 'bp_core_signup_user', 'custom_bp_core_signup_user', 10, 1);

    into:

    function custom_bp_core_signup_user($user_id) {
        $user_role = strtolower(xprofile_get_field_data('Mitglieder-Kategorie (Team oder Fan?)', $user_id));
        switch($user_role) {
            case "Team":
                $new_role = team';
                break;
            case "Fan":
                $new_role = 'fan';
                break;
        }
        wp_update_user(array(
            'ID' => $user_id,
            'role' => $new_role
        ));
    }
    add_action( 'bp_core_signup_user', 'custom_bp_core_signup_user', 10, 1);

    (I omitted <?php, because I created not a new bp-costum.php, rather inserted the code into my yet existing bp-costum.php. I inserted the modified code above the line ?>.)

    I did not understand, which effect this insertion should have – but, however, – as far as I see – it causes no harm.

    Did anyone understood, for which purpose the above mentioned code is?

    10th:

    I inserted as well:

    //hide the user role select field in edit-screen to prevent changes after registration
    add_filter("xprofile_group_fields","bpdev_filter_profile_fields_by_usertype",10,2);
    function bpdev_filter_profile_fields_by_usertype($fields,$group_id){
    
    //only disable these fields on edit page
    if(!bp_is_profile_edit())
    return $fields;
    //please change it with the name of fields you don't want to allow editing
    $field_to_remove=array("User Role");
    $count=count($fields);
    $flds=array();
    for($i=0;$i<$count;$i++){
    if(in_array($fields[$i]->name,$field_to_remove))
    unset($fields[$i]);
    else
    $flds[]=$fields[$i];//doh, I did not remember a way to reset the index, so creating a new array
    }
    return $flds;
    }

    into my bp-costum.php – again above the line ?>.

    It does not work:

    — threre the user role is still changeable:

    http://kampfsportlerinnenneuwied.1a-spielwiese.de/wp-content/uploads/sites/2/2014/09/user_role_still_changeble.jpg

    http://1a-spielwiese.de/members/kampfsportlerinnenneuwied/profile/edit/group/1 causes an redirection error. – The redirection error disappears, when I’m not logged in as kampfsportlerinnenneuwied, rather as superadmin.

    #201136
    1a-spielwiese
    Participant

    @ section 5th, part c):

    'I guess it’s, because the “fan-question” requires as well an answer; but it is not answered, because that member is a team (not a fan).'

    It’s in deed that: When I change the (first) “fan-question” from ‘required’ into ‘not required’ it’s possible to save the answer of kampfsportlerinnenneuwied regarding the team question, and it is displayed correctly in the frontend:

    http://1a-spielwiese.de/wp-content/uploads/2014/09/kampfsportlerinnen_answer.jpg

    But I don’t want to change the “fan-question” from ‘required’ into ‘not required’.

    —-

    PS.:

    The text of the second “fan-question” was still not displayed; and the text of the 5th question (‘Ergänzende Hinweise zu Deinem Geschlecht’) of the ‘base group’ wasn’t displayed as well:

    http://1a-spielwiese.de/wp-content/uploads/2014/09/text_missing.jpg

    It was because I deactivated (by chance) ‘Buddypress xProfile Rich Text Field’-Plugin. Reactivating it, both profile fields get displayed again.

Viewing 25 results - 1,076 through 1,100 (of 3,593 total)
Skip to toolbar