Some questions – need help
-
Hello!
First of all, I want to tell you that this is probably the best commenting plugin I’ve ever used! However, I need to change some things. Can you please help me to do this?
1. Is it possible to integrate AnyComments with Ultimate Member plugin, so the avatars would be taken from Ultimate Member profile and become clickable (it should redirect to user profile)? Also, if particular user deletes his account, his comments should be deleted as well.
WpDiscuz uses this code for integration:
//////////////////////////////////////////////////////////////////////// // Ultimate Member Profile Display Name Integration //////////////////// //////////////////////////////////////////////////////////////////////// add_filter('wpdiscuz_comment_author', 'wpdiscuz_um_author', 10, 2); function wpdiscuz_um_author($author_name, $comment) { if ($comment->user_id) { $column = 'display_name'; // Other options: 'user_login', 'user_nicename', 'nickname', 'first_name', 'last_name' if (class_exists('UM_API') || class_exists('UM')) { um_fetch_user($comment->user_id); $author_name = um_user($column); um_reset_user(); } else { $author_name = get_the_author_meta($column, $comment->user_id); } } return $author_name; } //////////////////////////////////////////////////////////////////////// // Ultimate Member Profile URL Integration ///////////////////////////// //////////////////////////////////////////////////////////////////////// add_filter('wpdiscuz_profile_url', 'wpdiscuz_um_profile_url', 10, 2); function wpdiscuz_um_profile_url($profile_url, $user) { if ($user && (class_exists('UM_API') || class_exists('UM'))) { um_fetch_user($user->ID); $profile_url = um_user_profile_url(); } return $profile_url; } add_filter('wpdiscuz_avatar_link_attributes', function ($attr) { if (isset($attr['target'])) { $attr['target'] = ''; } return $attr; });
– maybe could you modify it a little bit?
2. Is it possible to limit comment nesting to 2 (instead of 3 like it is now)?
3. Is it possible to remove comment box for non-logged in users and instead show “you have to log in if you want to post a comment” text with login link? Of course comment box should be visible for logged in users.
Thank you in advance, I really hope you can help me – this plugin is almost perfect for me ??
Best regards,
Kacper
- The topic ‘Some questions – need help’ is closed to new replies.