Forum Replies Created
-
Hi @mosesyoon,
If you find the file that is creating the avatar picture, wrapping the avatar code in something like this might work:
<a href="<?php bp_displayed_user_link(); ?>">AVATAR PICTURE FUNCTION/CODE HERE</a>Example below is from the buddypress cover-image-header.php file. Once you have found the file, ensure that you copy it into your child theme before making modifications.
<div id="item-header-avatar"> <a href="<?php bp_displayed_user_link(); ?>"> <?php bp_displayed_user_avatar( 'type=full' ); ?> </a> </div>(not really familiar with the blog side as i don’t use it nor do i know your site setup, so this approach is more a shot in the dark)
In reply to: Activity Sticky Plugin🙂
In reply to: Activity Sticky PluginThis seems to do it. Add to your style.css file:
1. Changes the avatar container size to match the photo size of the rest:
#activity-sticker .avatar { width: 64px; height: 64px; }2. Moves the content up alongside to match style of the others below
#activity-sticker .activity-content { float: left; margin: 0 0 0 30px; }In reply to: Display notificationsMay be what you are looking for:
(See the later posts in the feed starting around 2-3 weeks ago)
In reply to: Total number of activity update posts by userhaha great, thanks @danbp, works like a charm.
I’ll definitely bear the speed issue in mind.
Was considering using it as part of a gamification feature, ie. 100 posts, get a badge. 50 favourited posts, get a badge, etc.
In reply to: BP_AVATAR_DEFAULT_THUMB issueYeah I’ve got both lines in there already. Double checked by commenting out mine and copy paste yours too. To no avail though.
Altering the thumbnail size (width/height) etc is fine, the defines work for those for both the full size and the thumb size. Its just changing the actual image of the thumbnail using
define ( 'BP_AVATAR_DEFAULT_THUMB', $img_url );.Came across this post from a couple of years ago where Henry has had the same issue it seems. Don’t know if it got resolved…
https://buddypress.org/support/topic/bp_avatar_default_thumb-broken/
In reply to: BP_AVATAR_DEFAULT_THUMB issueHi @danbp,
Thanks for reply. Yeah I’ve already got the gravatar code in bp-custom and all the define’s here work fine apart from the
BP_AVATAR_DEFAULT_THUMBfor some reason.Is
define ( 'BP_AVATAR_DEFAULT', $img_url );supposed to change thumbnail avatars too as that is what is happening (which seems to compensate for the thumb define not working but is odd)?In addition to that, are there equivalents for setting the cover-image dimensions? The closest I have come across is the filter
apply_filters( 'bp_attachments_get_cover_image_dimensions', $wh, $settings, $component );. Is that the right one to use?Cheers
In reply to: Names show twice on the profile cover imageGreat 🙂
Just remember (if you don’t know already) that when modifying code, do it in a child theme otherwise the next time you update your theme/plugins, your modifications are lost. But glad you sorted it!
In reply to: Missing Add Friend ButtonI’m not on Skype 🙂 .
Glad it worked in the end.
In reply to: Names show twice on the profile cover imageThe easiest way is to probably just use CSS on the ID of the name you wish to remove and insert into your style.css file:
#id { display: none; }(find the ID using your browser’s developer tools).
The other option is to find the file creating the second name using its ID and delete the code creating it. If it’s BuddyPress then copy the file into your child theme first before deleting. If it’s your bp-cover plugin creating it, then the approach with CSS is probably easiest.
The code doesn’t remove the bar, it just removes the WordPress logo in the top left.
The code is put in your functions.php file. It is a file you create (if you haven’t already done so) and put in your child theme folder.
If you mean the WP bar at the top of the screen, then this might help. Add to functions.php
function remove_wp_logo( $wp_admin_bar ) { if ( !current_user_can( 'administrator' ) && !is_super_admin() ) { $wp_admin_bar->remove_node( 'wp-logo' ); } } add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );This will remove the WordPress Logo (and therefore the dropdown menu that appears with the link to WordPress.org). If you just want to remove the WordPress.org link in that menu then replace
'wp-logo'with'wporg'in the function above.In reply to: Disable All RSS Feeds – updateAhhh thanks @estepix!
In reply to: Missing Add Friend ButtonHaven’t encountered that problem myself so wouldn’t really know where to start. The code above does work fine with notifying the person you are trying to be friends with (I’ve just double checked on my project).
Might even be a conflict with something in your theme or another plugin you are using. You could also try disabling other plugins to check if that is an issue and switching themes to one of the WordPress default themes to see if it works as it should.
Only other suggestion I can give is to start a new forum thread and maybe someone else has encountered that issue.
In reply to: How to make the admin bar transparent?You too 🙂
In reply to: Missing Add Friend ButtonMaybe ask the wplms authors for help as to why your cover images aren’t working? I haven’t used that theme so can’t help there.
Glad you finally got there!
In reply to: How to make the admin bar transparent?Yeah it’s possible 🙂 (assuming that the bit you are talking about is the one im thinking of haha).
Two methods:
1. CSS
li#wp-admin-bar-site-name { display: none; }2. Add this to functions.php file
function remove_site_name( $wp_admin_bar ) { $wp_admin_bar->remove_node( 'site-name' ); } add_action( 'admin_bar_menu', 'remove_site_name', 999 );Both will hide the word for both ALL users including admins (I prefer the second but its up to you).
If you want to leave the word Pretitude there for admins only to access the dashboard then adding an if statement into the function (similar to the one in the
remove_admin_bar()function) should work.Hope it works!
In reply to: Missing Add Friend ButtonSo you are using cover images but they aren’t working? Or do you just mean the button isn’t appearing?
Since you are using cover images the second code segment (number 2 above) needs to be placed in cover-image-header.php . It won’t appear if you put it in member-header.php because that is for profiles when you haven’t activated the use of cover images.
That’s correct it won’t be in your child theme unless you’ve already put it there to make modifications. So it sounds like you need to copy the cover-image-header.php into your child theme following the same file structure. Something like:
mychildtheme>buddypress>members>single
(it goes in the single folder).
Hopefully you’ll see the button now
In reply to: Missing Add Friend ButtonDo you have cover images active?
If so the file you want is cover-image-header.php .
In reply to: Disable All RSS Feeds – updateThanks @estepix,
Any ideas why the WP hook wasn’t working for this?
(My site not live yet so unable to test, but been looking into the search engine etc site crawling for when it is)
In reply to: Missing Add Friend ButtonHi @pedrohgl18,
and another in single.php child theme too.
Do you mean you used the same code twice? i.e. one in functions.php and one in single.php?
1. This code goes in either your bp-custom.php or functions.php (preferably the bp-custom.php):
function add_another_friend_button() { $user_id = get_the_author_meta( 'ID' ); $mybutton = bp_add_friend_button( $user_id ); if ( ( is_user_logged_in() && ! bp_is_my_profile() ) ) { echo $mybutton; } } add_action( 'button_here', 'add_another_friend_button' );2. Then insert the code below into the file where you wish your button to appear:
<div id="another-friend-button"> <?php do_action( 'button_here' ); ?> </div><!-- #another-friend-button -->In reply to: How to make the admin bar transparent?Also to remove the bar itself for non admins put this in your functions.php :
function remove_admin_bar() { if ( !current_user_can( 'administrator' ) && !is_super_admin() ) { show_admin_bar(false); } } add_action( 'after_setup_theme', 'remove_admin_bar' );In reply to: How to make the admin bar transparent?You can remove access to the WP admin bar by non admins using this in your functions.php file:
function restrict_dashboard_access() { if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { wp_redirect( home_url() ); exit; } } add_action( 'init', 'restrict_dashboard_access' );In reply to: How to make the admin bar transparent?🙂
In reply to: How to make the admin bar transparent?Adding this to your style.css in child theme should work:
#wpadminbar { background: transparent; }