Warn Members Mod 2.00

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/62152?pagenum=1
05 November 2025, 04:04

Topic


modifichicci
Warn Members Mod 2.00
17 June 2006, 08:52


Set and implemented by Modifichicci

Support on http://www.herniasurgery.it/forum/


This mod is derived from Crash Award Members and Crash Warn Members Mods
As these mods are old and created for an old version of snitz forum and with some errors for MySql, I have adapted them to create a new Warn Members Mod working on all snitz in access and MySql. New features:
1) Admin section from admin home
2) Mod set on /off from Config Features
3) Capability to set warning from topic of the member to be warned
4) If a warn is set,, in topics of meber warned there is the Warn Remove icon. This is view only by admin and moderators. 5) In topics, under the members data will be shown an icon and the word Warning: clikking on icon show the warning message. This is visible by all members
6) A mail is sent to warned members when a warn is set and when a warn is removed.
New add for cdosys mail, can send mail with html formatting if present in message. 24 june 2006




Instructions in text file. File to be edited:
config.asp
admin_home.asp
admin_config_features.asp
inc_iconfiles.asp
pop_config_help.asp
topic.asp

Difficulty (1 _10) = 2

Download:
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=227

Italian Version available on
http://www.superdeejay.net/download/files/Mod_Ammonizioni.zip

Image Portal Version available in Download section of
http://www.hernisurgery.it/forum/
(registration required)

Try it and feedback errors and modify.
Thank you.

Update 18 june 2006
Admin Name set from db, don't need any changes in file of the mod! Zip updated.
Update 24 june 2006
Corrected some bugs in three files (admin_warning, pop_warning, pop_warn_message)

Update 4 july 2006
Correct some errors shown from feedback, added lines for inc_mail to send HTML mail with Cdosys and Cdonts also. Deleted java lines generating errors in some forums (probably used from old snitz version)

<moved to="MOD Add-On Forum (W/O Code)" by="Shaggy" /><

 

Replies ...


modifichicci
18 June 2006, 13:45


Just alittle correction to instructions file:

in topic.asp
after
<!--#INCLUDE FILE="inc_subscription.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->

add

<!--#INCLUDE FILE="inc_warning_functions.asp" -->

sorry...<
modifichicci
19 June 2006, 16:09


Others little errors detected:
in pop_warning.asp
add at the top after the others include:

<!--#INCLUDE FILE="inc_header_short.asp" -->

in admin_warn_members.asp
at line 84
" <td valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & Call Paging() & "</font></td>" & vbNewline & _
"</tr></table>"
put
Call Paging() inside " "
it became like this:


" <td valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & "Call Paging()" & "</font></td>" & vbNewline & _
"</tr></table>"


Zip updated!<
JBaldwin
23 June 2006, 10:59


I was getting a couple of JS errors...posted them in the MOD Implementation Forum.<
modifichicci
23 June 2006, 18:29


I have updated the zip to correct some bugs in admin_warning, pop_warning and pop_warn_message. Now the formatting is shown properly and it works from admin page also.
The JS issue isn't solved, but it works in quite all forums we have installed this mod. <
TonyB7
23 June 2006, 21:04


Just in case this is something I might be interested in, what exactly does this mod do? I mean, what am I 'warning' members about?<
JBaldwin
23 June 2006, 21:57


I believe its intention was to WARN members who abuse the forum rules, use bad language etc. It inserts a "WARNING: ! " below the avatar of the offending member. Anyone can click on the exclamation point icon to view the entire warning given by the ADMIN or the MOD. You can see my demo in my forum here:

http://www.absolutelyfreerolls.com/forum/forum2/topic.asp?TOPIC_ID=873<
modifichicci
24 June 2006, 12:21


There was a little bug in sending mail:
if you have formatted the message, it was sent with the code tag.
Now I have modifyed pop_warn_membermail.asp and a little modification to inc_mail, so if there is a html code a html mail is sent.
It works with cdosys, but it can be adapted to others system, I think.
ZIP UPDATED<
Shaggy
26 June 2006, 05:10


As there seem to be a good few glitches in this, I've moved it to the "W/O Code" forum for now.
<
modifichicci
03 July 2006, 17:14


Any feedback?<
Pull My Finger
04 July 2006, 03:53


Originally posted by modifichicci
Any feedback?
First I like to say "Thank You" modifichicci!
IM using SHN forum code and just installed this 2 days ago. So far it's working GREAT!
There was a few things that I had to fix... 1- Fixed the Javascript Error as per JBaldwin thread in the Help: MOD Implementation forum. I to was getting that Javascript Error also and I removed lines 13,14,15,16, and 17 on inc_warning_functions.asp. That fixed the problem for Me!
2- On pop_warning_message.asp the following text was in another lang... Nome Membro:
Icona ammonizione:
Messaggio ammonizione:
Chiudi finestra
I Corrected to... WARNING MESSAGE:
Member Name:
Warning Level:
Warning Message:
Close Window

3- On admin_warning.asp when "setting" a warning to a member from the admin section on my forums the following text would show up 2 times...Warning set - Sent email to Member!. On admin_warning.asp I comment out line 81

4- On admin_warn_delete.asp when "removing" a warning to a member from the admin section on my forums the following text would show up 3 times...Warning removed! - Sent email to Member. On admin_warn_delete.asp I comment out lines 57 and 106


That's about it! I made a few personal changes for my site such as adding a openWindow function just for the mod itself so the text don't wrap for my members in popups who have their Screen Resolution set to 800x600, I Made the pop windows wider. Also a few minor personal changes to look better with SHN forum code

Thanks again modifichicci!
<
modifichicci
04 July 2006, 13:46


Thank you!!
ZIP UPDATED (all zip)

Corrected errors shown by Pull My Finger

Add lines to inc_mail to send html letter format with cdonts also.
Deleted the java lines that generate error in some forum. I think that where for an old version of snitz.
If you want to change the window aspect of the message shown, you can set in inc_warning_functions:

Javascript:openWindowWarning1
change it to a window you like from that implemented in inc_header (there are 6 windows set from line 235 to line 257...) and you can delete the java lines in the top of this file. Or you can leave them and change the attributes such as dimension or scrollbars and resizable=yes...)


<
Pull My Finger
05 July 2006, 06:32


modifichicci:

On pop_warning_message.asp the following text was in another lang...((You forgot to change in last update)}. Chiudi finestra needs to be changed to Close Window
Also on pop_warning_message.asp I found another minor problem..... Line 33
Code:
					<td background="<% =strCrashColorTemplateDir %><% =strCrashBGCategoryImage %>" border="0" height="<% =strCrashBGCategoryHeight %>" colspan="2" align="center" valign="middle"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><b> Warning Message</b></font></td>

Needs to be changed to....
Code:
					<td bgColor="<% =strHeadCellColor %>" border="0" height="20" colspan="2" align="center" valign="middle"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><b> WARNING MESSAGE</b></font></td>

Heres something you might consider on next update... On inc_warning_functions.asp In the function openWindowWarning1.... - on line 11 change this -
popupWin = window.open(url,'new_page','width=400,height=200') - to this -
popupWin = window.open(url,'new_page','width=600,height=300,scrollbars=yes,resizable=yes') -then-
In your Instructions.txt file for topic.asp.... There is 4 lines that have openWindow5 in those lines. - change those to -
openWindowWarning1

That way all the popup windows for the mod on topic.asp will use openWindowWarning1. Since pop_warning_message.asp uses openWindowWarning1 anyway why not use openWindowWarning1 for the admin part of it from topic.asp!
That way nobody will be wasting your time on popup window stuff from topic.asp
Just a thought... I made those change's on inc_warning_functions.asp and topic.asp and everything works aok on my site


Thanks again! BOB






<
modifichicci
05 July 2006, 12:26


Thank you again! ZIP UPDATED

The function WindowWarning1 is cold only from inc_warning_functions because this window is only a display window, and should not need a resize, but every one can change it to his preference, as you say.
It is possible also change windowWarning1 to openWindow5 in inc_warning_function, deleting the java lines from this file, if you need some others layout...
THe function openWindow5 is already in snitz code, so we can use it instead another functin.. but everyone can choose what he prefers.. Thank you again!!!
<
Pull My Finger
05 July 2006, 13:52


Originally posted by modifichicci
but everyone can choose what he prefers..

Yea, your right... and after thinking about it I have to agree. Plus if they do think they need to change it all they have to do is read this thread since it was disscused anyway!coolclown
The reason why I did it that way is so some of the text don't wrap when pop_warning.asp and pop_warning_del.asp pops up when clicking the admin icon from topic.asp. That was my personal choice.bigsmile
Besafe and thanks again! Bob<
modifichicci
05 July 2006, 14:35


That is strange, because openWindow5 has set this way in inc_header:

Code:
"function openWindow5(url) {" & vbNewLine & _
" popupWin = window.open(url,'new_page','width=450,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes')" & vbNewLine & _
"}" & vbNewLine & _
I have chosen it just for the scrollbar and resizable function...<
modifichicci
06 July 2006, 07:30


Thanks for feedbacks, I have implemented an error check in admin_warning, fixed a little bug in admin_warn_members.
ZIP UPDATED

I think now it is quite fixed, if you can try it with a new install we can say: completed! Thank you<
Pull My Finger
06 July 2006, 22:24


pop_warning_message.asp Below Lines: 27,28 and 29 (Also has old crash code in bold)....... Am I correct to say that these 3 lines can be removed because they are not needed? If they are needed what about the bit of old crash code in bold?
Code:
<table border="0" cellspacing="0" cellpadding="1" align="center">
<tr valign="top">
<td bgcolor="<% =strPortalBGColor %>">
<
modifichicci
07 July 2006, 11:37


Yes, maybe that lines aren't needed, and the Crash code is ineffective, so we can delete it.
Code:
<table border="0" cellspacing="0" cellpadding="1" align="center">
<tr valign="top">
<td>

I haven't deleted lines, but I think they can..
Anyway ZIP UPDATED!<
Pull My Finger
07 July 2006, 22:59


Well modifichicci... you just about got this completed on my end. The only thing that remains on my end (unless I missed something else)is the e-mail (inc_warnmembers_email.asp). IM asuming (inc_warnmembers_email.asp) anyway.
Don't know if my website has anything to do with it, but anyway my website SHN e-mail "Select E-mail Component" is set at CDONTS (ISS 3/4/5). When setting a warning using a test member the e-mail sent to one of my server e-mail accounts (e-mail setting set to allow html) shows the open html tags before text, and after text no closing tags. For example ...<.font color=000000><b>bla bla bla After that I changed the e-mail address in test member profile to one of my ISP e-mail accounts. Set a warning again and the email shows all open and closing html tags



<
modifichicci
08 July 2006, 04:28


Send mail is often an adventure... I have tryed the solutions I have found on this forum to send html letter with cdonts and cdosys. It works properly with my server that is a large diffusion hosting service in Italy, and it works with my friends forums.. But the issue of mail sending is open to all solutions. I don't know why with a server you have clkose tag and with another no.. But message is checked with a very simply line, and i think we can do better.. htmlmessage = InStr(WarnMessage, "<")
this check for "<" tag in message and if it is present set the flag to 1 and allow html letter. I assume warning is set by correct people (admin or mod)and not more sicurity check would be necessary. If you set a formatted warn, do you receive a formatted letter or only a text letter with tag explain? We receive formatted letter, but we have a mail reader allowing html letters, if it is set to text letters only you have a tag letter.<
Pull My Finger
08 July 2006, 17:33


modifichicci:

Before submitting my last post above it slipped My mind (tired as hell yesterday) to try the other E-mail Component in "Admin: Email Server Configuration". There I selected the CDOSYS (ISS 5/5 1.6) E-mail Component. This time when using the Warning Message "Format Options" on "test member" the html in sent e-mails was "WORKING" in my ISP and Website email accounts! Problem Solved on My end! bigsmile
My Vote is that this MOD is now complete and bug free!



<
modifichicci
09 July 2006, 04:00


Thank you! You have done a good testing work!
For Shaggy:
Have I to post a link to this Mod in Mod W/Code or you can move it there or nothing to do? Thank you!<
richfed
09 July 2006, 10:41


I have it installed on my forum ... seems to be OK!<
modifichicci
09 July 2006, 11:16


Thanks to you!<
Shaggy
10 July 2006, 06:05


Originally posted by modifichicci For Shaggy:
Have I to post a link to this Mod in Mod W/Code or you can move it there or nothing to do? Thank you!
No need to repost it, I'll move it back once a few more people have tested it smile
<
Morpheus2001
13 July 2006, 19:23


if in the text there is "'" in the page appears an error, in order not to errare, it must put the double "'"

can you help me ?
sorry for may bad english<
AnonJr
13 July 2006, 19:32


Not having the code in front of me, it sounds like the SQL string isn't being checked for single quotes.
What is the specific error you are getting?<
Shaggy
14 July 2006, 04:24


Ay, sounds to me like it's a string that's not getting passed through the chkString() function.
<
modifichicci
14 July 2006, 05:40


Yes I have noticed that just today, I'll check code. I think there is warnmessage that isn't checked before update db.<
modifichicci
15 July 2006, 06:02


Fixed! Zip updated!
in admin_warning
find
Code:
strSQL = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_WARNMESS = '" & Request.Form("strWarnMessage") & "',M_WARNICON = '" & Request.Form("strWarnMemberIcon") & "' WHERE M_NAME = '" & Request.Form("strWarnMember") & "'"

and replace with
Code:
txtMessage = ChkString(Request.Form("strWarnMessage"),"message")
strSQL = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_WARNMESS = '" & txtMessage & "',M_WARNICON = '" & Request.Form("strWarnMemberIcon") & "' WHERE M_NAME = '" & Request.Form("strWarnMember") & "'"

in pop_warning
find
Code:
txtMessage = Request.Form("strWarnMessage")

replace with
Code:
txtMessage = ChkString(Request.Form("strWarnMessage"),"message")

give me feedback please.<
AnonJr
15 July 2006, 10:45


Personally, I'd go a head and run all your Form variables through ChkString. Its safer and precludes certain problems with potential SQL injection attacks.
Also, I think for what you're doing ChkString should be:
Code:
ChkString(Request.Form("strWarnMessage"),"sqlstring")
Or at least for when you are placing it in the SQL String.<
modifichicci
15 July 2006, 10:52


Yes you are right, but that string is quite sure i think as only administrator or moderator can write.. but i'll change it ( but in post_info message is checked with
txtMessage = ChkString(Request.Form("Message"),"message")
)<
AnonJr
15 July 2006, 11:01


I'll double check, but I think the option "message" is being used when it is sent back to the browser and the option "sqlstring" is for when the text is inserted into a SQL String...<
AnonJr
15 July 2006, 11:04


Hmmm. Never noticed it... in other areas items that are being passed to the SQL String are checked like I put above, but the message isn't in that particular case.<
modifichicci
15 July 2006, 12:31


Done zip updated, thanks.
Change
txtMessage = ChkString(Request.Form("strWarnMessage"),"message")

to
txtMessage = ChkString(Request.Form("strWarnMessage"),"sqlstring")

both in admin_warning and pop_warning
<
Shaggy
17 July 2006, 05:13


Originally posted by AnonJr I'll double check, but I think the option "message" is being used when it is sent back to the browser and the option "sqlstring" is for when the text is inserted into a SQL String...
"sqlstring" is used when insterting a string in the database, "message" is used to parse any forum code in a string when adding it to the database. For the most part, "display" will be used when writing values from the database with seperate function (formatstr) used to parse any additional forum code.
<
AnonJr
17 July 2006, 12:21


Thanks for the clarification. bigsmile Now I need to copy that down somewhere before my short-term-memory-thing kicks in... tongue<
modifichicci
17 July 2006, 13:32


The same for me...bigsmile<
Simko
07 October 2006, 04:04


I'll install this mod to the newest version of snitz forums which I'm currently modify. I'd like to send the warning via PM, not E-mail, cause via PM the User will recognice earlier. Could someone maybe give me the codes for the sites I need there to send the warning via PM?<
modifichicci
07 October 2006, 05:06


You have first to install the PM mod, and then to modify the code of inc_warnmembers_email.asp to set for a PM..<
Simko
07 October 2006, 11:46


Thanks, I've installed the mod, but I'm pretty new to this... sorry :-) What do I have to change here
________________

Thanks AnonJr... I really don't know what to change, even it is only a "relatively small chunk of code", if I knew it, I wouldn't post in here and asking for help...
<
AnonJr
07 October 2006, 12:50


Just a helpful hint, if you need us to look at a file (as opposed to a relatively small chunk of code) its usually considered good etiquette to post a link to a .txt version of the file instead of posting the entire contents...<
modifichicci
07 October 2006, 15:16


It's not to change, we have to write the code to send PM to user... It's not quite difficult, but it needs time..

But why Pm and not email? If user doesn't come in forum he doesn't read the pm...<
Simko
07 October 2006, 15:26


Thanks for answering modifichicci. The user will see the PM earlier than the E-mail (most of them just delete such E-mails and never read them...). Yeah, you are right, if the user doesn't come the the forum, he doesn't read the PM, but then theres no need to read the warning, if he doesn't come back ever :-) Would be nice if you can write a script for that.<
modifichicci
07 October 2006, 16:04


Next days... I'll give a look at it.<
furk
11 October 2006, 06:30


Would be nice the option to set via admin panel if send email, PM...or both...<
© 2000-2021 Snitz™ Communications