-
Hi !
Excellent guide, but i’m using a plugin (Commentator on CodeCanyon) for my comments.
Here is the code with callback functions :
PHP123456789101112131415161718192021222324252627282930<?phpglobal $current_user;get_currentuserinfo();$user_profile = $_SESSION["commentator_user_profile"];$userName = "";$userLoggedIn = true;$idUser = $current_user->ID;$avatarUser = get_avatar( $idUser );if(is_user_logged_in()){$userName = $current_user->user_login;}elseif($user_profile != null){$idUser = $_SESSION["commentator_provider"]."-".$user_profile['identifier'];$avatarUser = '<img alt="" src="'.$user_profile['photoURL'].'" class="avatar avatar-96 photo" height="96" width="96">';$userName = $user_profile['displayName'];}else{$userLoggedIn = false;$userName = __("guest", "commentator");}global $post;$id = get_the_ID();$threadVotes = get_post_meta( $id, "upVote-discussion" );$threadNumberLikes = count($threadVotes);$hasUpVoted = in_array ( $idUser, $threadVotes );?>I’ve tried a lot of things with no succes ! If anybody here can help me it will be really great 🙂 Thx a lot !
There is some mistakes with the copy/past, but I guess you understand where are the functions.
I see the code has get_avatar() already to display custom thumb. What did you try please, or what exactly do you want to integrate? I am not familiar with that plugin. So I need more info about what you expect, and what code did you try
I do not get the correct avatar in the comments, I get the default avatar (male or female) as this user did not upload their own avatar. I also love the avatar and username link to profile! And finally, I would like the verified badge appears next to the user name!
I managed to do it with the native commenting system but I can not do with this addon!
This addon is new, it was launched a few days ago, but already a lot of people are interested and many of us ask the author if the addon is compatible with yours.
Okay, lets take it one by one. To show the badges for any user. Add this where you want badges to appear (maybe beside username)?
<?php echo userpro_show_badges($idUser); ?>
However, it’s not clear why he use current user info and not commenter info. I’d prefer if he could email me to explain to me how his logic works.
Here is the plugin Commentator, if you want more informations about it 🙂
I’m going to try adding the badges !
I have just informed the author of the “Commentator WordPress Plugin” via PM in regards to this thread here. Hopefully he will contact Ahmed very soon. I am also interested to combine this plugin with UserPro! 😉
Best regards,
keyhanjunummh that if UserPro does not release its own elegant like/comment system already 😉
Hi, I have tried this but unfortunately I am using theme Enfold from ThemeForest and the code doesn’t look anything like what you gave as an example. It’s a bit modified and mixed with the standard WordPress comments.php so it’s very difficult to know what to replace with what. Is there any way you can help me if I give you the code? Thanks in advance.
If you email me the comments file, I can tell you which parts to replace.
Hi,
I’m trying integrate comments link but I’m getting an error like this:
Fatal error: Call to a member function permalink() on a non-object in /XXX/wp-content/themes/Newspaper/comments.php on line 115
You must be logged in to reply to this topic.