Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,476 through 1,500 (of 3,608 total)
  • Author
    Search Results
  • #171393
    danbp
    Participant

    @applegateian

    You create a new field on profile (ie. title=Amount)
    This field is a checkbox type field
    You have 4 items to check, so you need to create 4 checkboxes.

    The field name called by the function correspond to the title you give to your new field. So you actually have 1 field name and 4 checkbox values.

    The example above will output the checked value by the user on the member profile header (bp_before_member_header_meta)

    function my_moneytizer() {
    if ( $money = xprofile_get_field_data( 'Amount', bp_get_member_user_id() ) ) :
        foreach ( $money as $mon ) { 
    
    	echo '<br/><div class="checkit">';
                echo '<span>Earned today:&nbsp;</span>';
    		echo $data;
    	echo '</div>';
    	}
    endif;
    }
    add_filter ( 'bp_before_member_header_meta', 'my_moneytizer' );
    #171381
    applegateian
    Participant

    Thanks @danbp – I’m not entirely sure how to create that filter function, can you expand on that?

    The four unique names are:

    • £0-£100k
    • £100k-£500k
    • £500k-£2m
    • £2m+

    thanks,

    Ian

    #171277
    Squirrel
    Participant

    My portal theme only lets admin / editor users view all members profiles or other users view other profiles if they are friends. If you want more info on how I did this let me know.

    #171263

    In reply to: New profile fields!

    bp-help
    Participant

    @budskab
    The code I provided calls the current user dynamically if that is what you are wondering. Even thought it is one link it will take each user to their edit profile field group you created. Feel free to experiment around with it. Try these as well:

    
    <a href="<?php global $current_user; echo home_url() . '/' . $current_user->user_login . '/profile/edit/group/1/'; ?>">Edit My Profile</a></div>
    

    Or:

    
    if ( is_user_logged_in() ) {
    <a href="<?php echo bp_loggedin_user_domain(); ?>">Profile</a>//link to users profile
    <a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/friends/'; ?>">Friends</a>//link to users friends 
    <a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/messages/'; ?>">Messages</a>//link to users messages
    }
    

    As a final thought if you add those links I would wrap them in a conditional to check if the user is logged in like the links just above.

    #171253

    In reply to: New profile fields!

    budskab
    Participant

    Adding an image would be easy enough yes..

    Thanks for the line.. I’m still new to PHP, so this is the hardest part right now 🙂 But the line above seems logic… could i then just change the ‘profile/edit/group/2/’ part to other profile URLS? Sure would be cool. Our users are most likely not that techie and we desperately need to make it easy filling out their profiles 🙂

    Can I change the standard registration fields in any way?

    #171252

    In reply to: New profile fields!

    bp-help
    Participant

    @budskab
    This link should work below. You could also add an image to replace the text providing you know some basic html.

    
    <a href="<?php global $current_user; echo home_url() . '/' . $current_user->user_login . '/profile/edit/group/2/'; ?>">Edit My Profile</a></div>
    
    #171251

    In reply to: New profile fields!

    budskab
    Participant

    Hi

    Ahh… There they are… Is there a way to make them a little more visible for the users?

    Otherwise could we link to “../members/admin/profile/edit/group/2/” in a usermanual, and then the user will be directed to their own profile edit page?

    #171250

    In reply to: New profile fields!

    bp-help
    Participant

    @budskab
    They are not visible until the user fills them out. In the My Account Menu at the top right hover over it and select Profile/Edit. When you are on the next screen below the profile tabs you will see “Base” and whatever other field group you created. By default you will be on “Base” these fields are the ones that correspond with your registration form. The other Field Group button you made will display the other fields you created within that field group. This is assuming your theme is functioning correctly. If you are still having issues you may want to try some basic troubleshooting by activating a known theme that works well with BP like Twenty Twelve or bp-default as well as disabling any plugins other than BP. Good luck!

    #171233
    Ben Hansen
    Participant

    you 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.

    #171198
    Artisantopia
    Participant

    ok – just adding this here so I have everything in one place:
    How to Add an Image Field to Buddypress Extended Profile Fields

    #171196
    Artisantopia
    Participant

    ooh what about this one for the file uploads:
    https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/

    Can anyone advise which of these options works best?

    thanks

    #171193
    Artisantopia
    Participant

    What if I just set up xprofile fields in a separate profile field group? If I use a field type of multi line text box then they could enter unlimited credentials. This field could then be searched couldn’t it?

    hmmmm, but then how to get the file upload in?..

    #171192
    Artisantopia
    Participant

    https://wordpress.org/plugins/buddypress-profiles-manager/

    ok, doing some more research and I’ve found this plugin which would possibly work by only showing the credentials profile fields for the experts. I’m not using S2member, but I am looking at other membership plugins, or I assume I could just use a capability manager to create new roles….

    Yes? No? Maybe?

    ok – back to Google for some more research…

    #171135
    danbp
    Participant

    hi @famous,

    so far i know, is the registration process a fully part of WordPress who use a function called wp_create_user.
    This function requires 3 variables: name, pwd and user email to authenticate.

    As a templated plugin, BP let you handle visualy a part of this process, particulary with extended profile fields. But BP doesn’t alter the orignal registry handling. The only 2 other things you can do is to change the NAME field name and allowing synchronization between WP and BP.

    So the BP name field stays mandatory in any case and you cannot remove it.

    #171130
    envieme
    Participant

    Hi there, just nudging to see if there’s a work around or hack in BP code I can do to enforce desired x-profile visibility levels as in my case users need not have an option to choose their visibility levels. So I hope someone can point me in the right direction on how to hardcode the visibility levels for my x-profile fields in the code.

    Many thanks.

    #171107
    danbp
    Participant

    hi @applegateian,

    read here how to fetch checkbox,radio and multiselect datas

    1) give each check box a unique name
    2) create a filter function with your css items around the echo $data.
    3) add the filter to a profile action
    4) done

    #171066
    bp-help
    Participant

    @rameshwormaharjan
    I tried your plugin and it works as you describe but it would be better if the admin could edit the xprofile fields as well from the dashboard. It is inconvenient for the admin to have to switch between the dashboard to the front-end to edit the xprofile fields. If you can get the plugin to that point it would be very useful.

    #170729
    Xevo
    Participant

    Create a radio button through your profile fields, and once logged in let your theme get the profile fields data and let it decide what template parts to load.

    Thats pretty much it.

    #170589
    mattvd
    Participant

    Hi henry thanks for all of your help.

    I think I have the code somewhat working, at least it says up top viewing members 1 of 5 (I have 1 member assigned as editor). But it doesn’t pull anything like their avatar and name etc.

    http://postimg.org/image/ay8fbd23f/

    Here is my code (the part that you recommended)

    <ul id="members-list" class="item-list" role="main">
     
        <?php while ( bp_members() ) : bp_the_member(); ?>
        
        <?php 
       $user_id = bp_get_member_user_id(); 
       $user = new WP_User( $user_id );
       
       if ( $user->roles[0] != 'editor' )
       break;
    ?>
     
            <li>
                <div class="item-avatar">
                    <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
                </div>
     
                <div class="item">
                    <div class="item-title">
                        <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
     
                        <?php if ( bp_get_member_latest_update() ) : ?>
     
                            <span class="update"> <?php bp_member_latest_update(); ?></span>
     
                        <?php endif; ?>
     
                    </div>
     
                    <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
     
                    <?php do_action( 'bp_directory_members_item' ); ?>
     
                    <?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' );
                      */
                    ?>
                </div>
     
                <div class="action">
     
                    <?php do_action( 'bp_directory_members_actions' ); ?>
     
                </div>
     
                <div class="clear"></div>
            </li>
     
        <?php endwhile; ?>
    #170502
    shanebp
    Moderator

    >would it work with BP’s fields

    It should.
    You can always hard code an ID to find out.

    #170499
    trinzia
    Participant

    This is for customized comments on custom post types. The specific question is what user ID I would use, to display an xProfile field for each comment author.

    I found WP’s comment author name and link, but not ID. If I did manage to get the comment author ID somehow (haven’t managed that yet), would it work with BP’s fields?

    #170494
    Drexel82
    Participant

    This solution worked for me. Thanks.

    Rayleigh
    Participant

    And I paste my code :

    <div class="bp-widget <?php	 	 bp_the_profile_group_slug(); ?>">
    
    				<!-- <h4><?php	/* 	 bp_the_profile_group_name(); */ ?></h4> -->
    
    				<div class="profile-fields grid_7">
    					<ul>
    					<?php	 	 while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    
    						<?php	 	 if ( bp_field_has_data() ) : ?>
    
    							<li<?php	 	 bp_field_css_class(); ?>>
                                	<ul>
                                    	<li class="label"><?php	 	 bp_the_profile_field_name(); ?></li>
    									<li class="data"><?php	 	 bp_the_profile_field_value(); ?></li>
                                    </ul>    	
    							</li>
    
    						<?php	 	 endif; ?>
    
    						<?php	 	 do_action( 'bp_profile_field_item' ); ?>
    
    					<?php	 	 endwhile; ?>
    					</ul>
    				</div>
                    <div class="grid_5">
                    <?php
                    	if( function_exists('upm_single_map_display') ) : upm_single_map_display(); endif;
    				?>
                    </div>
    			</div>

    https://docs.google.com/file/d/0B__rIOiJ6Zq4MlU5WWlYQXMxLVk/edit?usp=sharing

    #170237
    marmuel
    Participant

    no common usecase?

    #170113
    wildcatdigital
    Participant

    Having the same exact problem with the website field. Textbox fields also work perfectly fine for me.

    WP 3.6
    BuddyPress 1.8.1
    BuddyPress Xprofile Custom Fields Type 1.5.7.1

    All that shows up is “This field can be seen by: …”

    🙁

Viewing 25 results - 1,476 through 1,500 (of 3,608 total)
Skip to toolbar