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 DEV-Group
 DEV Bug Reports (Closed)
 BUG+FIX (v3.1SR4): Badwords in subject
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 16 January 2001 :  23:39:51  Show Profile
The following files were edited:

active.asp
forum.asp
pop_profile.asp
post.asp
post_info.asp
search.asp
topic.asp

I added formatStr to the display of the Topic Titles so that they would be filtered also.

You can download the fixed files here: http://www11.ewebcity.com/dssdbs/files/v31sr4_badwords_subject.zip

They are standard v31sr4 files.

I think I got all of the files where Topic Titles are displayed.

Note: the badwords will still be shown in the URL in the address bar of the browser, and in the links to the Topic itself. I wasn't sure what affect it would have to filter those as well.



Gor posted a better fix a few posts down

Edited by - Richard Kinser on 13 February 2001 16:08:55

rick7165
Senior Member

USA
1094 Posts

Posted - 17 January 2001 :  10:38:23  Show Profile  Visit rick7165's Homepage
Richard... Anyway of telling me what was changed? I'm using your forum layout, but I've got a bunch of mods installed in those files.

Thanks,
Rick

My Demo Site
www.eastpasco.com
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 17 January 2001 :  10:58:53  Show Profile
Basically,

everywhere the Topic Title is displayed,

I changed this:


<% =ChkString(Request.QueryString("Topic_Title"),"display") %>


to this:


<% =formatStr(ChkString(Request.QueryString("Topic_Title"),"display")) %>



But don't do a global search and replace. You only want to change the one's that display the Topic Title to the user, not the one's that place the Topic Title in the URL.

Also, in post_info.asp

there is no:


<% =ChkString(Request.QueryString("Topic_Title"),"display") %>


it looks like this:


<% =Request.QueryString("Topic_Title") %>


but I changed it to this anyway:


<% =formatStr(ChkString(Request.QueryString("Topic_Title"),"display")) %>



(also, if you look at the line above the line you just edited in post_info.asp you'll see the line that displays the Forum Title)

I changed this:


<% =Request.Form("FORUM_Title") %>


to this:


<% =ChkString(Request.Form("FORUM_Title"),"display") %>
Go to Top of Page

bugfix
Starting Member

Singapore
47 Posts

Posted - 17 January 2001 :  20:28:15  Show Profile
I use wincmp.exe to do file comparison and update.

You just need to drag and drop the changes, but the wincmp.exe configuration is a bit tricky. Just try it out.

I think it works with multiple files too.


A bug is always a bug, that's why bugfix is here ;)
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 17 January 2001 :  21:53:22  Show Profile  Visit gor's Homepage
I never thought of applying the Badwords filter to subject titles but it makes sence.
A problem with using formatstr() is that it then also would convert linebreaks, urls, e-mail adresses etc.
Wouldn't it be better to change it right at the "display" part of ChkString() so it would always be applied when displaying text:

if fField_Type = "display" then
if strAllowHTML <> "1" then
fString = HTMLEncode(fString)
end if
ChkBadWords(fString)
ChkString = fString
exit function


hmm, while typing remembered that wouldn't display HuwR his lastname anymore....

Ok, how about this :


function ChkString(fString,fField_Type)
fString = trim(fString)
if fString = "" then
fString = " "
end if
if fField_Type = "title" or _
fField_Type = "preview" then
if strAllowHTML <> "1" then
fString = HTMLEncode(fString)
end if
ChkBadWords(fString)
ChkString = fString
exit function
end if
if fField_Type = "decode" then
....


and change the calls for display of the title to:

<% =ChkString(Request.QueryString("Topic_Title"),"title") %>



Pierre
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 18 January 2001 :  03:02:13  Show Profile
Gor, that works for me.
Go to Top of Page

Capt_Dunzell
Junior Member

USA
160 Posts

Posted - 18 February 2001 :  17:17:56  Show Profile  Visit Capt_Dunzell's Homepage
Okay, Im confused on this one.

Where exactly do I need to put in the fix that gor has posted?





http://www.dunzellsden.com/forum/
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 19 February 2001 :  11:50:17  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
inc_functions.asp in the relavent function :)

Reinsnitz (Mike)
><)))'>
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 19 February 2001 :  21:23:02  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
fixed in the source of sf2k_31sr5a7.zip

Reinsnitz (Mike)
><)))'>
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 05 April 2001 :  17:58:49  Show Profile
I wasn't able to get it to work the way it is now.

I changed:

chkBadWords(fString)


to:

fString = chkBadWords(fString)


and it's working now.

Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07