MyBB Community Forums

Full Version: Ignore function for DVZ shoutbox?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to add one?
(2015-08-05, 06:24 PM)lookism Wrote: [ -> ]Is it possible to add one?


Actually it is pretty simple.

Edit dvz_shoutbox.php. Find this code:

if ($own) {
            $attributes .= ' data-own';
        } 

And write this after that:
if($mybb->user['ignorelist'] != '') 
    {
    $ignlist = explode(",", $mybb->user['ignorelist']);
    if(!empty($ignlist) && in_array($data['uid'], $ignlist, true)) 
        {
        $text = '<span style="font-style: italic; font-size: 0.85em;">' . self::parse('This user is on your ignore list.', $data['username']) . '</span>';
        }
    } 

You can simply write "return null;" instead of $text= (...) if you don't want to show any ignored messages.