Dolphin nicknames filter from eSASe

Nicknames Filter modification is:

1 To prevent usernames which you don't want to have on your website
2 Easy to install
3 Easy to use
4 Easy to set up and manage

Welcome to test this module on Dolphinteam.net. Try to register with these prohibited usernames:

admin, administrator, system, moderator

http://www.boonex.com/unity/extensions/entry/Dolphin_nicknames_filter

We only have a unique modules for dolphin!
Quote · 14 Jun 2010

For some reason when I installed the module, the nickname filter check finds ALL and ANY attempted nickname to be in the prohibited nickname list. I checked each function in your code individually and they work as it should so the module SHOULD work as intended.

 

I think that the problem lies in the check of the field. When I removed the

 

BxDolService::call('nickname_filter', 'check', $arg0)

 

from the check field (and cleaned the cache),  nicknames would register again normally (albeit without the check for prohibited nicks), and so it's not something else that's causing that behaviour. So my suspicion lies on the service call function. Either it can't find the class for some reason, or the service function and defaults to false.

 

Any ideas?

 

Quote · 27 Jan 2011

 

For some reason when I installed the module, the nickname filter check finds ALL and ANY attempted nickname to be in the prohibited nickname list. I checked each function in your code individually and they work as it should so the module SHOULD work as intended.

 

I think that the problem lies in the check of the field. When I removed the

 

BxDolService::call('nickname_filter', 'check', $arg0)

 

from the check field (and cleaned the cache),  nicknames would register again normally (albeit without the check for prohibited nicks), and so it's not something else that's causing that behaviour. So my suspicion lies on the service call function. Either it can't find the class for some reason, or the service function and defaults to false.

 

Any ideas?

 

Sorry not sure that understood you correctly!

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 28 Jan 2011

When I installed this mod, when a new user tries to register to the site the mod prevents them from signing up telling them that the nickname they chose is in the nickname filter list, even if it is not.

 

I tried to debug the mod myself to see where the problem lies. I tried each function of the module and it seems that they all work as they should. Database queries return the correct results as expected.

 

However, the mod installation script adds this as a condition to the nickname field check:

 

BxDolService::call('nickname_filter', 'check', $arg0)

 

For some reason, this returns ALWAYS false, which makes me believe that it does not actually manage to find the module and call it. Maybe it's a naming scheme problem?

Quote · 29 Jan 2011

 

When I installed this mod, when a new user tries to register to the site the mod prevents them from signing up telling them that the nickname they chose is in the nickname filter list, even if it is not.

 

I tried to debug the mod myself to see where the problem lies. I tried each function of the module and it seems that they all work as they should. Database queries return the correct results as expected.

 

However, the mod installation script adds this as a condition to the nickname field check:

 

BxDolService::call('nickname_filter', 'check', $arg0)

 

For some reason, this returns ALWAYS false, which makes me believe that it does not actually manage to find the module and call it. Maybe it's a naming scheme problem?

Hmmm...this module never got me error like this. Provide me with your site FTP, I will check it

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 30 Jan 2011

I cannot provide you ftp credentials (security paranoia etc.) However I have pinpointed what is wrong with your mod and frankly I don't know how you've never spotted that it's not working as it should (i.e. always returns false no matter what nickname you put).

 

The problem was indeed with

BxDolService::call('nickname_filter', 'check', $arg0)

arguments for the BxDolService::call function have to be passed in the form of an array. Changing that to:

BxDolService::call('nickname_filter', 'check', array($arg0))

solved the problem.

Quote · 31 Jan 2011

 

I cannot provide you ftp credentials (security paranoia etc.) However I have pinpointed what is wrong with your mod and frankly I don't know how you've never spotted that it's not working as it should (i.e. always returns false no matter what nickname you put).

 

The problem was indeed with

BxDolService::call('nickname_filter', 'check', $arg0)

arguments for the BxDolService::call function have to be passed in the form of an array. Changing that to:

BxDolService::call('nickname_filter', 'check', array($arg0))

solved the problem.

Ok thank you! this trouble was fixed

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 1 Feb 2011

Hi,

is there a way that if I add a filter like "death" and someone use username "death4enemy" that it will be blocket as well?

Diddy is not greedy and has time. Dolphin is cool and its not just mine :-)
Quote · 17 Dec 2011

hello this is super however are you able to update is so that it blocks words not wanted within nick names ??

 

for example:-   Admin blocks word:-  'sex'      user creates name called:-  'freesex'     Reaction:- causes block/request different name ?!

 

the problem is most people use different word combinations etc  and I think blocking in this was would be far more effective etc

 

Regards

 

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 8 Jan 2012

yes yes add some options to it and sell it for $20 ill  buy it :) also when it returns the error that a user cant register a nickname make it so it uses a new error msg. not the default.

keep one as a free mod and the new one sell ..

Quote · 8 Jan 2012

This is a very useful module.   Who has installed it in D7.09 and can leave a review? 
Downloading now Laughing

Quote · 19 Feb 2012

 

This is a very useful module.   Who has installed it in D7.09 and can leave a review? 
Downloading now Laughing

 I have it installed on D 7.0.9 with no issues... appears to work as advertised. 

http://pkforum.dolphinhelp.com
Quote · 19 Feb 2012

 

 

This is a very useful module.   Who has installed it in D7.09 and can leave a review? 
Downloading now Laughing

 I have it installed on D 7.0.9 with no issues... appears to work as advertised. 

 Thank you ePaulo for the comment.  I appreciated that, 

Quote · 19 Feb 2012

This is a great MOD. Just wondering if anyone has a list of blocked names they would be willing to share. So far I can only come up with the obvious.

Quote · 15 Apr 2012

well,

obvious would be all the bad words..

fu*k*face,cu*tlick, and so on...

[edit] open your mind 

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 15 Apr 2012

The plugin works thanks!

But currently its kind of useless because the filter can be bypassed by just adding a single charakter to the nickname. It would be 100% working if the nickname is being substring searched with the words of the filter list and not only directly compared if its in the list.

 

hello this is super however are you able to update is so that it blocks words not wanted within nick names ??

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 27 May 2012

I made some changes, so nicknames are checked now against substrings and not the whole word only.

In /modules/esase/nickname_filter/classes/SasNicknameFilterDb.php find

        function checkNickName($sNickName)
        {

right below add/insert

                $sNickName = strtolower($this -> escape($sNickName));
                $sQuery = "SELECT `nick_names` FROM `{$this ->sTablePrefix}_items`";

                $aResult = explode(",", $this -> getOne($sQuery));
                $bReturn = FALSE;

                foreach($aResult as $sFilterwordCheck)
                {
                        if (!(strpos($sNickName, strtolower(trim($sFilterwordCheck))) === FALSE))
                        {
                                $bReturn = TRUE;
                                break;
                        }
                }
                return $bReturn;

comment/remove these three lines

                // $sNickName = $this -> escape($sNickName);
                // $sQuery = "SELECT COUNT(*) FROM `{$this ->sTablePrefix}_items` WHERE FIND_IN_SET('{$sNickName}', `nick_names`)";

                // return $this -> getOne($sQuery);

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 27 May 2012

 Just to be sure what your saying .... this change will stop bad words even within words ?!

For example if 'c*ck' is blocked by admin .... if user adds 'nicec*ock' the word will still be not allowed ?

 

I made some changes, so nicknames are checked now against substrings and not the whole word only.

In /modules/esase/nickname_filter/classes/SasNicknameFilterDb.php find

        function checkNickName($sNickName)
        {

right below add/insert

                $sNickName = strtolower($this -> escape($sNickName));
                $sQuery = "SELECT `nick_names` FROM `{$this ->sTablePrefix}_items`";

                $aResult = explode(",", $this -> getOne($sQuery));
                $bReturn = FALSE;

                foreach($aResult as $sFilterwordCheck)
                {
                        if (!(strpos($sNickName, strtolower(trim($sFilterwordCheck))) === FALSE))
                        {
                                $bReturn = TRUE;
                                break;
                        }
                }
                return $bReturn;

comment/remove these three lines

                // $sNickName = $this -> escape($sNickName);
                // $sQuery = "SELECT COUNT(*) FROM `{$this ->sTablePrefix}_items` WHERE FIND_IN_SET('{$sNickName}', `nick_names`)";

                // return $this -> getOne($sQuery);

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 27 May 2012

Yes, for example you want to stop the word "xyz" then a nickname like "iamXYZcool" will be blocked, same as your example. But there is no wildcard * support, it only checks if the nickname contains any of the admin words, then blocks it.

 

 Just to be sure what your saying .... this change will stop bad words even within words ?!

For example if 'c*ck' is blocked by admin .... if user adds 'nicec*ock' the word will still be not allowed ?

 

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 27 May 2012

This is a very good idea... but you have to choose which way to filter.  It would be nice to have both options, i.e. a list to block exact words... and another list to block word fragments.  For example, some word fragments, like "ass", could show up within lots of acceptable nicknames... as well as a few nasty ones.  Other word fragments are unusual enough that simply blocking all instance of it will a good idea, e.g. "sex".

Yes, for example you want to stop the word "xyz" then a nickname like "iamXYZcool" will be blocked, same as your example. But there is no wildcard * support, it only checks if the nickname contains any of the admin words, then blocks it.

 

 Just to be sure what your saying .... this change will stop bad words even within words ?!

For example if 'c*ck' is blocked by admin .... if user adds 'nicec*ock' the word will still be not allowed ?

 

 

http://pkforum.dolphinhelp.com
Quote · 27 May 2012

Its easy to add this but it only makes sense if its being done by esase in the original package instead of patching it into the installed module. Changing existing code is ok, but for admin panel i wouldn't suggest it.

 

But i can add a few code lines so you can define words marked to be treated as full words.

Then you only need to surround the word in the list with two '*' or any other char you can define

for example:

1) *admin* and a nickname badminton wouldn't block it

2) admin and a nickname badminton will block it

I can do this tomorrow

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 27 May 2012

Added the changes discussed before. See file for more information

func_replacement.txt · 2.2K · 321 downloads
Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 28 May 2012

I tested your code and it appears to work very well.  Something as simple as blocking the use of more than one underscore or minus sign (e.g. "--", "__") is a very nice benefit.  Before this a person could create a nickname full of underscores and/or minus signs.  Thank you dately!  

Added the changes discussed before. See file for more information

 

http://pkforum.dolphinhelp.com
Quote · 28 May 2012

I am looking forward to trying this too : )

Quote · 28 May 2012

I tried it and it returned the following error:-

 

Parse error: syntax error, unexpected $end, expecting T_FUNCTION in /home/********/public_html/modules/esase/nickname_filter/classes/SasNicknameFilterDb.php on line 102


function checkNickName($sNickName)
        {
                $sNickName = strtolower($this -> escape($sNickName));
                $sQuery = "SELECT `nick_names` FROM `{$this ->sTablePrefix}_items`";
                $aResult = explode(",", $this -> getOne($sQuery));
                $bReturn = FALSE;

                foreach($aResult as $sFilterwordCheck)
                {
                        $sFilterwordCheck = strtolower(trim($sFilterwordCheck));
                        $iLenFilterword = strlen($sFilterwordCheck);
                        if ($iLenFilterword > 0)
                        {
                                if ($sFilterwordCheck[0] == "*")
                                {
                                        if ($sNickName == substr($sFilterwordCheck, 1, $iLenFilterword))
                                        {
                                                $bReturn = TRUE;
                                                break;
                                        }
                                } else {
                                        if (!(strpos($sNickName, $sFilterwordCheck) === FALSE))
                                        {
                                                $bReturn = TRUE;
                                                break;
                                        }
                                }
                        }
                }
                return $bReturn;
                }


is above code wrong in anyway please ?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 28 May 2012

Is the end of your file

                }
                return $bReturn;
                }

or

                }
                return $bReturn;
                }

     } // Don't remove this one!

Maybe you removed the last closing bracket "}" not belonging to this function? If not write me a message so we can see whats wrong

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 29 May 2012

when users join via ' live join' (facebook, twitter etc etc) and they are directed to entering a username >>

they are still able to enter bad words I have blocked

does this only work via standard registration form ?

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 29 May 2012

So your problem was the missing "}" ?

I never used facebook connect etc. but i think they not use anything of the join form. If so then esase's module has no effect on them.

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 29 May 2012

 Yes, thank you very much for helping me out there!

This is the module I'm ment:-  http://www.boonex.com/m/RPX_Integration_Login_for_D7

 

So your problem was the missing "}" ?

I never used facebook connect etc. but i think they not use anything of the join form. If so then esase's module has no effect on them.

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 29 May 2012

Pls ask the developer of this mod to check nicknames against esase's module/function or ask him how to implement it. I think this can be easily done.

 

This is the module I'm ment:-  http://www.boonex.com/m/RPX_Integration_Login_for_D7

 

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 29 May 2012

 This is fantastic!  Thanks for posting this little modification - this should be standard in Dolphin.

 

Added the changes discussed before. See file for more information

 

Quote · 18 Jun 2012

Does this fix still work or is it not supported in Dolphin 7.1.4 ?

Quote · 27 Dec 2013

It would be nice if it was available for 7.1.4  any chance?

Quote · 10 Apr 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.