Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - PM all users?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PM all users?

 Post Reply Post Reply
Author
Mikael View Drop Down
Groupie
Groupie
Avatar

Joined: 16 November 2002
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikael Quote  Post ReplyReply Direct Link To This Post Topic: PM all users?
    Posted: 16 April 2004 at 2:48pm
I found a mass e-mail function in the forum, but I want to mass-PM all my users. Is there a simple way to do this in?
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2004 at 2:51pm

re create the private message form .. but instead of just adding it for one user .. do a loop... so that it loops around untill the records are eof

for each loop do an add new for the user from your self

Back to Top
Mikael View Drop Down
Groupie
Groupie
Avatar

Joined: 16 November 2002
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikael Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2004 at 4:54pm

Ahh, good idea! Maybe this will be included in the admin-area in the next version...

Back to Top
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2004 at 8:10am

I found this by Fernan some time ago. Check it out....

<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="common.asp" -->
<%
'*********************************************************** *****************************
'PM Groups Mod by Fernan http://uz.webhop.info
'*********************************************************** *****************************

'Set the buffer to true
Response.Buffer = True

'Make sure this page is not cached
Response.Expires = 0
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "private"

'Declare variables
Dim strMode    'Holds the mode of the page
Dim strPostPage   'Holds the page the form is posted to
Dim lngMessageID  'Holds the pm id
Dim strTopicSubject  'Holds the subject
Dim strBuddyName  'Holds the to username
Dim dtmReplyPMDate  'Holds the reply pm date
Dim strMessage   'Holds the post message
Dim intForumID   'Holds the forum number
Dim SQL
Dim intRecordLoopScan


'Set the mode of the page
strMode = "PM"
lngMessageID = 0


'If the user is user is using a banned IP redirect to an error page
If bannedIP() Then
 'Clean up
 Set rsCommon = Nothing
 adoCon.Close
 Set adoCon = Nothing

 'Redirect
 Response.Redirect("insufficient_permission.asp?M=IP")

End If

 

'If Priavte messages are not on then send them away
If blnPrivateMessages = False Then
 'Clean up
 Set rsCommon = Nothing
 adoCon.Close
 Set adoCon = Nothing

 'Redirect
 Response.Redirect("default.asp")
End If


'If the user is not allowed then send them away
If Not blnAdmin Then
 'Clean up
 Set rsCommon = Nothing
 adoCon.Close
 Set adoCon = Nothing

 'Redirect
 Response.Redirect("insufficient_permission.asp")
End If


%>
<html>
<head>
<script  language="JavaScript">

function CheckForm () {

 var errorMsg = "";


 
 if (document.frmPMs.pmSubject.value==""){
  errorMsg += "\n\tYou must enter a subject.";
 }

 
 if (document.frmPMs.pmBody.value==""){
  errorMsg += "\n\tYou must enter a message body.";
 }


 
 if (errorMsg != ""){
  msg = "___________________________________________________________ ____\n\n";
  msg += "The form has not been submitted because there are problem(s) with the form.\n";
  msg += "Please correct the problem(s) and re-submit the form.\n";
  msg += "___________________________________________________________ ____\n\n";
  msg += "The following field(s) need to be corrected: -\n";

  errorMsg += alert(msg + errorMsg + "\n\n");
  return false;
 }

 return true;
}

</script>
</head>
<title>PM Groups Mod by Fernan</title>


<%

'*********************************************************** **********************************

%>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="50%" id="AutoNumber1" height="95" align = "center">
    <tr>
      <td width="100%" height="95" valign="top">
<form method="post" name="frmPMs" action="send_pms.asp" onSubmit="return CheckForm();">
  <br>
  <p style="margin-left: 10; margin-right: 10">
Group to PM:
      <select size="1" name="pmGID">
<%
SQL = "SELECT tblGroup.Group_ID, tblGroup.Name FROM tblGroup Where Not tblGroup.Name = 'Guest'"
rsCommon.CursorType = 1
rsCommon.Open SQL, adoCon

For intRecordLoopScan = 1 to rsCommon.RecordCount

If Not rsCommon.EOF Then
%>
<option value="<% = rsCommon("Group_ID") %>"><% = rsCommon("name") %></option>"
<%
End If
rsCommon.MoveNext
Next
%>
<option value="All">All</option>
      </select><br><br>
Subject: <input type="text" name="pmSubject" size="30" maxlength="41"><br>
<br>
<textarea rows="13" name="pmBody" cols="54"></textarea><br><br>
<center><input type="Submit" value="Send" name="Submit">&nbsp;&nbsp;<input type="reset" value="Reset" name="Reset"></center>
      </form>
      </p>
      </td>
    </tr>
  </table>


<%

'Reset server variables
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing

%><br />
<div align="center">

</div>
</html>

Save as something and just go to that page...

Good luck!

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2004 at 1:32pm
Perhaps this should be moved to the mods forum?
Back to Top
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2004 at 1:46am
Good idea, since it was removed there...
Back to Top
FreeMen View Drop Down
Groupie
Groupie


Joined: 19 November 2003
Location: Denmark
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote FreeMen Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2004 at 9:04am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.