Henry
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Changing username on www.ads-software.comIf you hover over my avatar and then look at the bottom left hand corner of the browser window you’ll see what I mean
Forum: Themes and Templates
In reply to: Is author name displayed in TwentyTwelve?paulwpxp, this is exactly what i was trying to find out. Thanks for your help!
Forum: Plugins
In reply to: [BuddyPress Follow] Using an image instead of text on follow buttonsHumm, spoke slightly too soon. Although it is working on the profile page, the button isn’t displayed at all in the members loop.
Forum: Plugins
In reply to: [BuddyPress Follow] Using an image instead of text on follow buttonsOK managed to filter the button properly now.
function custom_follow_button( $button ) { global $bp, $members_template; $defaults = array( 'leader_id' => bp_displayed_user_id(), 'follower_id' => bp_loggedin_user_id() ); $r = wp_parse_args( $args, $defaults ); extract( $r ); if ( !$leader_id || !$follower_id ) return false; // if we're checking during a members loop, then follow status is already queried via bp_follow_inject_member_follow_status() if ( !empty( $members_template->member ) && $follower_id == bp_loggedin_user_id() && $follower_id == bp_displayed_user_id() ) { $is_following = $members_template->member->is_following; } // else we manually query the follow status else { $is_following = bp_follow_is_following( array( 'leader_id' => $leader_id, 'follower_id' => $follower_id ) ); } // if the logged-in user is the leader, use already-queried variables if ( bp_loggedin_user_id() && $leader_id == bp_loggedin_user_id() ) { $leader_domain = bp_loggedin_user_domain(); $leader_fullname = bp_get_loggedin_user_fullname(); } // else we do a lookup for the user domain and display name of the leader else { $leader_domain = bp_core_get_user_domain( $leader_id ); $leader_fullname = bp_core_get_user_displayname( $leader_id ); } // setup some variables if ( $is_following ) { $id = 'following'; $action = 'stop'; $class = 'unfollow'; $link_text = $link_title = sprintf( __( 'Stop Following %s', 'bp-follow' ), apply_filters( 'bp_follow_leader_name', bp_get_user_firstname( $leader_fullname ), $leader_id ) ); } else { $id = 'not-following'; $action = 'start'; $class = 'follow'; $link_text = $link_title = sprintf( __( 'Follow %s', 'bp-follow' ), apply_filters( 'bp_follow_leader_name', bp_get_user_firstname( $leader_fullname ), $leader_id ) ); } // setup the button arguments $button = array( 'id' => $id, 'component' => 'follow', 'must_be_logged_in' => true, 'block_self' => empty( $members_template->member ) ? true : false, 'wrapper_class' => 'follow-button ' . $id, 'wrapper_id' => 'follow-button-' . $leader_id, 'link_href' => wp_nonce_url( $leader_domain . $bp->follow->followers->slug . '/' . $action .'/', $action . '_following' ), 'link_text' => $link_text, 'link_title' => '', 'link_id' => $class . '-' . $leader_id, 'link_class' => $class ); return $button; } add_filter( 'bp_follow_get_add_follow_button', 'custom_follow_button' );
Link title was the only part I changed as poedit accepts HTML markup so was able to swap out the text for an image using the localisation file.
The approach works for me but if there is an easier way….? (i’m sure my filter can be stripped down too – probably have unnecessary stuff in there)
Ref: bp-follow-templatetags.php line 117
Forum: Plugins
In reply to: [BuddyPress Follow] Using an image instead of text on follow buttonsHi r-a-y
I’ve tried to use the filter approach but just can’t seem to get it to work. My PHP is failing me :{
Any pointers would be really helpful?
Forum: Plugins
In reply to: [BP Profile Search] Pagination page 2Hi damienoneill2001,
Yes, Andrea kindly pointed out my BuddyPress child theme wasn’t set up properly
https://codex.buddypress.org/legacy/building-a-buddypress-child-theme/
Also whilst trying to resolve i found the search uses ajax pagination which relies heavily on the page HTML in order to work properly. If you start removing or modifying elements in members-loop.php then you’ll come across problems.
If your pagination or search is broken after you’ve customised your theme, then i suggest you start with everything as it comes out of the box, gradually add in your customisations, testing to ensure everything works as you go along. Bit of a laborious process but a ‘must-do’ as ajax/javascript is involved.
Hope this helps
Forum: Plugins
In reply to: [BP Profile Search] Pagination page 2Absolutely fantastic support. Many thanks!
Forum: Fixing WordPress
In reply to: IE5 problemI had to use I.E. 6 at work up until 2010 but then they updated. You should really urge the IT guys at your office to update IE as i’m sure there will be many security issues with such an old version
Forum: Plugins
In reply to: [BP Profile Search] Pagination page 2Thanks Andrea, i’ve sent an email with the access details.
Forum: Plugins
In reply to: [Theme My Login] Check if User Panel is current pageThanks, worked perfectly!
Forum: Plugins
In reply to: [Theme My Login] Visits to wp-login.php whilst logged in causes errorGood question. You’d have to ask my user who reported the error. Perhaps they didn’t realise they were logged in?
Thanks for the suggestion, however, it didn’t resolve the issue.
Forum: Plugins
In reply to: [Theme My Login] Error message when both username and password emptyThanks for the info.
Forum: Plugins
In reply to: [Theme My Login] Error message after log outI just saw your reply on Trac. Thanks for taking the time to try to resolve the issue. Hopefully one of the BP dev team will be able to respond
Forum: Plugins
In reply to: [BuddyPress Follow] Using an image instead of text on follow buttonsThanks for the ideas, think i’ll give the filter approach a shot!
Forum: Plugins
In reply to: [BuddyPress Follow] Private message button inside follower loopYep, it was thanks to Boone’s explanation that I realised you can’t use bp_displayed_user_id() in that context.
Thanks for your help (the wiki on Github has been quite helpful)!