Giter Site home page Giter Site logo

alimir / wp-ulike Goto Github PK

View Code? Open in Web Editor NEW
102.0 8.0 29.0 13.07 MB

WP ULike enables you to add Ajax Like button into your WordPress and allowing your visitors to like and unlike posts,comments, BuddyPress activities & bbPress Topics

Home Page: http://alimir.github.io/wp-ulike/

PHP 52.80% CSS 7.31% JavaScript 36.83% SCSS 3.07%
wordpress wordpress-plugin php bbpress likers like-button buddypress mycred-plugin ultimate-member statistics

wp-ulike's Issues

popup issue

Hi we face bug in using popup with wp-ulike plugin. if wp-ulike is enabled, my popup doesn't work.
please check it, i'm waiting for your answer

Version 3.6

Why in the repository WP is 3.6 version and here only is 3.5.2 version ?

Unlike Button

Hello,

i wish a unlike Button too and not only a like Button.

I mean something like this:
image

order by issue

I am trying to order my posts by using order by likes, but this does not return posts which have not been voted yet.

There is a list of custom posts, I ordered it by number of likes but it does not returns the newly created posts on which no voting has been done yet.

$query     = array(
	"post_type" => "books",
	'orderby' 	=> 'meta_value_num',
	'meta_key'  => '_liked',
); 
$the_query = new WP_Query( $query );

Error 2: If I use any meta key selector in query args & also use orderby then order by meta key & value replaces other meta key value.

$query     = array(
	"post_type"      => "books",
	"meta_key"	=>"is_read",
	"meta_value"    =>1,
	'orderby' 	=> 'meta_value_num',
	'meta_key'        => '_liked',
);
$the_query = new WP_Query( $query );

SQL: SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( ( wp_postmeta.meta_key = '_liked' AND wp_postmeta.meta_value = '1' ) ) AND wp_posts.post_type = 'books' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_author = 4 AND wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value+0 DESC LIMIT 0, 10

avatar linking to current user profile instead of “liker's” profile

If user A "likes" a post, upon refreshing the page it will show +1 like on that post, and it also shows that user's avatar which should link to that user's profile.

Now the problem is that the URL is linking to the Current user's profile, instead of properly linking to User A's profile.

So let's say I am logged into my account. I go to look at the user who liked the post. Well, the avatar is showing user A's image (as it should) but his avatar is linking to My profile. This problem occurs when there is one like on the post.

Now, when there are two likes on the post(say, from two users not including myself) it will show both of the 2 users' avatars. Now when I go to click to view their profile.. user A still links to the current user (my profile) while the second user's avatar (user B) links to user A's profile

Additional Question:
Also In the Most liked user widget, The liker avatar is not linking their profile, Please highlight the code need to be changed to works fine.

Button not accessible

Hi there, thanks for this nice looking plugin.

I found out that the like button is not accessible with the keyboard because of the missing href attribute. Moreover, the semantically better way would be to use the <button> element instead of <a>.

How to disable aggregateRating schema metadata?

I installed WP ULike plugin on my local fresh installation of WP. I followed the steps to remove all schema data. But I still see a aggregateRating field which throws errors on Google structured data testing tool.
image

Any way to remove it?

function to get current user liked comment

Hi, I think this plugin need to be more documented and need more customize able function specially for change UI.
I am looking for a PHP function to know current user was liked this comment or no?
thanks

Some parts are missing the translation placeholder

The text shown below shows up on the news feed of buddypress when someone liked a post.

Problem: it is not possible to translate the string because the __() is missing. Can this please be added, its only a matter of seconds to include.

Thank you!

file:

  • general-functions.php
  • general-hooks.php

string:
(So far, This post has %POST_COUNT% likes)

How to load the JS but not the CSS files on Buddypress pages?

I see the option to not load the CSS and JS files on certain pages but how do you split these? I'm using an app builder and this is causing layout issues in my mobile app, I'd like to load the JS file but not the CSS file as I think that's what's causin the issue.
To be clearer: The plugin works fine but causes the text in my mobile app to extend off-screen to the right inside a Buddypress group. If I exclude the Buddypress pages from loading the CSS and JS files, this doesn't happen but the button appears solid and no longer functional.

Cannot delete individual Logs

Clicking the delete button for individual like logs is giving a 404 error.
POST https://domain.com/wp-admin/admin-ajax.php 404
  | (anonymous) | @ | VM753:1
  | send | @ | jquery.js:4
  | ajax | @ | jquery.js:4
  | (anonymous) | @ | statistics.js?ver=5.3.2:13
  | dispatch | @ | jquery.js:3
  | r.handle | @ | jquery.js:3

Some Likes not saving for users

I love this plugin and we are about to deploy it on a large membership site for members to like certain custom post types. Everything was working smoothly until we began testing with some initial users.

Some have reported that the likes don’t save. As soon as the page is refreshed the likes are gone for them. Others are having no problems. The latest update did not fix the issue and there are no errors in the error logs.

It appears to be an IP related issue. All test users with an IPv6 it won't save the Likes.

We use the username method for logging. But every user who it doesn’t save the likes for has an IPv6 address while IPv4 users it works fine. It doesn’t appear that this should be an issue with username logging.

A few users have switched their phones to use cell data and the buttons work fine. Then when they switch back to wifi the buttons don’t work. I'm guessing this is b/c their cell data IPs are IPv4.

We are hosted on a dedicated server with WP Engine. We also use Cloudflare.

Has anyone come across something like this? I can’t even replicate it so have had to rely on video observation with some beta testers.

Feature request: Customizing the icon size

This is a plugin that I really like, but I find that it doesn't have a feature of customizing the icon size, which is sometimes too large for some themes. Could you please consider adding this simple feature in the future updates? thx.

Performance issue with in 4.x because of switch to custom database table

Hi there,

It looks like when you switched from using post meta to your custom database table you subsequently created some performance issues as you've almost completely sidestepped WordPress's built-in caching mechanisms.

Post meta automatically uses the built-in object caching, and thus any persistent caching (ie. Redis etc.) hooking into the built-in object offers great benefits in more demanding cases.

By using your custom table and subsequently custom database queries, you completely miss this advantage and thus possibly execute a whole lot of unnecessary db queries.

In the simplest form you should at least utilize wp_cache_set()/wp_cache_add() and wp_cache_get() with your custom queries.

You actually already do once but I'm not sure why you haven't in all the different queries related to like count data.

I know caching is always harder than it seems and I would actually appreciate even more robust configurable caching options, but this seems like a low hanging fruit.

(MySQL 8) Incorrect DATETIME value: ''

MySQL 8 running in strict mode (default) doesn't support empty string as a valid datetime value. Hence the plugin crashes with the abovementioned error.

Failing query is:

SELECT
( SELECT COUNT(*) FROM `wp_ulike` WHERE ( date_time <= NOW() AND date_time >= "" ) ) +
( SELECT COUNT(*) FROM `wp_ulike_activities` WHERE ( date_time <= NOW() AND date_time >= "" ) ) +
( SELECT COUNT(*) FROM `wp_ulike_comments` WHERE ( date_time <= NOW() AND date_time >= "" ) ) +
( SELECT COUNT(*) FROM `wp_ulike_forums` WHERE ( date_time <= NOW() AND date_time >= "" ) )

Does not seem to work outside of loop (post)

I tried to add both shortcode and wp_ulike( 'get' ); to post's sidebar (outside of loop) but it does not seem to work at all. If I move the code inside post's content it works.

Idea: Instead of thumbs up, clapping possible?

The idea to have thumbs up are good, but therefore everyone has only one time to vote for something. Is it possible to have something like a clapping-function as well? Maybe the admin has to decide for one concept, but that would bring a new dimension to it. Of course the way would only be one direction, but how much something is favorited would be more clearly.

Problem with wordpress REST API `/wp-json/wp/v2/comments` endpoint

When accessing the above-mentioned endpoint with wp-ulike plugin installed, the following notice is generated:

Notice: Trying to get property 'comment_ID' of non-object in /var/www/html/wp-includes/comment-template.php on line 673

This renders the JSON invalid. On debugging I found that wp_ulike_comments() function calls get_comment_ID which depends on the global $GLOBALS['comment'] to get the current comment. This variable is set by an instance of Walker_Comment class (or its subclass), which is instantiated in the get_comment_pages_count function of the file wp-includes/comment.php. Probably this function is not called when accessing the comments endpoint through rest API, and hence the notice.

I know I can set the WP_DEBUG flag to false and get rid of the notice, but this seems like broken.

show like button in a loop

Hi every one.

Im trying to put the like button inside de loop pf search result. When click the button show a red a lert saying and error was ocurred
image

can any one helpme?

Frontend label should have title attribute

Right now frontend content is wrapped in <label>.

It would be ideal to have a title attribute so users could see the action that will be performed, eg <label title="Like this {contentType}">.

Count is not updating

If user is not logged in, he/she is not able to like the post. He/she is only able to click on like button once however count is not getting updated. Please give me direction on this.

No data is being stored in the database

Im on a fresh WP 4.9.6 install running PHP7. Upon clicking the like button, it infinitly increases the count no matter if I am logged in or not.
But NO datas are stored in the database?!

Whats going on there?

ULike + Buddypress notifications not working

No errors, nothing at all. It just doesn't work. I am not getting any notifications at all. Nothing via Buddypress, nothing via activities... really nothing.

Is there a way to get this fixed?

Add like programmatically

Hi,

I'm creating a plugin to import data from Jetpack Likes (Wordpress.com) to Wp ULike.

What would be the correct way to add a like programmatically via PHP?
I wanna pass the USER_ID and POST_ID.

List the most like comments in the article.

$comment_query = new WP_Comment_Query( array(
		        'post_id' => get_the_ID(),
		        'meta_key' => '_commentliked',
		        'meta_query' => array(
                    array(
                        'key' => '_commentliked',
                        'value' => '0',
                        'compare' => '>'
                    )
                ),
		        'orderby' => 'meta_value_num',
		        'number' => 3
		        ) );
            wp_list_comments('type=comment&callback=zan_comment&end-callback=zan_end_comment',$comment_query->comments);

           wp_list_comments('type=comment&callback=cm_comment&end-callback=cm_end_comment&max_depth=23');

Hello there.
I use the code above to list the most like comments.
There is also a wp_list_comments listed below for all comments.
At this time, there was a problem with the paging.
The page shows the comment on the first page, which is actually not the case.

Is there any solution?
Or a better way to achieve this.

Tooltip not working in version 3.0

Hello, I am currently running version 3.0 of WP ULike on my website, and for some reason the Tooltip functionality is no longer working? When running version 2.7, if a user was logged out and hovered over the thumbs-up they would get a small pop-up tooltip that said “Please login to like comments or posts”, but now that I’ve upgraded to 3.0, that message no longer appears. Looking at the wp-ulike.min.css file, it looks like all of the css classes for the tooltip have been removed. Is there a new way to achieve this functionality that I’m just not seeing?

Thank you in advance for your help!

one post in a given category?!

Is it possible to make it so that the user can like only 1 post within the same category of posts? And when the user "likes" another post within the same category, the first one would be automatically unliked?

Sort log table

Hello,

great plugin. It would be very helpful if the table ‘Post Likes Logs’ would be sortable. Is it possible to realize this feature?

Best regards
Sarah

Corrections to wp-ulike/assets/css/wp-ulike.css (and .min.) for validation

The file wp-ulike/assets/css/wp-ulike.css contains four specifications of animation-delay which lack the time unit and thus fail validation by the W3C CSS validator. Here are the patches applied at our site commenting out the original erroneous CSS and replacing it with specifications including the time unit. When the base file is updated, the wp-ulike.min.css must, of course, be re-generated. Line numbers are current as of 4.1.7 and several earlier versions.

487,488d483
< /* RATBURGER LOCAL CODE
< Fix validation error.
490,492d484
< /
< animation-delay: .45s;
< /
END RATBURGER LOCAL CODE /
502,503d493
< /
RATBURGER LOCAL CODE
< Fix validation error.
505,507d494
< /
< animation-delay: 0s;
< /
END RATBURGER LOCAL CODE /
522,523d508
< /
RATBURGER LOCAL CODE
< Fix validation error.
525,527d509
< /
< animation-delay: .2s;
< /
END RATBURGER LOCAL CODE */

[major bug] ulike breaking most buddypress notificaitons

This has been driving me crazy FOREVER. when someone replys to my forum threads, I have been getting notifications with blank titles, so I have no idea what the notification is, I just went through and disabled all my plugins 1 by 1 to find out its ulike breaking titles in the notifications page.

This is a major bug that is affecting all our existing website stopping notifications being displayed.

With ulike activated:
https://i.imgur.com/iDLench.png

With ulike disabled:
https://i.imgur.com/8HzXtsP.png

Problem with bbPress

Hi,

This is a great plugin and really great works. I'm using it on one of my clients site and found a bug with bbPress. I fixed it on my installation but it would be better if you update the plugin after fix.

You have a typo with $replyID variable at the last line of following code, and it's in inc/wp-ulike.php and line no: about 244

$replyID = bbp_get_reply_id();
$post_ID = !$replyId ? $post->ID : $replyID;

"Users Like Box Template" does not display

Hi there, tanx for your nice work.

I am facing deep problem with the plugin... I am intending to record likes on comments, only for registrer users and I need to be able to count the number of likes per user and per comment. But...

1/ nothing is recorded in the table '_ulike_comments'
2/ I can like again and again the sames contents.... my previous likes ar not taken into account (i am using the 'Logged by username' Login method
3/ the "Users Like Box Template" only prints "%START_WHILE% %USER_AVATAR%
%END_WHILE%" in the front end...

Can you help me please?

Regards

Filtering counter template doesn't work with AJAX

I was trying to use the wp_ulike_count_box_template filter suggested here. in order to add some text to the counter number. for instance "10 people liked this post" or "1 person liked this post" etc. this is working on page first load, but the text is not changing on click. I don't know if this is a problem in my code, or that something is missing in the original hook.
here is my script:
add_filter('wp_ulike_count_box_template', 'bayadaim_ulike_count', 10, 2); function bayadaim_ulike_count($string, $counter) { $num = preg_replace("/[^0-9,.]/", "", $counter); if($num == 0) $string = "<span class='didit-counter'>Be the first one to Like!</span>"; elseif($num == 1) $string = "<span class='didit-counter'>".$string." Person liked this</span>"; else $string = "<span class='didit-counter'>".$string." People liked this</span>"; return $string; }

Thanks,
Itamar

Start Like button with a minimum number != 0. And new post automattic likes plus 1 than the most liked post

Hi friends,

First of all congrats for the plugin...

Have done some customisations taking code from the readme. Removed 0 and plus. Problem. Got a site issue and could not solved. No other solution than remove these code...

Now I want that LIKE button starts with a minimum number different than 0. Example: 4.

Also want that when a new post is posted it gets the same likes than the most liked plus 1 more.

Is all this possible? Any suggestion will be highly appreciated.

Wish you a great day

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.