Not Solved DVZ Shoutbox 2.3.1 for guests
#11
Not Solved
I am having the same problem. IF you select all group or manually select and include guests groups in all settings, guests can see the shoutbox messages, but not post in them.

Did anyone figure this modification out to this plugin fully?
Reply
#12
Not Solved
Was this ever resolved as I too need guests to post via this 2.3.3 plugin as well?

Thank you
Reply
#13
Not Solved
Hi, you can enable guest chat by

1. remove "if (self::is_user()) { ... }" lines, the whole if conditional scope including any code inside that { ... }, and put following:

if (self::is_blocked()) {
                    $panel = '<div class="panel blocked"><p>' . $lang->dvz_sb_user_blocked . '</p></div>';
                }
                // shout form
                else {
                    $maxlength = $mybb->settings['dvz_sb_maxlength'] ? (int)$mybb->settings['dvz_sb_maxlength'] : null;
                    eval('$panel = "' . $templates->get('dvz_shoutbox_panel') . '";');
                }

2. Find
case 'dvz_sb_shout':


                $permissions = (

                    self::access_shout() &&

                    verify_post_check($mybb->get_input('key'), true)

                );

and remove "self::access_shout() &&".
Then it should work. You will need to ban attackers by ip banning though. You can check their ip in shoutbox archive.


You will additionally need to change dvz_mention plugin if you have,

1. find
function dvz_shoutbox_shout_commit(array $data)
{
    $alertDetails = [];

    $locationData = [
        'object_id' => (int)$data['shout_id'],
        'author'   => (int)$data['uid'],
    ];

    $mentionedUserIds = \dvzMentions\getMentionedUserIds($data['text']);

    if ($mentionedUserIds) {
        \dvzMentions\Alerts\queueAlerts('dvzShoutbox', $alertDetails, $locationData, $mentionedUserIds, $data['uid']);
    }
}

2. change it to
function dvz_shoutbox_shout_commit(array $data)
{
    $alertDetails = [];

    $locationData = [
        'object_id' => (int)$data['shout_id'],
        'author'   => (int)$data['uid'],
    ];

    $mentionedUserIds = \dvzMentions\getMentionedUserIds($data['text']);

    if ($mentionedUserIds && (int)$data['uid'] != 0) {
        \dvzMentions\Alerts\queueAlerts('dvzShoutbox', $alertDetails, $locationData, $mentionedUserIds, $data['uid']);
    }
}
Reply


Forum Jump:


Users browsing this thread: