Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,751 through 1,775 (of 5,755 total)
  • Author
    Search Results
  • #234714
    friloo
    Participant

    Hello,

    sry for my bad english but i am from Germany.
    I use WordPress 4.1 and Buddypress 2.2.1….

    Now i want to enable HTML for profile fields, because the user want to iframe some soundcloud players. i know it’s a problem fpr security, but thats no problem because only 10 users are allowed tu have a profile.

    i’ve tried to enable html for this fields on this way in the bp-custom.php but i only geht a white site.

    function stuff_i_want_triggered_after_bp_loads(){
    
    remove_filter( 'xprofile_get_field_data', 'wp_filter_kses', 1 );
    
    }
    
    add_action('wp', 'stuff_i_want_triggered_after_bp_loads');

    any idea what i can try now? I really want to enable html.

    kind regards
    friloo

    #234700
    Matthias
    Participant

    I think @azinfiro had the same problems a few month ago.
    Seems it is the normal buddypress behavior, not to show the wordpress fields
    https://buddypress.org/support/topic/wp-profile-fields-not-editable-in-bp-profile/

    This is a bit strange, cause I can change the wordpress fields in bbpress but not in buddypress?!?!
    Makes no sense to me!

    Thanks
    Matthias

    #234693
    shanebp
    Moderator

    You don’t need to touch any core files to add an Order By.

    Example for adding a Contributor option, put in bp-custom.php or theme/functions.php

    // add order options to members loop
    function ch_member_order_options() {
    ?>
       <option value="contributing"><?php _e( 'Contributing Members', 'buddypress' ); ?></option>
    <?php
    }
    add_action( 'bp_members_directory_order_options', 'ch_member_order_options' );
    
    // filter ajax members by contributing
    function ch_filter_ajax_querystring( $querystring = '', $object = '' ) {
    
    	if( $object != 'members' )
    		return $querystring;
    
    	$defaults = array(
    		'type'            => 'active',
    		'action'          => 'active',
    		'scope'           => 'all',
    		'page'            => 1,
    		'user_id'         => 0,
    		'search_terms'    => '',
    		'exclude'         => false,
    	);
    
    	$ch_querystring = wp_parse_args( $querystring, $defaults );
    
    	if( $ch_querystring['type'] == 'contributing' ) {
    	
    // to get members by xprofile field, you need some custom sql here
    // here's an example: 
    //https://codex.buddypress.org/developer/loops-reference/the-members-loop/#code-examples
    
    		$users = get_users( array( 'fields' => array( 'ID' ), 'role' => 'contributor' ) );
    		
    		$users_str = '';
    		foreach ( $users as $user ) {
    	             $users_str .=  $user->ID . ',';
    	        }
    		$users_str = rtrim($users_str, ",");
    
    		$ch_querystring['include'] = $users_str; 
    		$ch_querystring['type'] = 'alphabetical'; 
    		
    		return $ch_querystring;
    		
    	}	
    	
    	else
    		return $querystring;
    			
    }
    add_filter( 'bp_ajax_querystring', 'ch_filter_ajax_querystring', 20, 2 );
    MattPurland
    Participant

    Warning in advance: I rarely, if ever, use WP – so please bare with me, and I apologise if any of my terminology is way off base!

    I’m using BuddyPress Profile Search (BPS) for member searches and the initial search form I’ve created works as expected, but when using AJAX to get more results a specific BP filter (bp_pre_user_query_construct) that needs to run is missing. This filter is used to run a function that modifies the BP_User_Query object by adding IDs to ‘include’, based on the BPS form fields.

    When I say ‘missing’, I mean it’s not part of the $wp_filters array when do_action_ref_array is executed to trigger the filter (line 171 of bp-core-classes.php). I found this when debugging the do_action_ref_array function, if I debug the code at line 556 (the if statement that locates the filter in $wp_filters) it returns due to not being found, and so isn’t executed.

    I really hope that makes sense to someone. I’m not sure why this specific filter is missing, as it seems the rest do exist (or a lot of them do).

    Any help would be appreciated!

    #234672
    mikewelsh
    Participant

    I am using the SweetSate theme, a dating/matching theme which is built on Buddypress.

    Instead of people searching for people with profile fields, I want to match people with universities/colleges.

    I have my colleges entered in through my admin.

    I want students to register on the site but I do not want them visible to anybody else.

    I only want the universities/colleges to be visible.

    How can I do this?

    In the search box for University Locations I can have Medchool – UK or Medschool – Overseas, but it also includes a null/blank field. I want blank fields in all the other search fields but not this one. If all the fields are blank it finds and displays all members.

    Site can be seen here: http://hotzoc.com/medical-schools/

    I have colleges registered as site role contributors and site users who sign up as subscribers.

    Is there any way I can restrict the search only to my ‘contributors’ group not the ‘subscribers’ group?

    I want users registered if possible so I can contact them and monitor their profile preferences. I cannot do this if I do not allow registration and just have my colleges as the only registered users.

    Any ideas or help greatly appreciated.

    #234671
    Matthias
    Participant

    hi @danbp,
    I’m using the plugin version of bbpress. And it’s running fine.
    I can edit all fields from the backend in the frontend, too under
    http://exampample.com/forums/users/USER/edit

    In buddypress I can access the users profile and I can set the password and the email notifications
    BUT
    there is no way to change the “public name” and the “website field” oder the “biographical info”
    For editing this, the user has to go to the backend!!!

    Thanks
    Matthias

    #234575
    danbp
    Participant

    Hi @myg0t,

    you do it wrong. WP auto embeds youtube videos automagically (and over 40 other online video providers). In a post or topic or mention, simply copy/paste the video URL, and it’s done.

    xprofile use a form with different fields. Because these fields are striped for security reason (classic form security), you can’t embed videos like previously described.

    But there is a URL field type ?
    Yes, this let you enter a video url, but the field will render the URL, not the embed action. It’s a form field and it’s striped.

    So what ?
    We will use a normal text field, and will only enter an alpha numeric value.

    How can i do this ?

    As example, we gona use this video https://www.youtube.com/watch?v=TZPN9g2pmPQ

    And to show the video on a profile, we’ll use only the doc ID: TZPN9g2pmPQ

    By entering this kind of text in a profile field, it is not striped and will be handled like an ordinary text field and throwed to DB with his filed ID and field value.

    To embed the video, we also have to add what WP does on a blog, but not on xprofile page, an iframe to control the video output, so it can be streamed correctly and be read by browsers.

    Now we first create a new field and name it Spotlight (or what ever). No matter where, you can use the Base group or any other custom group.
    We select the field type and give it a single text area type.
    Save.

    We go on a profile to modify it and enter TZPN9g2pmPQ in regard of Spotlight.
    Save.

    And voilà ! The video is correctly embeded and displayed.

    As usual for customisation, we’ll use a snippet which we put into bp-custom.php

    function set_video_field( $field_value ) {
    	$bp_this_field_name = bp_get_the_profile_field_name();
    	// field name (case sensitive)
    	if( $bp_this_field_name == 'Spotlight' ) {
    		$field_value = strip_tags( $field_value );
            // building the HTML and h/w of the iframe
    		$field_value = '<iframe width="420" height="315" src="http://www.youtube.com/embed/'.$field_value.'" frameborder="0" allowfullscreen></iframe>';
    	}
    	return $field_value;
    }
    add_filter( 'bp_get_the_profile_field_value','set_video_field');

    Caution: do not remove the iframe, or video won’t work.

    Hope this help.

    #234572
    Myg0t
    Participant

    Hi there guys. I posted about this a few months ago, but the topic was closed, so i’ll have to create a new one.

    I had gotten quite a few helpful responses but wasn’t able to get it working. Decided to take another look at it and i’ve gotten it sort-of working…

    So…

    In my plugins/bp-custom.php i’ve got the line

    add_filter('bp_get_the_profile_field_value','wp_oembed_get');

    this works, but only partially. It allows the video to be embeded into the Spotlight field; but at the same time strips away all the text from the other fields. So it seems that the filter is attempted to embed all the fields.

    As a remedy, i’m working with this code that was suggested to me:

    function bp_youtube_in_profile(){
    add_filter('bp_get_the_profile_field_value','bp_enable_youtube_in_profile',9,3);
    }
    add_action('bp_init','bp_youtube_in_profile',0);
    
    function bp_enable_youtube_in_profile($val,$type,$key){
    $field = new BP_XProfile_Field($key);
    $field_name = $field->name;
    $val = strip_tags($val);
    if(strtolower($field_name) == 'Spotlight'){
    return wp_oembed_get($val,array('width'=>300));
    }
    return $val;
    }

    but this particular bit of code doesn’t want to work. Does the code look right to you guys?

    Can someone explain to me how $val,$type, and $key in function bp_enable_youtube_in_profile($val,$type,$key) comes from?

    Thanks for all of yall’s support!
    M

    #234560
    nunolopes99
    Participant

    Hi,
    I’m trying to show all members filtered by a specific Xprofile Field. The field type, in this case, is a multiselectbox.

    I check the topic Members Loop and tried the following code:

    <?php if ( bp_has_members( my_custom_ids( 'name_of_the_multiselect_box' ) ) ) : ?>

    The code works fine in text fields but not multiselectboxe’s.

    Any help?

    danbp
    Participant

    hi @dzagya,

    The new BuddyPress comes with SocialMedia fields encoded into the xProfile, and display with the Base profile fields.

    Is this gonna require a .php hack? – if so anyone got any tips for me?

    or does anyone know a good plugin to handle this?

    BuddyPres hasn’t social fields in the Base xprofile field group. There is only one field which is [username] !

    Check one of your plugin or your theme setings. Or maybe a custom function…
    Give details. Theme & used plugins for example.

    dzagya
    Participant

    hey there,
    I’m using buddypress 2.2, WordPress 4.n – nice work by the way!

    The new BuddyPress comes with SocialMedia fields encoded into the xProfile, and display with the Base profile fields.

    Is there any way to get the social media links to
    1. Display in their own group, not the Base group.
    2. To only display if they are populated?

    Is this gonna require a .php hack? – if so anyone got any tips for me?

    or does anyone know a good plugin to handle this?

    thanks in advance

    Dan

    ch1n3s3b0y
    Participant

    Hi

    How/Is is possible to limit the search box to a particular ‘member-type’. Seems like something that would be useful since member types have now been introduced.

    I am trying to get my head around the AJAX search of BuddyPress as I want to create some search filters so that visitors can filter members based on XProfile fields without having to reload the page, but finding it hard to get my head around it.

    ch1n3s3b0y
    Participant

    Hi

    I’ve found a number of BuddyPress search plugins, but nothing that seems to filter members by their XProfile fields. I’m looking to create an AJAX filter so users can refine the list of users on the page without having to reload everything. Any pointers on how to do this or any posts you know of where someone has already done this?

    #234337
    cozy35
    Participant

    I have created 5 user field groups. When a user signs up the group 1 (Base/Primary) group is presented after which the process is complete and the user then will have to complete his/her profile from edit profile when logged in again.

    The problem is that I have more than 80% incomplete profiles on my website.

    I would like to know if anyone has written a custom script register.php to be used in a child theme to modify the process…:-

    When the ne subscriber clicks the save and continue from the signup (which includes the Base/Primary fields), then be redirected to the next group (group2) and then from there to group3, etc?

    Some pointers for this or a plugin that already exist will be appreciated.

    #234296

    In reply to: [Resolved] Bug?

    shanebp
    Moderator

    It’s not a bug. Read this.

    #234290
    AR2015
    Participant

    BP XProfile Number Field

    how can i write an action to hook into this field so that its limited by an integer (of say 20) and non-negative?

    /**
     * Number xprofile field type.
     *
     * @since BuddyPress (2.0.0)
     */
    class BP_XProfile_Field_Type_Number extends BP_XProfile_Field_Type {
    
    	/**
    	 * Constructor for the number field type
    	 *
    	 * @since BuddyPress (2.0.0)
     	 */
    	public function __construct() {
    		parent::__construct();
    
    		$this->category = _x( 'Single Fields', 'xprofile field type category', 'buddypress' );
    		$this->name     = _x( 'Number', 'xprofile field type', 'buddypress' );
    
    		$this->set_format( '/^\d+|-\d+$/', 'replace' );
    		do_action( 'bp_xprofile_field_type_number', $this );
    	}
    function bp_xprofile_get_field_types() {
    	$fields = array(
    		'checkbox'       => 'BP_XProfile_Field_Type_Checkbox',
    		'datebox'        => 'BP_XProfile_Field_Type_Datebox',
    		'multiselectbox' => 'BP_XProfile_Field_Type_Multiselectbox',
    		'number'         => 'BP_XProfile_Field_Type_Number',
    		'url'            => 'BP_XProfile_Field_Type_URL',
    		'radio'          => 'BP_XProfile_Field_Type_Radiobutton',
    		'selectbox'      => 'BP_XProfile_Field_Type_Selectbox',
    		'textarea'       => 'BP_XProfile_Field_Type_Textarea',
    		'textbox'        => 'BP_XProfile_Field_Type_Textbox',
    	);
    danbp
    Participant

    Hi @sbraiden,
    if you enter love,apple,pie it’s considered as a list, because words separated by commas are list eleents in form (extended profile fields are in a form). If you enter i love apple pie and muffins, but also spaghetti. it’s mostly not linked, except for one of the words before a ponctuation. Or the first word, or the last word in other case. I’ve never tested this precisely.

    For the URL not showing, do you use the URL field type ? Have you tried with a single line textarea, just to see if this makes a difference.

    Also important to know, when you enter an URL on front-end (field type URL on), you have to enter the full URL, http included. If you enter only http://www.sometinhg or example.com, it’s not valid and will be linked like other words to user profile.

    ckchaudhary
    Participant

    fields assigned with the URL type – they never show up once data is entered.

    Must be something in your theme/plugins. It works by default.

    text fields – data entered is being displayed with links added to words and phrases, linking to them as members.

    Yeah buddypress does it deliberately. The purpose is to show/search all members who have entered same value in any of the fields.
    You can disable it by adding following line of code in bp-custom.php or in your theme’s functions.php:
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );

    Susan Braiden
    Participant

    I’m using Commons-in-a-Box 1.0.9 on a WordPress 4.1 self-hosted site. While I was using the native Infinity theme this past year, I’ve recently switched to the WPMU Dev “Studio” theme.

    I’ve started to use the BuddyPress Extended Profile Fields and groups, and find them incredibly useful. I’m running into an odd problem, however, on data entered into 2 types of fields:

    1) fields assigned with the URL type – they never show up once data is entered.

    2) text fields – data entered is being displayed with links added to words and phrases, linking to them as members.

    The latter issue has me baffled. There seems to be no rhyme or reason to what it’s picking out of the data to add links to, or why.

    Has anyone else come across either of these field issues before? If so, how did you solve them?

    Thanks a bunch for any wisdom folks might be able to share in helping me troubleshoot this!

    Sue.

    #234249
    Richgilberto
    Participant

    I would love to bump this one. I have a site that I’d like to push live soon; there are many extended profile fields that I would like to be part of the “directory” for people to search through.

    Specifically, the site is for a specific field where contractors are always looking for work, and potential employers will be able to filter by location, software experience, and job title.

    I’m sure this exists somewhere out there but I have yet to find it.

    Thanks for your time!

    #234120

    In reply to: Noob recommendations

    danbp
    Participant

    I published some BuddyPress use case, see here: http://bp-fr.net/realisations/
    There is also a category called showcase with some other examples.
    This will hopefully help you to see how BP is and can be used.

    – separating users is now possible with member_type (see codex)
    – scheduling is not avaible in BP, but thought there are some plugins for this (search on WP repo)
    – conditionnal xprofile fields is a popular question on the forum. You’ll probably find some discussion here.

    BuddyPress is first of all a great and awesome tool for building communities around the members.

    evitorino
    Participant

    My wordpress is 4.1 and Buddypress 2.1.1

    Hello Community,

    I am having a problem with a custom member page pagination, when clicking link to pagination page 2, pagination takes us to page 2 and adds the string “?upage=2” to the site URL.

    After that, clicking page 1 or back symbol on pagination links does nothing, only refreshes page.

    Problematic page: http://wp1.kodeserver.net/coach/
    I have set the page above in Twentyfifteen theme as to exclude any third party theme related errors.

    If we use the default member page “http://wp1.kodeserver.net/members/&#8221; then pagination works ok.

    I believe the error might be caused by the member filter i made or maybe i messed up the template.

    Hope you can help.

    Below is the code i am using:

    functions that i use to filter member loop by member types on the site:

    function bp_exclude_users_but_player() {
    $excluded_users_but_player = implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_player;
    }

    function bp_exclude_users_but_coach() {
    $excluded_users_but_coach = implode(',',get_users('role=player&fields=ID'));
    //$excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_coach;
    }

    function bp_exclude_users_but_senior_coach() {
    $excluded_users_but_senior_coach = implode(',',get_users('role=player&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_senior_coach;
    }

    function bp_exclude_cc_backend_users() {
    $excluded_cc_backend_users = implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_cc_backend_users;
    }

    Member Loop that calls member “Coach” filter:
    <?php if ( bp_has_members( bp_ajax_querystring( 'members').'&exclude='.bp_exclude_users_but_coach().'&per_page=24' ) ) : ?>

    And this is the problematic page template code (The one that filters by role type (coach))

    <?php
    /**
    * The template for displaying all pages
    *
    * This is the template that displays all pages by default.
    * Please note that this is the WordPress construct of pages and that
    * other 'pages' on your WordPress site will use a different template.
    *
    * @package WordPress
    * @subpackage Kleo
    * @since Kleo 1.0
    */

    get_header(); ?>

    <?php get_template_part('page-parts/general-title-section'); ?>

    <?php get_template_part('page-parts/general-before-wrap'); ?>

    <?php
    if ( have_posts() ) :
    // Start the Loop.
    while ( have_posts() ) : the_post();
    /*
    * Include the post format-specific template for the content. If you want to
    * use this in a child theme, then include a file called called content-___.php
    * (where ___ is the post format) and that will be used instead.
    */
    get_template_part( 'content', 'page' );
    endwhile;
    endif;
    ?>

    <?php do_action( 'bp_before_directory_members_page' ); ?>
    <section class="container-wrap main-color">
    <div class="section-container container">

    <div id="buddypress">

    <?php do_action( 'bp_before_directory_members' ); ?>

    <?php do_action( 'bp_before_directory_members_content' ); ?>

    <!--<div id="members-dir-search" class="dir-search" role="search">
    <?php //bp_directory_members_search_form(); ?>
    </div>--><!-- #members-dir-search -->

    <?php do_action( 'bp_before_directory_members_tabs' ); ?>

    <form action="" method="post" id="members-directory-form" class="dir-form">

    <div id="subnav" class="item-list-tabs" role="navigation">

      <!--<li class="selected" id="members-all">"><?php //printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?>--> <!--Contatore membri totali-->

      <?php //if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
      <!--<li id="members-personal">"><?php //printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>-->
      <?php //endif; ?>

      <?php //do_action( 'bp_members_directory_member_types' ); ?>

      <?php //do_action( 'bp_members_directory_member_sub_types' ); ?>

      <!--<li id="members-order-select" class="last filter">
      <label for="members-order-by"><?php //_e( 'Order By:', 'buddypress' ); ?></label>
      <select id="members-order-by">
      <option value="active"><?php //_e( 'Last Active', 'buddypress' ); ?></option>
      <option value="newest"><?php //_e( 'Newest Registered', 'buddypress' ); ?></option>

      <?php //if ( bp_is_active( 'xprofile' ) ) : ?>
      <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
      <?php //endif; ?>

      <?php //do_action( 'bp_members_directory_order_options' ); ?>
      </select>
      -->

    </div><!-- .item-list-tabs -->

    <div id="members-dir-list" class="members dir-list">

    <?php

    /**
    * BuddyPress - Members Loop
    *
    * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter()
    *
    * @package BuddyPress
    * @subpackage bp-legacy
    */

    ?>

    <?php if ( bp_has_members( bp_ajax_querystring( 'members').'&exclude='.bp_exclude_users_but_coach().'&per_page=24' ) ) : ?>

    <div id="pag-top" class="pagination">
    <div class="pag-count" id="member-dir-count-top">
    <?php bp_members_pagination_count(); ?>
    </div>
    <div class="pagination-links" id="member-dir-pag-top">
    <?php bp_members_pagination_links(); ?>
    </div>
    </div>

    <?php do_action( 'bp_before_directory_members_list' ); ?>

    <ul id="members-list" class="item-list row kleo-isotope masonry">

    <?php while ( bp_members() ) : bp_the_member(); ?>

    <?php $user_info = get_userdata(bp_get_member_user_id()); ?>
    <?php
    $user_roles = $user_info->roles;
    $user_role = array_shift($user_roles);

    // echo 'User ID: ' . $user_info->ID . "\n";
    // echo bp_core_get_user_displayname( $user_info->ID ) ;
    // echo $user_info->ID ;
    ?>

    <li class="kleo-masonry-item type-<?php echo $user_role; ?>">

    ID ; ?>' value='show/hide'> <!-- link che apre info's nascoste -->

    <div class="member-inner-list animated animate-when-almost-visible bottom-to-top">

    <div class="item-avatar rounded">
    <!--
    ">
    --> <?php bp_member_avatar( 'type=full&height=150&width=150' ); ?>
    <!--
    -->
    <?php //do_action('bp_member_online_status', bp_get_member_user_id()); ?>
    </div>
    <!-- "> -->
    <div class="item">
    <div class="item-title"><span class="loop-nome"><?php bp_member_name(); ?></span><span class="loop-cognome"><?php bp_member_profile_data( 'field=Cognome' ); ?></span></div>

    <!-- <?php if ( bp_get_member_latest_update() ) : ?>
    <span class="update"> <?php bp_member_latest_update(); ?></span>
    <?php endif; ?>
    -->
    <?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><!--end member-inner-list-->
    <!-- link che apre informazioni nascoste -->
    <div id="contenuto-nascosto-<?php echo $user_info->ID ; ?>" class="hidden-infos">
    <div class="nascondi-infos">
    ID ; ?>' value='show/hide'>
    <i class="icon-cancel"></i>

    </div>
    <div class="unhidden-infos unhidden-infos-first ">
    <div class="item-avatar-small">
    ">
    <?php bp_member_avatar( 'type=full&height=50&width=50' ); ?>

    <?php do_action('bp_member_online_status', bp_get_member_user_id()); ?>
    </div>
    </div>
    <div class="unhidden-infos">
    <div class="item-title">
    ">
    <span class="loop-nome"><?php bp_member_name(); ?></span>

    ">
    <span class="loop-cognome"><?php bp_member_profile_data( 'field=Cognome' ); ?></span>

    </div>
    </div>
    <div class="unhidden-infos">
    <span class="nomeazienda-titolo custom-title">Azienda:</span>
    <span class="nomeazienda custom-infos"><?php bp_member_profile_data( 'field=Azienda' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="pos-lavorativa-title custom-title">Funzione:</span>
    <span class="pos-lavorativa custom-infos"><?php bp_member_profile_data( 'field=Funzione' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="settore-title custom-title">Settore:</span>
    <span class="settore custom-infos"><?php bp_member_profile_data( 'field=Settore' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="laurea-title custom-title">Laurea:</span>
    <span class="laurea custom-infos"><?php bp_member_profile_data( 'field=Laurea' ); ?></span>
    </div>

    <div class="action">

    <div class="generic-button" id="send-private-message">
    " title="Clicca per profilo completo" class="send-message">Profilo Completo
    </div>

    <?php //do_action( 'bp_directory_members_actions' ); ?>

    </div>
    </div>

    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery('#nascondi-mostra-<?php echo $user_info->ID ; ?>').live('click', function(event) {
    jQuery('#contenuto-nascosto-<?php echo $user_info->ID ; ?>').toggle('show');
    });
    });
    </script>

    <?php endwhile; ?>

    <?php do_action( 'bp_after_directory_members_list' ); ?>

    <?php bp_member_hidden_fields(); ?>

    <?php else: ?>

    <div id="message" class="info">
    <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
    </div>

    <?php endif; ?>

    <?php do_action( 'bp_after_members_loop' ); ?>

    </div><!-- #members-dir-list -->

    <?php do_action( 'bp_directory_members_content' ); ?>

    <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>

    <?php do_action( 'bp_after_directory_members_content' ); ?>

    </form><!-- #members-directory-form -->

    <?php do_action( 'bp_after_directory_members' ); ?>

    </div><!-- #buddypress -->

    </div>
    </section>

    <?php do_action( 'bp_after_directory_members_page' ); ?>

    <?php get_template_part('page-parts/general-after-wrap'); ?>

    <?php get_footer(); ?>

    MastodontMedia
    Participant

    Is there a way to display more profile fields in the member list?
    By default it seems like the first field in BASE is the only one displaying in the member list.

    #233540

    In reply to: How to create template

    djsteveb
    Participant

    I think you are playing with the old bp default theme files which are no longer being used(?)

    see – https://codex.buddypress.org/themes/bp-default-theme-moving-forward-with-bp-1-9/

    and perhaps -> https:// codex.buddypress .org/themes/

    although I am pretty sure a bunch of the info on that buddypress .org / themes is talking about the old ways of doing things.. so check dates.. I think a bunch of that info is deprecated… however you may find what you are looking for in the codex..

    maybe what you are looking for in relation to profiles is touched on here: https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/

    #233528
    shanebp
    Moderator

    Nice hat.

    Yes, the use ofbp_field_has_data() can be a bit confusing.
    Remember that in this context, rather than check the field value, it checks if there is data in the visibility setting for that field – which will always be true.
    And bp_the_profile_field_value will be NULL for the same reason.

    Try this:

    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    	<?php 
    	$this_field = xprofile_get_field_data( bp_get_the_profile_field_id(), bp_displayed_user_id(), 'comma' ); 
    	if( !empty( $this_field ) ) :
    	?>
    	   <tr <?php bp_field_css_class(); ?>>
    		<td class="field-name"><?php bp_the_profile_field_name(); ?></td>
    		<td class="field-visibility"><?php bp_profile_settings_visibility_select(); ?></td>
    	   </tr>
    	<?php endif; ?>
    <?php endwhile; ?>
Viewing 25 results - 1,751 through 1,775 (of 5,755 total)
Skip to toolbar