Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: mystik - helmikuu 25, 2005, 02:32:59 IP

Otsikko: Explicit display names
Kirjoitti: mystik - helmikuu 25, 2005, 02:32:59 IP
Can censored words be applied to explicit DISPLAY names??...(not usernames)
Otsikko: Re: Explicit display names
Kirjoitti: Oldiesmann - helmikuu 26, 2005, 01:00:59 IP
Sure...

Sources/Profile.php

Find
$_POST['realName'] = trim(preg_replace('/[\s]/', ' ', $_POST['realName']));

Replace with
$_POST['realName'] = censorText(trim(preg_replace('/[\s]/', ' ', $_POST['realName'])));
Otsikko: Re: Explicit display names
Kirjoitti: Amacythe - helmikuu 26, 2005, 01:38:29 IP
Shouldn't this be a default function?
Otsikko: Re: Explicit display names
Kirjoitti: codenaught - helmikuu 26, 2005, 01:48:34 IP
You can always use the set reserved names feature for bad names.

LainaaReserved names will keep members from registering certain usernames or using these words in their displayed names.
Otsikko: Re: Explicit display names
Kirjoitti: Amacythe - helmikuu 26, 2005, 01:54:33 IP
True, but this is duplicating efforts.  If a word is censored, it should be censored in both places.
Otsikko: Re: Explicit display names
Kirjoitti: [Unknown] - helmikuu 27, 2005, 05:23:26 AP
I plan to fix this in 1.1, actually.  Members simply shouldn't be able to use censored words in their names.

-[Unknown]
Otsikko: Re: Explicit display names
Kirjoitti: mystik - maaliskuu 02, 2005, 07:51:57 IP
Lainaus käyttäjältä: Oldiesmann - helmikuu 26, 2005, 01:00:59 IP
Sure...

Sources/Profile.php

Find
$_POST['realName'] = trim(preg_replace('/[\s]/', ' ', $_POST['realName']));

Replace with
$_POST['realName'] = censorText(trim(preg_replace('/[\s]/', ' ', $_POST['realName'])));


i havent tried this yet but this would appear to be for the profile page...what about other pages such as the member list, whos online , message index etc..??
Otsikko: Re: Explicit display names
Kirjoitti: [Unknown] - maaliskuu 02, 2005, 10:20:09 IP
Well, that would save it when they change their profile, so it would be saved censored....

It would not be retroactive, though, and wouldn't change when you enable/disable/modify the censored words.

-[Unknown]