Status
Not open for further replies.

D19RNY

Customer
I don't know if this has been posted before, i did look but could not find it.

chose usergroups that can send pm's in the sb.
because I would like only my staff to communicate via pm's in the sb
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
In that case I suggest globally disabling PMs and creating a staff chat room to let staffers communicate.

This usergroup permission would also disallow those users from responding to staff PMs, mind.
 
Ok After playing around in the templates I found a way to do it. vB 4.x

Open your dbtech_vbshout_memberaction_dropdown in your style, find the following code:

Code:
[COLOR=#000080]<vb:if condition=[COLOR=#0000FF]"$canpm"[/COLOR]>[/COLOR]
        [COLOR=#000080]<li class=[COLOR=#0000FF]"right"[/COLOR]>[/COLOR]
            [COLOR=#008000]<a href=[COLOR=#0000FF]"javascript://"[/COLOR] onclick=[COLOR=#0000FF]"return vBShout{vb:var instance.instanceid}.create_pm('{vb:var userid}', '{vb:var jsusername}');"[/COLOR] title=[COLOR=#0000FF]"{vb:raw usertitle}"[/COLOR]>[/COLOR]
                [COLOR=#800080]<img src=[COLOR=#0000FF]"{vb:stylevar imgdir_siteicons}/message.png"[/COLOR] alt=[COLOR=#0000FF]""[/COLOR] />[/COLOR]
                {vb:rawphrase send_private_message}
            [COLOR=#008000]</a>[/COLOR]
        [COLOR=#000080]</li>[/COLOR]
        [COLOR=#000080]</vb:if>[/COLOR]

And Replace with this:

Code:
[COLOR=#000080]<vb:if condition=[COLOR=#0000FF]"is_member_of($bbuserinfo, 6)"[/COLOR]>[/COLOR]        
        [COLOR=#000080]<vb:if condition=[COLOR=#0000FF]"$canpm"[/COLOR]>[/COLOR]
        [COLOR=#000080]<li class=[COLOR=#0000FF]"right"[/COLOR]>[/COLOR]
            [COLOR=#008000]<a href=[COLOR=#0000FF]"javascript://"[/COLOR] onclick=[COLOR=#0000FF]"return vBShout{vb:var instance.instanceid}.create_pm('{vb:var userid}', '{vb:var jsusername}');"[/COLOR] title=[COLOR=#0000FF]"{vb:raw usertitle}"[/COLOR]>[/COLOR]
                [COLOR=#800080]<img src=[COLOR=#0000FF]"{vb:stylevar imgdir_siteicons}/message.png"[/COLOR] alt=[COLOR=#0000FF]""[/COLOR] />[/COLOR]
                {vb:rawphrase send_private_message}
            [COLOR=#008000]</a>[/COLOR]
        [COLOR=#000080]</li>[/COLOR]
        [COLOR=#000080]</vb:if>[/COLOR]
                 [COLOR=#000080]</vb:if>[/COLOR]

In the first line of the new code is where you can set the usergroups you want to allow the pm feature: <vb:if condition="is_member_of($bbuserinfo, 6)"> seperate groups with a comma, ie; 6,7,8,9

Can be done in vB 3.8.x also.

Open your dbtech_vbshout_memberaction_dropdown in your style, find the following code:

Code:
[COLOR=#FF0000]<if condition=[COLOR=#0000FF]"$canpm"[/COLOR]>[/COLOR][COLOR=#008080]<tr>[/COLOR][COLOR=#008080]<td class=[COLOR=#0000FF]"vbmenu_option"[/COLOR]>[/COLOR][COLOR=#008000]<a href=[COLOR=#0000FF]"javascript://"[/COLOR] onclick=[COLOR=#0000FF]"return vBShout{$instance[instanceid]}.create_pm('{$userid}', '{$jsusername}');"[/COLOR] title=[COLOR=#0000FF]"{$usertitle}"[/COLOR]>[/COLOR][COLOR=#000080]<phrase 1=[COLOR=#0000FF]"$musername"[/COLOR]>[/COLOR]$vbphrase[send_private_message_to_x][COLOR=#000080]</phrase>[/COLOR][COLOR=#008000]</a>[/COLOR][COLOR=#008080]</td>[/COLOR][COLOR=#008080]</tr>[/COLOR][COLOR=#FF0000]</if>[/COLOR]

And Replace with this:

Code:
[COLOR=#FF0000]<if condition=[COLOR=#0000FF]"is_member_of($vbulletin->userinfo, 6)"[/COLOR]>[/COLOR]
    [COLOR=#FF0000]<if condition=[COLOR=#0000FF]"$canpm"[/COLOR]>[/COLOR][COLOR=#008080]<tr>[/COLOR][COLOR=#008080]<td class=[COLOR=#0000FF]"vbmenu_option"[/COLOR]>[/COLOR][COLOR=#008000]<a href=[COLOR=#0000FF]"javascript://"[/COLOR] onclick=[COLOR=#0000FF]"return vBShout{$instance[instanceid]}.create_pm('{$userid}', '{$jsusername}');"[/COLOR] title=[COLOR=#0000FF]"{$usertitle}"[/COLOR]>[/COLOR][COLOR=#000080]<phrase 1=[COLOR=#0000FF]"$musername"[/COLOR]>[/COLOR]$vbphrase[send_private_message_to_x][COLOR=#000080]</phrase>[/COLOR][COLOR=#008000]</a>[/COLOR][COLOR=#008080]</td>[/COLOR][COLOR=#008080]</tr>[/COLOR][COLOR=#FF0000]</if>[/COLOR][COLOR=#FF0000]</if>[/COLOR]

In the first line of the new code is where you can set the usergroups you want to allow the pm feature: <vb:if condition="is_member_of($bbuserinfo, 6)"> seperate groups with a comma, ie; 6,7,8,9
 
I had asked about 2 weeks ago in this thread:
http://www.dragonbyte-tech.com/threads/2899-Shout-PM

That's when I came up with the solution!

Thanks for that, i also made another change to a php file, which allows only certain usergroups from using the /pm command. Its hacky but works

in dbtech/vbshout/includes/class_dm_vbshout.php

find:
if ($matches[2] == $this->registry->userinfo['username'])
{
// We has an error
$this->error('dbtech_vbshout_cannot_pm_self');
return false;
}

after add
if (is_member_of($vbulletin->userinfo, 5,6,26,11) == false)
{
return false;
}
 
I had asked about 2 weeks ago in this thread:
http://www.dragonbyte-tech.com/threads/2899-Shout-PM

That's when I came up with the solution!

I cam up with this, it only allows Protected users to PM non protected users. But it allows non-protected users to pm protected users...

Code:
		<vb:if condition="$isprotected AND $userid != $bbuserinfo['userid']">
		<vb:if condition="$canpm">
		<li class="right">
			<a href="javascript://" onclick="return vBShout{vb:var instance.instanceid}.create_pm('{vb:var userid}', '{vb:var jsusername}');" title="{vb:raw usertitle}">
				<img src="{vb:stylevar imgdir_siteicons}/message.png" alt="" />
				{vb:rawphrase send_private_message}
			</a>
		</li>
		</vb:if>
</vb:if>

<vb:if condition="!$isprotected AND $userid != $bbuserinfo['userid']">
<vb:if condition="is_member_of($bbuserinfo, 5,6,26)">
		<vb:if condition="$canpm">
		<li class="right">
			<a href="javascript://" onclick="return vBShout{vb:var instance.instanceid}.create_pm('{vb:var userid}', '{vb:var jsusername}');" title="{vb:raw usertitle}">
				<img src="{vb:stylevar imgdir_siteicons}/message.png" alt="" />
				{vb:rawphrase send_private_message}
			</a>
		</li>		</vb:if>
		</vb:if>
</vb:if>
 
Well the great staff here has solved the issue with the new upgrade:
http://www.dragonbyte-tech.com/threads/3255-vBShout-v5.4.0-Released!?p=18380#post18380

=) I go through every single suggestion personally when it comes time to do updates. Unless the request is going to be a major time sink that we can't afford, it goes in.

Many of the new features in updated versions are customer requests - we physically can't update the mods as often as we'd like (which is every week xD) but we make sure to get in as many of your requests as is humanly possible when we do update.

Thanks for the compliment from the team - it means a lot to us when people recognize how much effort we put forth for you guys.

Cosmic
 
Status
Not open for further replies.

Similar threads

Legacy vBShout

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,179
Customer rating
5.00 star(s) 1 ratings
Back
Top