• Resolved Josh Journey

    (@ljosh)


    I greatly appreciate the latest PeepSo group message setting and VIP icon addition. I’ve been recommending Better Messages to folks and made a public post giving notice to the new additions on PeepSo.

    When blocking a member in PeepSo (using PeepSo’s blocking feature), the blocked member is still able to message you in Better Messages. While users could work around this by blocking them again, it’s not what a user would expect to do. On most sites when you block a member, it blocks them from being able to message you. Logistically it would make sense for a new user block in PeepSo to generate a corresponding Better Message block record for that user. This way it uses the same infrastructure in place.

    PeepSo block setting can be found at: Configuration -> Advanced -> Performance -> User Blocking

    Warm regards,
    Josh

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Andrij Tkachenko

    (@andrijtkachenko)

    Hi there!

    Did not know that PeepSo has block feature, will take a look.

    Thanks!

    Thread Starter Josh Journey

    (@ljosh)

    @andrijtkachenko Thank you so much! Just tested the latest Better Messages. Blocking PeepSo members worked right away. ?? When viewing message settings ‘Blocked users – This is a list of users that you have blocked. You may unblock them from the blocklist below.’ it says below:
    ‘You haven’t blocked anyone yet’ even though the current user has blocked a user in PeepSo.

    From the PeepSo online users WP-page there is a blocked tab. When accessing it, for each user it shows the following HTML:

    <div class="ps-dropdown__menu ps-js-dropdown-menu" style="display: block;">
    <a href="#" onclick="ps_member.unblock_user(2, this); return false"><i class="lock"></i><span>Unblock User</span>
    </a>
    </div>

    When placing this HTML on a non PeepSo view (works in PeepSo too) in the DOM, when clicking the link, it unblocks user 2. I mention this to make the process as easy as possible to show list of blocked users followed by the HTML mentioned above working beautifully to unblock that user.

    This would complete integration of blocked users.
    Warm regards,
    Josh

    Plugin Support Andrij Tkachenko

    (@andrijtkachenko)

    Better Messages blocked users list is only works with Better Messages built-in blocks, you need to disable it in plugin settings.

    Thread Starter Josh Journey

    (@ljosh)

    When it’s disabled, there’s no unblocking from the messages view. Getting the list of blocked users is very easy to retrieve in SQL and unblocking users uses simple HTML:

    SELECT blk_blocked_id FROM wp_peepso_blocks WHERE blk_user_id = 1;
    #1 being the logged in user

    PeepSo makes it very easy to unblock a user even outside of PeepSo view with the following HTML:

    <a href="#" onclick="ps_member.unblock_user(2, this); return false"><i class="lock"></i><span>Unblock User</span>
    </a>

    2 being the user who is currently blocked but will be unblocked on link click. Tested this inside Better Messages when inserting into the DOM.

    Retrieving user blocks can be found in:
    wp-content/plugins/peepso/classes/blockusers.php on line 77:

    public function get_by_user($user_id)
    {
    if (PeepSo::get_option('user_blocking_enable', 0) === 1) {
    global $wpdb;

    $sql = "SELECT
    blk.*, user_login " .
    " FROM {$wpdb->prefix}" . self::TABLE . " blk " .
    " LEFT JOIN {$wpdb->users} ON ID=blk_user_id " .
    " LEFT JOIN {$wpdb->prefix}peepso_users ps ON ps.usr_id=blk.blk_user_id " .
    " WHERE blk.blk_user_id=%d ";
    $res = $wpdb->get_results($wpdb->prepare($sql, $user_id), OBJECT);
    return ($res);
    }
    }

    Warm regards,
    Josh

    Plugin Support Andrij Tkachenko

    (@andrijtkachenko)

    Hi there!

    PeepSo block list is not planned to be integrated to Better Messages interface at the moment, please use PeepSo interface to see and unblock blocked users.

    Thanks!

    Thread Starter Josh Journey

    (@ljosh)

    Understood. I’m very thankful for the support and integration of PeepSo blocking. Is there a filter for appending a link to Better Message settings? I could link to site/members/blocked. get_conversations_layout is as close as I could find when looking through docs. I’m comfortable writing PHP filters that can append strings to things, writing it in a function, initiating it with WP.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.