Home › Forums › WTI Like Post PRO › I am missing a message
Tagged: Messages
- This topic has 5 replies, 2 voices, and was last updated 9 years, 5 months ago by Webtechideas.
-
AuthorPosts
-
May 11, 2015 at 6:17 pm #302DenisCGNParticipant
Hello,
I dont really remeber if I asked this allready.I a missing a message.
- First time visitor visits a POST with no voting on it
Hey, be the first to vote! - First time visitor visits a POST with 1 voting on it
1 (number displayed) visitor like this, what about you? - First time visitor visits a POST with more than 1 voting on it
15 (number displayed) visitors like this, what about you?
This messages for visitors that are just looking at the websites posts.
Now I need these message:
- First time visitor votes for a post.
Thanks for voting this post! - First time visitor that is remembered by the website.
you like this post allready!
All other message can be as they are. I am just missing messages for new visitors if there 1 or more votings for a post. Right now there is only the number.
How can I do this, or better can you out this in the settings of the plugin?
Cheers,
DenisMay 13, 2015 at 6:12 pm #317WebtechideasKeymasterWe think we had done this for you earlier using hook. If you have changed the theme or our plugin, then look for the previous one. The hook available which you can use is:
apply_filters( 'wti_like_post_load_message', $msg, $post_id, $like_count, $unlike_count )
You need to attach a function to the above hook. There you need to check for the like, unlike count. Depending upon those values you will have return the message.
Thanks
May 18, 2015 at 11:57 am #324DenisCGNParticipantYes, you did, but I cant find it anymore.
Isnt it easier to add this to the plugin itself?
Maybe other users need this, too.Cheers,
DenisMay 18, 2015 at 4:46 pm #325WebtechideasKeymasterThere are so many plugin users and they have different requested functionality. We include those which are generic and add filters for those which will help in customizing as per user. So the hook is there which will help you in modifying the output. Since we had done this for you earlier, we must have sent code/file to you. Please check your mailbox and search for
wti_like_post_load_message
.Thanks
May 21, 2015 at 3:52 pm #326DenisCGNParticipantHi,
I got this:
add_filter( 'wti_like_post_load_message', 'wti_like_post_load_message', 10, 4 ); function wti_like_post_load_message( $post_id, $like_count, $unlike_count, $msg ) { if ( $like_count == 1 ) { $msg = 'User likes this image.'; } else if ( $like_count > 1 ) { $msg = 'Users already like this image.'; } return $msg; }
If you go on this page : http://partykompass.de/ueberschrift-9/
then there is only the HEART and the number 1.
I need “1 person allready voted.”
If you go to this page: http://partykompass.de/zu-guter-letzt-die-ueberschrift-16/
then there is only the HEART and the number 2.
I need “2 persons allready vote.”
And now comes the tricky part. If you vote. then first it shows “thanks for voting” and if you reload the page it says “you allready voted this image”. If you want to vote again, it says “please wait 60 minutes to vote again”.
This is what I need.
I need to versions to show the visitor until he votes.
With the code above it does not work.
I need somehow to check if the user allready voted.
If not, I need the message for only 1 vote, and a message for more than 1 vote.
Or am I missing, something?
Denis- This reply was modified 9 years, 6 months ago by DenisCGN.
May 27, 2015 at 3:51 am #328WebtechideasKeymasterYou need to change the message a little bit like
$msg = 'User likes this image.';
to$msg = $like_count . ' user likes this image.';
Similarly you need to do for theelse
section. Also change the message content as per your like. - First time visitor visits a POST with no voting on it
-
AuthorPosts
- The forum ‘WTI Like Post PRO’ is closed to new topics and replies.