Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)

  • Florent
    Participant

    @frappi

    bp_get_group_permalink( $current_group ) . ''

    Do the job !


    Florent
    Participant

    @frappi

    This code returns no error but for some reason when I call the avatar there is nothing :

    Call :
    <?php bp_group_avatar(); ?>

    
    // Add class to Group avatar image
    function bp_add_thumbnail_class_group_avatar( $avatar) {
    	$avatar = array('class' => ' thumbnail');
    	return $avatar;
    	}
    	
    add_filter( 'bp_get_group_avatar', 'bp_add_thumbnail_class_group_avatar' );

    Florent
    Participant

    @frappi

    Thank you !


    Florent
    Participant

    @frappi

    I tested the in a different way and it works !


    Florent
    Participant

    @frappi

    Topic close as result is already formated :
    http://hookr.io/functions/bp_core_fetch_avatar/

    Usage

    $string = bp_core_fetch_avatar( $args );

    Parameters

    $args
    ( array|string ) optional – { An array of arguments. All arguments are technically optional; some will, if not provided, be auto-detected by bp_core_fetch_avatar(). This auto-detection is described more below, when discussing specific arguments.

    Returns

    string Formatted HTML element, or raw avatar URL based on $html arg.


    Florent
    Participant

    @frappi

    Hello r-a-y, thanks for your help.

    I’ve try the workaround by adding the following lines into function.php but the problem persist. I’m not familiar with BP and I hope my test is correct.

     
    function your_theme_cover_image_css( $settings = array() ) {
        /**
         * If you are using a child theme, use bp-child-css
         * as the theme handel
         */
        $theme_handle = 'bp-child-css';
     
        $settings['theme_handle'] = $theme_handle;
     
        /**
         * Then you'll probably also need to use your own callback function
         * @see the previous snippet
         */
         $settings['callback'] = 'bp_legacy_theme_cover_image';
         
        return $settings;
    }
    add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'your_theme_cover_image_css', 10, 1 );
    add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'your_theme_cover_image_css', 10, 1 );

    Florent
    Participant

    @frappi

    Have you asked this premium themes authors/developers about this issue?

    To be honnest I haven’t a regular licence for this theme so I cannot expect technical support.


    Florent
    Participant

    @frappi

    Please find portion of my home.php that may fire the cover image :

    <div id="item-header" role="complementary">
    
                  <?php
                  /**
                   * If the cover image feature is enabled, use a specific header
                   */
                  if ( version_compare( BP_VERSION, '2.4', '>=' ) && bp_displayed_user_use_cover_image_header() ) :
                      bp_get_template_part( 'members/single/cover-image-header' );
                  else :
                      bp_get_template_part( 'members/single/member-header' );
                  endif;
                  ?>
    
              </div>

    According to this, file cover-image-header.php loads the cover image but it is strange because as you can see this file display directly the avatar image. The div item-header-avatar is inside in item-header.

    <?php
    
    /**
     * BuddyPress - Cover Header
     *
     * @package BuddyPress
     * @subpackage bp-legacy
     */
    
    ?>
    
    <?php
    
    /**
     * Fires before the display of a member's header.
     *
     * @since 1.2.0
     */
    do_action( 'bp_before_member_header' ); ?>
    
    	<div id="item-header-avatar" class="rounded">
    		<a href="<?php bp_displayed_user_link(); ?>">
    
    			<?php bp_displayed_user_avatar( 'type=full' ); ?>
    
    		</a>
    		<?php do_action('bp_member_online_status', bp_displayed_user_id()); ?>
    	</div><!-- #item-header-avatar -->

    Florent
    Participant

    @frappi

    Hello,

    Yes theme/buddypress/css/ refers to a BP ready theme (Kleo).

    styles written to the head of a document within style tags

    Thx I didn’t know that.


    Florent
    Participant

    @frappi

    bp_is_group_home() Good


    Florent
    Participant

    @frappi

    I founded where it is, there is another file in bp-groups folder.


    Florent
    Participant

    @frappi


    Florent
    Participant

    @frappi

    Hello,

    Could you please tell me if BP 2.4.3 offer a possibility to integrate BP user profile in UI registration process or profile edit ?

    Thank you, Florent

Viewing 13 replies - 1 through 13 (of 13 total)
Skip to toolbar