Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 PM Addon: Send to all moderators
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

masterao
Senior Member

Sweden
1678 Posts

Posted - 11 November 2003 :  19:51:22  Show Profile  Visit masterao's Homepage
This is a simple addon to the PM mod, which allows the admin to easily send a PM to all moderators.

In privatesend.asp, locate the following (about line 149):


    if (mLev = 4) and strRqMethod <> "Forward" then Response.Write ("<br><input type=""checkbox"" name=""allmem"" value=""true"">Send PM to all users<br>") '# All Member PM Modification


Directly after it, add the following:


    if (mLev = 4) and strRqMethod <> "Forward" then Response.Write ("<input type=""checkbox"" name=""allmods"" value=""true"">Send PM to all moderators<br>") '# All Moderators PM Modification


In privatesend_info.asp, look for the following on about line 79:


		if Request.form("allmem") = false then  '# PM All Members MOD
			if Request.Form("sendto") = "" then
				Go_Result "You Must Supply a member name to send this message!", 0
				Response.End
			end if
		end if '# PM All Members MOD


Replace that passage of lines with the following:


        if (Request.form("allmem") <> "true" and Request.form("allmods") <> "true") then  '# PM All Members/Moderators MOD
            if Request.Form("sendto") = "" then
                Go_Result "You Must Supply a member name to send this message!", 0
                Response.End
            end if
        end if '# PM All Members/Moderators MOD


The second (and last) change in privatesend_info.asp, look for the following (starts on about 104):


        '############### Start PM all members #################
        if Request.form("allmem") = "true" then

            strSql = "SELECT M_NAME"
            strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
            strSql = strSql & " WHERE M_PMRECEIVE = 1"
            strSql = strSql & " ORDER BY M_NAME Asc"

            set rsName = my_Conn.Execute (strSql)

            do while not rsName.eof
                arrAllNames = arrAllNames & rsName("M_NAME")
                rsName.moveNext
                if not rsName.eof then
                     arrAllNames = arrAllNames & ","
                end if
            loop
            rsName.close
            set rsName = nothing
            arrNames = split(arrAllNames, ",")
        else
            '############## End PM all members ###################
            arrNames = split(Request.Form("sendto"), ",")
            '############### PM all members one line ###################
        end if


Replace that with the following:


        '############### Start PM all members #################
        if Request.form("allmem") = "true" then

            strSql = "SELECT M_NAME"
            strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
            strSql = strSql & " WHERE M_PMRECEIVE = 1"
            strSql = strSql & " ORDER BY M_NAME Asc"

            set rsName = my_Conn.Execute (strSql)

            do while not rsName.eof
                arrAllNames = arrAllNames & rsName("M_NAME")
                rsName.moveNext
                if not rsName.eof then
                     arrAllNames = arrAllNames & ","
                end if
            loop
            rsName.close
            set rsName = nothing
            arrNames = split(arrAllNames, ",")
        elseif request.form("allmods") = "true" then '### Start PM all moderators ###
            strSql = "SELECT M_NAME"
            strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
            strSql = strSql & " WHERE M_PMRECEIVE = 1 AND M_LEVEL = 2"
            strSql = strSql & " ORDER BY M_NAME Asc"

            set rsName = my_Conn.Execute (strSql)

            do while not rsName.eof
                arrAllNames = arrAllNames & rsName("M_NAME")
                rsName.moveNext
                if not rsName.eof then
                     arrAllNames = arrAllNames & ","
                end if
            loop
            rsName.close
            set rsName = nothing
            arrNames = split(arrAllNames, ",") '### End PM all moderators ###     
        else
            '############## End PM all members ###################
            arrNames = split(Request.Form("sendto"), ",")
            '############### PM all members one line ###################
        end if


All changes done.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod

Edited by - masterao on 11 November 2003 19:54:28

Etymon
Advanced Member

United States
2385 Posts

Posted - 11 November 2003 :  20:16:58  Show Profile  Visit Etymon's Homepage
Nice touch!

Thank you!
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 11 November 2003 :  20:28:03  Show Profile  Visit masterao's Homepage
Thanks

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 11 November 2003 :  20:34:40  Show Profile  Visit Etymon's Homepage
You are welcome, Jan.
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 12 November 2003 :  02:33:19  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
worked beautifully, thanks!

coaster crazy
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 12 November 2003 :  07:12:22  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I changed this to send PM to M_LEVEL >= 2 to send to admins too.

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 12 November 2003 :  10:18:02  Show Profile  Visit masterao's Homepage
You're welcome, weeweeslap.

Good idea, tribaliztic, and as necessary if there are several admins.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 12 November 2003 :  10:24:38  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I thought about making a drop down list instead of checkboxes, and then adding the possibility to send PM:s to whole groups of user also. (Using Nikkols Usergroups mod).

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 12 November 2003 :  10:40:32  Show Profile  Visit masterao's Homepage
I don't use that mod, but it sounds like a good tie-in with it.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

Doughnut
Starting Member

United Kingdom
40 Posts

Posted - 15 November 2003 :  09:16:50  Show Profile  Visit Doughnut's Homepage
Alright there,
Nice addition this...

I just installed and sent a test PM, the response (privatesend_info) was that it had only been sent to three of the mods but the forum has about six, is that normal?

I'm waiting for responses fom the mods so I don't know yet if they all received the test PM or if it was just the three listed on privatesend_info..

Thanks, Robin.
Go to Top of Page

Doughnut
Starting Member

United Kingdom
40 Posts

Posted - 15 November 2003 :  09:22:03  Show Profile  Visit Doughnut's Homepage
I just checked and it definately never went to all the mods?

Thanks, Robin.
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 16 November 2003 :  12:33:55  Show Profile  Visit masterao's Homepage
Has all of your moderators enabled PMs, Doughnut? The send to all Mods function will only send PMs if the reciever has enabled PMs.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

Doughnut
Starting Member

United Kingdom
40 Posts

Posted - 16 November 2003 :  15:57:52  Show Profile  Visit Doughnut's Homepage
Alright mastrao,
Thanks for your reply...

They must have pm's as we've exchanged many pm's even up to today, but then again...
There is an error when trying to set Inbox prefernces, just tried setting one of my accounts to "Enable private messages" and it won't because of the error.... I'll try to chase it up again!

Thanks, Robin.
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 16 November 2003 :  18:22:47  Show Profile  Visit masterao's Homepage
Ok, I'll do some tests and see if I can reproduce that behaviour, Doughnut.

Which database and server are you using?

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

Doughnut
Starting Member

United Kingdom
40 Posts

Posted - 17 November 2003 :  04:43:41  Show Profile  Visit Doughnut's Homepage
Alright there,
I use access on Huws windows server..some info in my sig too if it helps!
I'll try to find the post about the error, it's a real pain as it goes

Thanks, Robin.

http://www.carp-uk.net
Go to Top of Page

Doughnut
Starting Member

United Kingdom
40 Posts

Posted - 17 November 2003 :  04:58:37  Show Profile  Visit Doughnut's Homepage
Alright Masterao,
I just went back to the topic and found an answer, one thats good enough for me anyway!
I guess it doesn't solve the whole issue but it does work... here's what was posted!

quote:
The strange thing I found out is; Their are three options you can change the first 2 don't have anything picked, but the 3rd one has something picked. If I just pick one option and leave one without click on it (the little green dot in the O)
Then I'll get a error code.

If you pick more then one option at once you don't get any errors!

Sorry if this has messed up your topic by the way, if you'd like me to delete it let me know okay!

Thanks again, Robin.

Edited by - Doughnut on 17 November 2003 04:59:46
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07