Author |
Topic |
laser
Advanced Member
Australia
3859 Posts |
Posted - 04 November 2003 : 21:29:57
|
Title: Inject Message Text Version: v1.0 for Snitz Forums v3.4 Author: laser Last Update: November 5, 2003
Description: The Inject Message Text MOD enables your visitors to choose certain drop-down values to be added to the normal message text. This only affects the initial post (i.e. creation of a new topic), but could easily be modified to work with replies as well.
Features: - New drop-down when creating a topic so the user can choose a severity level (or other similar "top line" message) - Easy installation : 1 (1-easy, 10-difficult ) - All code done in response.write for Snitz v3.4 compatability
Demo: http://www.v8central.com/forum/ (for this MOD and the Auto-locking topics MOD)
Installation Instructions:
Three files to maintain:
- post_info.asp
(Step 1)
approx line 760, you will find :
txtMessage = ChkString(Request.Form("Message"),"message")
replace it with this :
'#Inject Message text MOD - start
txtMessage = "Severity : " & ChkString(Request.Form("Injection1"),"message") & vbNewline
txtMessage = txtMessage & ChkString(Request.Form("Message"),"message")
' txtMessage = ChkString(Request.Form("Message"),"message")
'#Inject Message text MOD - end
(I just commented out the original line for future reference
- post.asp
(Step 2)
approx line 534, you will find :
if mlev = 4 or _
before that line add :
'#Inject Message text MOD - start
If strRqMethod = "Topic" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Severity:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""Injection1"" size=""1"" tabindex=""-1"" >" & vbNewLine & _
" <option value=""" & """>no value</option>" & vbNewLine & _
" <option value=""1"">1 - High</option>" & vbNewLine & _
" <option value=""2"">2 - Medium</option>" & vbNewLine & _
" <option value=""3"">3 - Low</option>"
Response.Write " </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
'#Inject Message MOD - end
(Step 3)
That's it !
- upload the 2 files - check it out
Support: If you have problems installing this MOD, either post your questions in the Help: MOD Implementation forum or here.
Feedback: Suggestions, comments, questions and bug reports are always greatly appreciated! This is my second (published) MOD, it took less than an hour to do.
Test Environment: I have only tested this with Access so I would love feedback from other database environments. The only thing I envisage being wrong is the dbs file
Donations: - Donations are always welcome for support & mod implementations (PayPal : webmaster@v8central.com)
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 05 November 2003 : 05:39:32
|
laser i can't find/do not have the line if mlev = 4 or _ in my post.asp ? any ideas |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 05 November 2003 : 12:06:07
|
all working fine and dandy now mate many thanks for this great mod, although you have now opened up a whole list of possibiltys for example what about tracking those severity codes if a user posts 3 messages at sev 3 then thats 9 his threshold is ten so he can now only post a level 1 sev code message? any ideas.
P.S this was truly great work for those who didn't follow this message laser came up with mod for me in a about an hour of requesting thank god for people like you mate willing to help others. |
|
|
soxc
New Member
53 Posts |
Posted - 05 November 2003 : 14:39:11
|
Did you create this mod to use Snitz as an Bug-Tracker? |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 05 November 2003 : 15:32:52
|
no mate i'm creating an online referall form for my college. The basic idea being that staff can inform others of bad behaviour by students and can rate that ofence bad =3 not so bad = 1. The next thing i want to try and do is track the offence via a threshold. Example johnny misbehaves and has a referall written its rated 3 his threshold is 9 so when he gets 3 bads or a collection that reaches 9 it flags up somewhere and we can resteer his direction.
hope this makes sense |
|
|
soxc
New Member
53 Posts |
Posted - 05 November 2003 : 15:50:20
|
Makes sense. Being a developer I was thinking that people would post a bug. It would be an easy way to manage testing via the web and with some other mods could be useful.
To make the tracking easy you would need to add a field to the topics table and set this to the level and then add a field to the user table for the threshold (not sure if you have done this in the mod or not). |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 05 November 2003 : 18:03:56
|
soxc, you're right. I wrote this for uraken without really knowing what he was going to use it for. A more extensive MOD would see something that better fits this :
quote: Example johnny misbehaves and has a referall written its rated 3 his threshold is 9 so when he gets 3 bads or a collection that reaches 9 it flags up somewhere and we can resteer his direction.
If you assumed that johnny was a forum member you could track this number and add and subtract (when does johnny's score drop back to zero ?) as needed.
quote: P.S this was truly great work for those who didn't follow this message laser came up with mod for me in a about an hour of requesting thank god for people like you mate willing to help others.
Thanks for that, it's was a simple MOD, largely because it re-used much of my work from the Auto-Locking Topics mod. At the moment, it's easier to give time because money is quite tight. |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 06 November 2003 : 11:22:50
|
are you guys saying that this tracking thing is possible? if so i would be very interested to find out how to move it forward. |
|
|
s80ts0465
Junior Member
Italy
290 Posts |
Posted - 01 February 2004 : 13:50:06
|
It's fantastic, but just a question.
would be possible to use the security level as a parameter for the search ?????
and when i wanna send the data of security level to the database, how to do??????? |
Edited by - s80ts0465 on 01 February 2004 14:19:42 |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 01 February 2004 : 14:52:11
|
s80ts0465, I think we're getting pretty off-topic and I don't quite understand your post. Could you start a new thread and completely explain what you want to do ? |
|
|
s80ts0465
Junior Member
Italy
290 Posts |
Posted - 01 February 2004 : 15:04:22
|
Actually the security level that you choose is simply pasted in the message body. Instead i'd love to send the security level to the access database in a new column.
do you still want me to open a new topic??? |
Edited by - s80ts0465 on 01 February 2004 15:11:25 |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 01 February 2004 : 15:28:22
|
quote: Instead i'd love to send the security level to the access database in a new column.
Sure, but that wasn't the original brief for this MOD - it is doable though. |
|
|
Gargoyle
Junior Member
USA
280 Posts |
|
s80ts0465
Junior Member
Italy
290 Posts |
Posted - 01 February 2004 : 15:48:34
|
quote: Originally posted by laser
[quote]Sure, but that wasn't the original brief for this MOD - it is doable though.
how to do??? any suggest .....please |
|
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 01 February 2004 : 16:13:42
|
Gargoyle, have a look at http://www.v8central.com/forum/post_info.txt that might help, but there are 2 MODs in there - proceed with caution.
s80ts0465, sorry mate, I don't have the time at the moment. I'm trying to even think of a MOD I've seen that changes that form |
|
|
Topic |
|