Author |
Topic |
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 14 November 2003 : 03:35:08
|
Hi all i'm trying to work out how i can track certain words in a message my forum is located http://www.castlehills.lincs.sch.uk/wwwroot/default.aspits only a test at the moment but i want to be able to track the severity of a message so that if a student with has a level 3 severity referall then a message is sent to an email address. |
Edited by - ruirib on 18 November 2003 07:04:56 |
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 14 November 2003 : 03:37:15
|
just in case that made no sense to anyone is there a piece of code that says " if message content = 'word' then send email to 'user/moderator' |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 17 November 2003 : 06:53:29
|
can anyone help with this topic? |
|
|
Roland
Advanced Member
Netherlands
9335 Posts |
Posted - 17 November 2003 : 08:05:37
|
Honestly, I don't understand exactly what you want... Am I correct when I say that you want to have posts checked for certain words when they're posted, and if one or more of those words are found, a moderator will receive an email to alert him/her of that post?
Better get things 100% straight before any suggestions are made |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 17 November 2003 : 15:13:34
|
yes thats exactly right Roland. On my post.asp i have various drop down menus the contents of these drop menus are populated to the finished message i want to be able to alert moderators of a certain message content. |
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 17 November 2003 : 15:23:26
|
Your best bet uraken is in post_info.asp. Find the piece of code that posts the message (I'm assuming this would be a new "topic". Here you would have make a check for the severity level and perhaps call another function to send an email. For example:
if Request.Form("severity_level") >= 3 then
Call emailModerators(severitylevel, topicid, membername)
end if
The emailModerators sub would have the necessary code to email a list of people the relevant information. You could olace the code inline as well if you chose:
if Request.Form("severity_level") >= 3 then
// email code
end if
|
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 17 November 2003 : 15:46:57
|
snaayk thanks, i sort of understand the code although have limited asp knowledge so i put in red what i don't understand i assume this will call an email modeartors list mod? also waht is a sub?
if Request.Form("severity_level") >= 3 then Call emailModerators(severitylevel, topicid, membername) end if
thanks again |
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 17 November 2003 : 16:10:28
|
What is sub short for? The sub is a function that will run when called. in this case the sub was named emailModerators(). All the stuff within the parathesis are variavle that can be used within the sub. In other words:
sub emailModerators(severitylevel, topicid, membername)
//email code
email.body = "Hello moderators, there is a severity level "& severitylevel &" ticket pending.
Theticket was created by "& membername &". You can view the topic here: http://forum/topic.asp?topicid="&topicid&"
email.send
end sub
The code above is fictional, and will not work, but hopefully you get the gist of what the sub will do. Yo can then call it from anywhere in the page/site depending on your setup.
|
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 17 November 2003 : 16:17:58
|
ok now i understand the concept but where does the script pull its email addresses from? or can that be aded to the code. Also i want the code to call itself on the event of the severity being a certain level and email the moderators in stealth mode without the poster of the message seeing it.Like i said i know very little ASP thanks again for your time (patience) |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 17 November 2003 : 20:11:10
|
In fact, sub is shorthand for SubProcedure, meaning a subprogram that won't return a value. A function is a subprogram that does return a value, after execution is completed . |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 18 November 2003 : 03:33:42
|
Thank you for all your comments and information can Can any body help me any further with the correct code that i need.
|
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 18 November 2003 : 16:35:32
|
can anyone help out with this code? |
|
|
Dave.
Senior Member
USA
1037 Posts |
Posted - 18 November 2003 : 16:44:53
|
Take a look at how pop_mail.asp works, that should get you started. |
|
|
uraken
New Member
United Kingdom
75 Posts |
Posted - 19 November 2003 : 10:42:26
|
Thanks dave i have a had a look at but with limited asp knowledge it makes little sense. Its a a real shame as thats the last thing i wanted to do on my forum and its complete. I'll keep asking hopefully someone will have the knowledge thanks again. |
|
|
|
Topic |
|