Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Explicit display names

Aloittaja mystik, helmikuu 25, 2005, 02:32:59 IP

« edellinen - seuraava »

mystik

Can censored words be applied to explicit DISPLAY names??...(not usernames)

Oldiesmann

Sure...

Sources/Profile.php

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

Replace with
$_POST['realName'] = censorText(trim(preg_replace('/[\s]/', ' ', $_POST['realName'])));
Michael Eshom
Christian Metal Fans

Amacythe

Shouldn't this be a default function?

codenaught

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.
Dev Consultant
Former SMF Doc Coordinator

Amacythe

True, but this is duplicating efforts.  If a word is censored, it should be censored in both places.

[Unknown]

I plan to fix this in 1.1, actually.  Members simply shouldn't be able to use censored words in their names.

-[Unknown]

mystik

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..??

[Unknown]

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]

Advertisement: