SJS719
Forum Replies Created
-
Forum: Plugins
In reply to: [Mutual Buddies] A Few ThingsHi Paresh,
Are you planning on either placing the mutual friends tab within the friends tab or creating the ability for the user to do so like we had discussed? If so, do you have any sort of a timeline on when to expect the update? It seems to make more sense to have the mutual friends tab as a child like the “Friendships” and “Requests” tabs under Friends.
Thanks!
Forum: Plugins
In reply to: [Favorites] Favorites List Doesn't Display Per MemberThanks for the help George but I just went ahead and switched to another plugin which is a little more established and stable. If you continue to struggle with this plugin I would recommend WP Favorite Posts: https://www.ads-software.com/plugins/wp-favorite-posts/
Forum: Plugins
In reply to: [Favorites] Favorites List Doesn't Display Per MemberHey George,
Thanks for the reply, but there seems to be something fundamentally wrong with this plugin. Even if I use a specific user ID such as 11 it still returns the favorites list of the logged in user. So the user sees their own favorites on everyone else’s page even if I set a specific user ID.
What is more strange is that the correct favorites actually DO appear for a second when the page loads but as the page continues to load it reverts back to the logged in users favorites list. And if a user doesn’t have any favorites it displays a random blog post name for a second before being replaced by the logged in user’s favs list. Very strange…
Oh well. Good idea for a plugin, just not quite there yet.
Forum: Plugins
In reply to: [GD bbPress Tools] Suggestion: Move Edit Signature FormYeah I understand I can select which group to place the forum sig in, I was wondering how to change the order of the field but I think I found a solution.
Thanks.Forum: Plugins
In reply to: [Mutual Buddies] A Few ThingsOkay that makes sense now, thanks for the great support!
The error message says you cannot redeclare test_bp_directory_members_item on subsequent lines.
Forum: Plugins
In reply to: [Mutual Buddies] A Few ThingsHey Paresh,
It seems that the new filter successfully unlinks the mutual friends link from latest activity. But
echo bmf_get_total_mutual_friend_count()
unfortunately doesn’t work correctly. It is strange, the mutual friends link correctly shows up on the first member in the loop but for all the rest of the members in the loop it displays total friends count instead of mutual friends count and the “Mutual Friends” text is missing.Also, the snippet returns an redeclare error.
Any ideas?
Thanks.Forum: Plugins
In reply to: [Mutual Buddies] A Few ThingsHey Paresh,
Okay I look forward to these features being included! Yes I tried echoing “bp_mutual_friend_total_count” in the members loop but it always shows mutual friends as “0” even if there are mutual friends.
While you are working on these features do you have any suggestions on how to unlink the mutual friends link from the recent activity link? I tried replacing the “bp_member_last_active” hook in the bp-mutual-friends-functions.php file (on line 115) but couldn’t get it to work. Any ideas?
Thanks!
Forum: Plugins
In reply to: [GD bbPress Tools] Suggestion: Move Edit Signature FormWhere is this setting? I don’t see it…
Forum: Plugins
In reply to: [GD bbPress Tools] Suggestion: Move Edit Signature FormHey Wesley, what do you mean it appears when viewing peoples pages?
Thanks.
Forum: Plugins
In reply to: [WP-PostRatings] Sort by Highest Rated Not WorkingHey Lester,
Thank you for the quick reply, I always love to see an author support their own plugin by offering support!
Do you think it could possibly be as simple as replacing r_sortby with a different param such as gmw_orderby on line 818, 827, and 836?
Thanks.
Forum: Plugins
In reply to: [WordPress Access Control] Add a Message Upon Redirect?Anything??
Forum: Fixing WordPress
In reply to: How to Combine 2 Separate Javascript Functions?Hey Andrew, I tried to create a working model on JSFiddle but since cookies and localStorage won’t work in JSFiddle the confirm box never fires and the process never runs. But here is the demo anyways: https://jsfiddle.net/sjs719/gusjbxyL/
Basically what I am trying to create is a checkbox in the members profile page that when checked makes their profile “Featured”. So when the checkbox is checked by the user it needs to remain checked (using localStorage) and I need to be able to check if that box is checked from other pages which is why I create a cookie when the box is checked (and remove the cookie when the box is unchecked).
But right now when the user checks the box and the confirm box appears if they select “cancel” the checkbox still gets checked instead of remaining unchecked. To fix this I believe I need to add an ‘if statement’ which checks if the confirm box has been answered “yes” or “cancel” but when I add
if (confirm("Are you sure"))
to the localStorage script it creates a second confirm prompt (since the confirm prompt also exists in the cookie script).So I need
if (confirm("Are you sure"))
in both scripts but only want 1 confirm prompt to fire.I hope this makes since
Forum: Fixing WordPress
In reply to: How to Sort Query Results By Meta Key/Value?Hi Evan,
I am just trying to comply with the plugin by using the same formatting which they use. I think the reason they do not follow the standard WP_Query coding standards is because the Geo My WP plugin uses its own separate database to store its data.
I do not have the knowledge to build this query from scratch so I am trying to find a way to simply include a meta sort ability in this pre-built code.
Forum: Fixing WordPress
In reply to: How to Sort Query Results By Meta Key/Value?Anyone?
Forum: Fixing WordPress
In reply to: How to Sort Query Results By Meta Key/Value?Hey AJ,
Using
$clauses['orderby'] = 'meta_value_num' => 'DESC';
causes a syntax error. Here is the full code:function gmw_orderby_filter( $clauses, $gmw ) { global $wpdb; //getting the chosen value so we could pre-select the selected value after page load $selected = ( isset( $_GET['gmw_orderby'] ) && !empty( $_GET['gmw_orderby'] ) ) ? $_GET['gmw_orderby'] : ''; //check if order-by value was submitted. If it was we will use its value otherwise we set the default value to 'distance' $orderby_value = ( isset( $_GET['gmw_orderby'] ) && !empty( $_GET['gmw_orderby'] ) ) ? $_GET['gmw_orderby'] : 'distance'; //check the value of the order-by and modify the clause based on that //when order-by distance if ( $orderby_value == 'distance' ) { /* * when we do order-by distance we must check an address was entered. * we cannot order results by distance when ther is no address to calculate distance to * and so we will rsults with an error. * So we check for the address and if address found we will order results by distance. * Otherwise, we can order results by a different value. In this example i use post_title */ if ( isset( $gmw['org_address'] ) && !empty( $gmw['org_address'] ) ) { //order by distance when address entered $clauses['orderby'] = 'distance'; } else { //if no address order by post title $clauses['orderby'] = $wpdb->prefix.'posts.post_title'; } } elseif ( $orderby_value == 'post_title' ) { $clauses['orderby'] = $wpdb->prefix.'posts.post_title'; } elseif ( $orderby_value == 'post_date' ) { $clauses['orderby'] = $wpdb->prefix.'posts.post_date DESC'; } elseif ( $orderby_value == 'post_id' ) { $clauses['orderby'] = $wpdb->prefix.'posts.ID'; } elseif ( $orderby_value == 'random' ) { $clauses['orderby'] = 'RAND()'; } elseif ( $orderby_value == 'most_ratings' ) { $clauses['orderby'] = $wpdb->prefix.'posts.comment_count DESC'; } elseif ( $orderby_value == 'highest_rating' ) { $meta_key = 'rating_avg'; $clauses['orderby'] = $wpdb->postmeta.'meta_value DESC'; } //return modified clauses return $clauses; } add_filter( 'gmw_pt_location_query_clauses', 'gmw_orderby_filter', 20, 2 );
I am using the plugin “GEO My WordPress” so that is why ‘gmw’ appears throughout the code.