Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Block unwanted postings..

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Presario Posted - 04 December 2006 : 11:55:13
Please forgive me if this has already been asked in the past (Ive tried looking but cant find anything.).

I am trying to write a little script into the forum which will STOP any postings about a certain football/soccer team (local team I may add and not a professional club)..

Obviously the script will need to check the input box where the message is being written in and when submitted a warning will appear telling the user his/her posting WILL NOT be accepted.

I know I can use the bad word filter but this doesnt really do want I want.

I need to STOP the posting happening and the user being redirected either back to the posting screen OR back to the main forum index.

If anyone could help with this then I would be indebted..

<
8   L A T E S T    R E P L I E S    (Newest First)
Shaggy Posted - 05 December 2006 : 04:16:09
I'd also recommend going the moderation route rather than hard coding checks for strings that members can easily get around; with moderation turned on, your admins and moderators can delete any posts that mention the team before other members see them and send an e-mail to the posting member informing them why their post was deleted.

<
RArch Posted - 04 December 2006 : 16:53:13
Glad it helped, why dont you post what you did as others may find it useful.
<
Presario Posted - 04 December 2006 : 16:10:03
quote:
Originally posted by RArch

You could improve your code by using the Instr function to search all "postTxt" for occurrences of your banned words.

Take a look here for some examples:
http://www.w3schools.com/vbscript/func_instr.asp

You should be able to use like this:

postTxt = lcase(postTxt) ' change to lower case
if Instr(postTxt, "fc united") or Instr(postTxt, "fc utd")... then ...





That is EXACTLY what I needed!!! Many thanks.. I have just incorporated that code (with some slight changes) into the post_info.asp page and it does what I need!

I agree there are ways around it if people want to post comments on the team `fc united` and I will sort that as and when , but hopefully when people go and try to post as they are doing, then this new script MAY put them off in the future...

Cheers anyway and thanks to all of you for your help!!
<
RArch Posted - 04 December 2006 : 15:37:50
You could improve your code by using the Instr function to search all "postTxt" for occurrences of your banned words.

Take a look here for some examples:
http://www.w3schools.com/vbscript/func_instr.asp

You should be able to use like this:

postTxt = lcase(postTxt) ' change to lower case
if Instr(postTxt, "fc united") or Instr(postTxt, "fc utd")... then ...

<
MaD2ko0l Posted - 04 December 2006 : 14:18:03
i think u woudl have to moderate all the posts before they are viewable to the public.

the way you are trying to do it is to stop people from posting useing certain words but u can use different words/combinations to overcome what you have at the moment.<
Presario Posted - 04 December 2006 : 14:07:06
Done that but it doesnt do what I want it to do unfortunately..


Yes I agree it deletes the names but Im after the posting not being accepted in full..<
pdrg Posted - 04 December 2006 : 13:52:45
Or could you add the team's name to the badwords (swearwords) list?<
Presario Posted - 04 December 2006 : 13:18:46
Right, I have got close to what I need to achieve :


select case MethodType case "Topic", "EditTopic", "TopicQuote", "Reply", "Edit", "ReplyQuote"
postTxt = trim(Request.Form("Message"))
if postTxt = "FC United" OR postTxt = "fc united" or postTxt = "fc utd" or postTxt = "FC Utd" or postTxt = "FC utd" or postTxt = "FCUoM" then Go_Result "Your post must NOT contain anything to do with FC United!", 0
end select


The problem with this is, if a member enters a message and includes any of the terms "FC United"... somewhere in the message it doesnt pick it up.

However, if they START the message with any of the terms it WILL pick it up and tell the poster that they cannot carry on with the posting when they submit.


So can anyone advise on how to change the script to scan the entire message, picking up the `FC` terms along the way??

<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07