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)
 Possible numerous requests to badwords table
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

-gary
Development Team Member

406 Posts

Posted - 30 June 2005 :  23:03:27  Show Profile
You might not consider this a bug since the install ships with default badword entries.

If you have 0 entries in the badwords table, calls to formatstr() will always produce a DB hit since the STRBADWORDWORDS app variable will always be blank. This can produce dozens of uneeded, albeit small, DB calls on a typical page view.<

KawiForums.com



Edited by - Davio on 26 September 2006 05:44:17

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 01 July 2005 :  00:11:05  Show Profile
if you have 0 entries, why not just turn the feature off?

If you leave it with no entries, then there is still going to have to be a call to check if there aren't any entries. Don't really see a way around that.<
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 01 July 2005 :  10:34:50  Show Profile
quote:
Originally posted by RichardKinser

if you have 0 entries, why not just turn the feature off?



Because someone might forget or not even realize that they should.

The fix is simple.

Else
txtBadWordWords = "0"
txtBadWordReplace = "0"
end if

Application.Lock
Application(strCookieURL & "STRBADWORDWORDS") = txtBadWordWords
Application(strCookieURL & "STRBADWORDREPLACE") = txtBadWordReplace
Application.UnLock
end if
txtBadWordWords = Application(strCookieURL & "STRBADWORDWORDS")
txtBadWordReplace = Application(strCookieURL & "STRBADWORDREPLACE")
If Not (txtBadWordWords = "0" And txtBadWordReplace ="0") Then
if fString = "" or IsNull(fString) then fString = " "
arrBWords = split(txtBadWordWords, ",")
arrBReplace = split(txtBadWordReplace, ",")
for i = 0 to ubound(arrBWords)
fString = Replace(fString, arrBWords(i), arrBReplace(i), 1, -1, 1)
Next
End if

The new badwords would have to be reloaded into the app variable if an update occurs since the function wil not keep checking for new entries every pass, but that's trivial.<

KawiForums.com


Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 06 August 2006 :  00:09:34  Show Profile
We could easily turn the bad word feature off when the last badword is deleted from the list. And automatically turn it back on when the admin adds at least 1 badword to the list.

If anyone has a better idea, let me know soon.<

Support Snitz Forums

Edited by - Davio on 06 August 2006 03:04:38
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 07 August 2006 :  01:35:50  Show Profile  Visit MarcelG's Homepage
quote:
Originally posted by Davio

We could easily turn the bad word feature off when the last badword is deleted from the list. And automatically turn it back on when the admin adds at least 1 badword to the list.
Brilliant in simplicity!<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 09 August 2006 :  03:41:32  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
quote:
Originally posted by Davio

We could easily turn the bad word feature off when the last badword is deleted from the list. And automatically turn it back on when the admin adds at least 1 badword to the list.

If anyone has a better idea, let me know soon.

Good and easy solution.
Maybe adding a status of the feature (or when the status was automatically changed) on the Bad Word Filter admin page would be a good idea as well.<

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 August 2006 :  00:04:08  Show Profile
Is there any reason why we have a "Are you sure?" confirmation before an admin deletes a bad word entry? Is deleting a bad word entry so critical that we need to ask for confirmation?

Following code in green has been added to admin_config_badwords.asp after line 309. Shortened long lines of code for this post.
Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ & _
size=""" & strHeaderFontSize & """><b>Bad Word Filter Configuration</b></font></p>" & vbNewLine
if iBadwordCount = "" then
	if strBadWordFilter = 1 then
		'If no badwords found, turn off Bad Word Filter option
		strDummy = SetConfigValue(1, "strBadWordFilter", "0")
		Application(strCookieURL & "ConfigLoaded") = ""
		
		Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ color=""" & _
strForumFontColor & """ size=""" & strDefaultFontSize & """ valign=""top"">Bad Word Filter feature & _
is turned <b>Off</b>.</font></p>"
	end if
elseif iBadwordCount = 0 then
	if strBadWordFilter = 0 then
		'Turn on Bad Word Filter option
		strDummy = SetConfigValue(1, "strBadWordFilter", "1")
		Application(strCookieURL & "ConfigLoaded") = ""
		
		Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ color=""" & _
strForumFontColor & """ size=""" & strDefaultFontSize & """ valign=""top"">Bad Word Filter feature & _
is turned <b>On</b>.</font></p>"
	end if
end if
Included the inc_func_admin.asp file also after line 38, to use the SetConfigValue() function.<

Support Snitz Forums

Edited by - Davio on 13 August 2006 00:09:50
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 August 2006 :  17:49:53  Show Profile
Removed confirmation when deleting a bad word.

Included in 3.4.06.<

Support Snitz Forums
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.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07