• kacper3355

    (@kacper3355)


    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alexander

    (@ateshabaev)

    Hello, Kacper,

    Sure I can.

    Btw, great suggestions!

    1. Integration with Ultimate Members is planned here.

    However, you have a few great points and I will add them to the issue.

    Not sure though when I will make this integration. Most likely a few updates or so.

    2. Yes, I would like to make this configurable per website.

    3. Did not consider this. However, I can easily add such option.

    I will be writing here once something of it would be done, so you will be aware of changes ??

    Thread Starter kacper3355

    (@kacper3355)

    Thank you so much! ??

    So I will stick with your plugin – I’ll wait for the updates before I launch my site ??

    Have a good day! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Some questions – need help’ is closed to new replies.