Replies
- Topy on March 1, 2018 at 4:56 am in reply to: Change avatar size in Member Directory page only #13626
No news
- Topy on February 22, 2018 at 6:37 am in reply to: Change avatar size in Member Directory page only #13518
Hi, Brajesh.
Already sent you an email. Did you receive it?
- Topy on February 19, 2018 at 6:36 am in reply to: Change avatar size in Member Directory page only #13479
Hello,Brajesh. The problem is I use a shordcode to display the leaderboard. And that code doesn’t seem to get it done. If I don’t use the shortcode I can get it done with that code but I have to create a table, put things in the table according to the documentation in mycred website.
To be more specific, I can you send you the theme I use or I can send you a link to the leaderboard of my website.
Thanks you.
- Topy on February 18, 2018 at 11:19 am in reply to: Change avatar size in Member Directory page only #13467
Thanks, Brajesh. But it doesn’t work.
- Topy on February 16, 2018 at 3:53 am in reply to: Change avatar size in Member Directory page only #13455
For the number2, actually mycred leaderboard comes with the theme and I use a shortcode provided from the theme to display the leaderboard. The uploaded profile picture here at the leaderboard is width 50 and height 50 by default. I’ve changed the style to
.gfy-bp-component img.avatar { width: 160px; }
But It’s not blurred like the number 1 issue. Just only the gravatar is blurred.It’s now 50 by default.
Previously, I’m done with this code
/** * Add Avatars To Leaderboard * @since 1.0 * @version 1.0 */ add_filter( 'mycred_ranking_row', 'mycredpro_add_avatars_to_leaderboard', 10, 4 ); function mycredpro_add_avatars_to_leaderboard( $layout, $template, $user, $position ) { if ( isset( $user->ID ) ) $user_id = $user->ID; elseif ( isset( $user['ID'] ) ) $user_id = $user['ID']; else return $layout; $avatar = get_avatar( $user_id, 90 ); return str_replace( '%avatar%', $avatar, $layout ); }
But this time the leaderboard comes with the theme. I don’t know where to change. The above doesn’t work. The plugin associated with mycred and this theme comes with the theme, it’s gambifly. I’ve check the template file in the plugin, it looks like this
<?php // Prevent direct script access. if ( ! defined( 'ABSPATH' ) ) { die( 'No direct script access allowed' ); } /** * @var $component_classes string Component HTML classes * @var $component_id string Component unique id * @var $shortcode_config array<string,mixed> Shortcode attributes * @version 1.0 */ $local_config = array( 'wrap' => 'tr', 'template' => "<td class='user-position'>%position%</td> <td class='user-avatar'>%user_avatar%</td> <td class='user-name'>%user_profile_link%</td> <td class='user-rank'>%user_rank_logo%</td> <td class='user-points'>%cred_f%</td>" ); $shortcode_config = array_merge( $shortcode_config, $local_config ); ?> <div class="<?php echo $component_classes; ?>"> <div class="table-responsive"> <table class="table table-condensed mycred-table gfy-table"> <thead> <tr> <th class='user-position'>#</th> <th class='user-avatar'><?php _e( 'Avatar', 'gamify' ); ?></th> <th class='user-name'><?php _e( 'Username', 'gamify' ); ?></th> <th class='user-rank'><?php _e( 'Rank', 'gamify' ); ?></th> <th class='user-points'><?php _e( 'Points', 'gamify' ); ?></th> </tr> </thead> <tbody> <?php $output = gfy_do_shortcode( 'mycred_leaderboard', $shortcode_config ); echo GFY_BP_Leaderboard_Component_Template::get_instance()->get_total() ? $output : sprintf( '<tr><td colspan="5">%s</td></tr>', $output ); ?> </tbody> </table> </div> </div>
- Topy on February 16, 2018 at 3:27 am in reply to: Change avatar size in Member Directory page only #13454
Yes, The number 1 is solved.
Thank you.
- Topy on February 15, 2018 at 4:58 pm in reply to: Change avatar size in Member Directory page only #13442
By the way, Brajesh. I also apply this one to change the default size of mysteryman, the gravatar.
define ( 'BP_AVATAR_DEFAULT', 'https://mysite.com/wp-content/uploads/2018/02/9add5c7d20fee64cb5840e37c93538e6.jpg' ); define ( 'BP_AVATAR_DEFAULT_THUMB', 'https://mysite.com/wp-content/uploads/2018/02/9add5c7d20fee64cb5840e37c93538e6.jpg' );
But it applies to the member directory page but doesn’t apply to myCred leaderboard. Do you know how to change this one too. myCred leaderboard displays top ten users by rank, avatar, points.
- Topy on February 15, 2018 at 4:52 pm in reply to: Change avatar size in Member Directory page only #13441
I’ve Done! Brajesh. Thank you very much.
- Topy on February 15, 2018 at 3:49 pm in reply to: Change avatar size in Member Directory page only #13437
If I add this one, does this apply to the one in the profile as well? Because I want to apply to the member directory page only.
define ( ‘BP_AVATAR_THUMB_WIDTH’, 80 );
define ( ‘BP_AVATAR_THUMB_HEIGHT’, 80 );
define ( ‘BP_AVATAR_FULL_WIDTH’, 250 );
define ( ‘BP_AVATAR_FULL_HEIGHT’, 250 ); - Topy on February 11, 2018 at 10:53 am in reply to: [Resolved] BuddyPress Notify Post Author on Blog Comment Conflict with BuddyPress 2.9.3 ? #13345
Thanks for your update. Now the error’s gone, thanks.