Post by california on Dec 1, 2005 17:17:01 GMT -8
This will allow you to mass PM (private message) members based on various criteria, for example, you can mass PM based on member group, post count, registration date, or any of the other options available in "Search Members" in the admin panel. So obviously, only admins can use this. In the Search Members search results, next to the Delete Users button, it adds another button, "Send Private Message", that when clicked will open up a private message with all the users you've checked in the to: field. So obviously if you want to send a message to everyone you'd use the "Check All" button. You can also use this as a Mass PM to everyone except a select few users, by searching for something that will include everyone in the results. For example, search for members with less than 100,000 posts. Useful, easy to use, no editting required.
The code does not allow you to mass email selected users. That is not possible with a code.
<script type="text/javascript">
<!--
/* conditional mass PM by california */
if(location.href.match(/action=searchmembers2/) && document.membersForm){
var pmButton = document.createElement("input");
pmButton.type = "button";
pmButton.value = "Send Private Message"
pmButton.onclick = function(){
var csvContainer = "";
var mIn = membersForm.getElementsByTagName("input");
for(m=0; m<mIn.length; m++){
if(mIn[m].name.match(/delete-(\w+)$/) && mIn[m].checked != false){
csvContainer += RegExp.$1+",%20";
}
}
csvContainer = csvContainer.replace(/,%20$/, '');
location = "/index.cgi?action=pmsend&to="+csvContainer;
return true;
}
var mIn = document.getElementsByTagName("input");
mIn[mIn.length-1].parentNode.appendChild(pmButton);
}
// -->
</script>
Main Footer
February 2, 2009: Bug fix for FireFox (membersForm => document on 3rd to last line). ~ Triad
The code does not allow you to mass email selected users. That is not possible with a code.
<script type="text/javascript">
<!--
/* conditional mass PM by california */
if(location.href.match(/action=searchmembers2/) && document.membersForm){
var pmButton = document.createElement("input");
pmButton.type = "button";
pmButton.value = "Send Private Message"
pmButton.onclick = function(){
var csvContainer = "";
var mIn = membersForm.getElementsByTagName("input");
for(m=0; m<mIn.length; m++){
if(mIn[m].name.match(/delete-(\w+)$/) && mIn[m].checked != false){
csvContainer += RegExp.$1+",%20";
}
}
csvContainer = csvContainer.replace(/,%20$/, '');
location = "/index.cgi?action=pmsend&to="+csvContainer;
return true;
}
var mIn = document.getElementsByTagName("input");
mIn[mIn.length-1].parentNode.appendChild(pmButton);
}
// -->
</script>
Main Footer
February 2, 2009: Bug fix for FireFox (membersForm => document on 3rd to last line). ~ Triad