Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
When a post is made to the board, the censorship function seems to be reading all spaces as bad words. In place of any space it puts [censored]. There are no extra spaces in the bad word file. Any ideas as to what the problem is?


Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
It sounds like maybe it is unable to find that file. Do you have your php.ini set to auto-prepend=on?


UBB.threads Developer
Joined: Mar 2000
Posts: 84
Member
Member
Offline
Joined: Mar 2000
Posts: 84
This may very well be an issue with changing $config[path] to $config[phpurl] in the addpost.php script. I had the same behavior before I changed mine.

---------
Shalazar
www.charisma-carpenter.com

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
guess what... I had to change it back into $config[path]


Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Do you have a blank line or a line with a space on it in your bad words file? If you can put your cursor on a line below the last listed bad word, try using the delete-backspace key to delete up to the previous line. Who knows, it might help.


Sponsored Links
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
If you remove all the words from the file, this also happens. I took them out, and it did the same thing to me. I put in a random, nonsense word so something would be present, and the problem cleared up.

--
Geoffrey J. Schaller ([email protected])
http://www.psi-13.com/

Joined: Feb 2000
Posts: 2
Lurker
Lurker
Offline
Joined: Feb 2000
Posts: 2
I just downloaded the 5.4.3 PHP version and this problem still exists in addpost.php.

Lines 127 and 152 are using the wrong variable.
They need to be changed to:
$config[path]

I could have sworn this was fixed in an earlier release.

Joined: Feb 2001
Posts: 6
Lurker
Lurker
Offline
Joined: Feb 2001
Posts: 6
I had a problem with bad words filtering too. Found out that the bad-wordsfile rows were not ended width \n.
Modified the file doeditfilter.php under admin like this

// ----------------------------------
// Need to get rid of any blank lines
$bodyparts = explode("\n",$body);
$bodysize = sizeof($bodyparts);

$body = "";
for ( $i=0; $i<$bodysize; $i++) {
$bodyparts[$i] = ereg_replace("\r|\n","",$bodyparts[$i]);
if ($bodyparts[$i]) {
$body .= "$bodyparts[$i]\n";
}
}

The second problem I run into was that the bad words filter was case sensitive on my server (Linux) but not on my own computer (win2k).
Changed the bad words code in addpost.php and modifypost.php from this:

$Subject = preg_replace("/\b($badwords)\b/i",$config[censored],$Subject);
$Body = preg_replace("/\b($badwords)\b/i",$config[censored],$Body);


to this

$Subject = eregi_replace("[[:<:]]($badwords)[[:>:]]",$config[censored],$Subject);
$Body = eregi_replace("[[:<:]]($badwords)[[:>:]]",$config[censored],$Body);







Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)