The Arcive of vBulletin Modifications Site. |
|
![]() |
||||||||||||||||||||||||||
Notice: This mod uses Re-usable Code, so please feel free to port it to vbulletin 4 under your username. Thanks.
What does this modification do? On memberlist select multiple users for Mass Private Messages them. This is done by only 2 template edits ![]() What is Mass PM? It's like Mass Mail in admincp. You write one pm to multiple users. How to In template memberlist_resultsbit replace Code:
</tr> Code:
<td class="$bgclass"><input type="checkbox" name="deletebox[$userinfo[userid]]" value="$userinfo[userid]" /></td> </tr> Code:
<form action="profile.php?do=deleteusergroups&usergroupid=$usergroupid" method="post"> <input type="hidden" name="do" value="deleteusergroups" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <input type="hidden" name="usergroupid" value="$usergroupid" /> Code:
<script type="text/javascript"> <!-- function pm(tform) { var users = new Array(); var arrCount = 0; for (i = 0; i < tform.elements.length; i++) { var element = tform.elements[i]; if ((element.name != "allbox") && (element.type == "checkbox") && (element.checked == true)) { users[arrCount] = element.value; arrCount++; } } if (arrCount == 0) { alert("$vbphrase[no_users_selected]"); } else { var querystring = ""; for (i = 0; i < users.length; i++) { querystring += "&userid[]=" + users[i]; } self.location= "private.php?$session[sessionurl]do=newpm" + querystring; } } // --> </script> <if condition="$totalcols++"></if> <form action="private.php" method="post" name="vbform"> Code:
</form> Code:
<input type="button" class="button" value="$vbphrase[send_private_message_to_selected_users]" onclick="pm(this.form);" title="title" style="float:right"/> </form> Code:
</tr> $memberlistbits Code:
<td class="thead" align="right"><input type="checkbox" name="allbox" title="$vbphrase[check_uncheck_all]" onclick="js_check_all(this.form);" />$vbphrase[check_uncheck_all]</td> </tr> $memberlistbits How does this template modification work? This template edit puts a checkbox right to each user. If you click on "Send PMs", the small javascript generates a custom url "private.php?do=newpm&userid[]=1&userid[]=2&userid[]=3" and refreshes actual window with this url. Javascript code is mostly from Quick Links > Open Buddy List. FAQ Quote:
Code:
<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))"> here you do put template edits </if> Show Your Support
|
Comments |
#2
|
|||
|
|||
![]()
hey do you think you could make a different hack but similiar to this where you can mass pm from within the admincp (I'd like to mass pm certain usergroups sometimes, but I can only email them currently) you would rock if you could do that version.
anyway, thanks for this release, it might come in handy down the track. |
#3
|
||||
|
||||
![]()
This modificationen makes use of memberlist template and therefore has to be completely rewritten for an admincp version. That is why I will not write an admincp version. I'd be glad if another one would complete this task.
|
#4
|
|||
|
|||
![]()
I am unsure as to what needs to be done to restrict this to certain user groups. Where exactly does this go and what gets placed in the "here you do put template edits"?
HTML Code:
<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))"> here you do put template edits </if> |
#5
|
||||
|
||||
![]() Quote:
|
#6
|
|||
|
|||
![]()
Sould I would put "<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))">" at the beginning of your edits and then </if> at the end of your edits?
So your last edit HTML Code:
<td class="thead" align="right"><input type="checkbox" name="allbox" title="$vbphrase[check_uncheck_all]" onclick="js_check_all(this.form);" />$vbphrase[check_uncheck_all]</td> </tr> $memberlistbits Would be HTML Code:
<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))"> <td class="thead" align="right"><input type="checkbox" name="allbox" title="$vbphrase[check_uncheck_all]" onclick="js_check_all(this.form);" />$vbphrase[check_uncheck_all]</td> </tr> $memberlistbits </if> |
#7
|
||||
|
||||
![]()
Only changes from template should be within new <if conditions>. For last change it would be like this:
HTML Code:
<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))"> <td class="thead" align="right"><input type="checkbox" name="allbox" title="$vbphrase[check_uncheck_all]" onclick="js_check_all(this.form);" />$vbphrase[check_uncheck_all]</td> </if> |
#8
|
|||
|
|||
![]()
Why was this left out? I'm still confused. Not that advanced of a coder.
</tr> $memberlistbits |
#9
|
||||
|
||||
![]()
This is html code from original template. You have to display this html code for all usergroups.
|
#10
|
|||
|
|||
![]()
Would it be possible to get each of the required edits with the additional usergroup code? If so, can you PM it to me?
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|