Support ⇒ Requests ⇒ Multilang check_words() ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexRequests

Multilang check_words()

Poll: How check words should works?
Store them in lang files 1
Store them in a database table 0
Im quite fine using the config.php check_words array 1
Total Votes 2

2 ways to have a multi lang check_words

  • Checks all languages
    • have a central check_words.php where to store the words in different lang
      • positive: 100% secure about bad words in any lang!
      • negative: slow down page generation of ~25%
      • negative: cvs root writers have to do all the work if any lang update needs to be merged


  • Check english and and main site lang, if these are the same then only main lang will be used
    • have the check_words array moved in language/*/main.php
      • positive: double check langs increasing by 100% the 'security' against bad words
      • positive: generation page time doesnt not change
      • positive: easy to menage by translators, cvs updates by translators
      • negative: none

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


there are around 1.000.000 bad word posseblities in 1 language.

How slow you wanna go ?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


I'm not talking about have an encyclopedia of bad word,

right know we are fetching about 70 words in different langs

the check_words function is used only when posting with a generation page es.: 0.3 checking 10 times more of bad words the generation page will be no more the 0.7 ... only when posting

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


hmm, then factor in the impact of X users all adding an extra 0.4, not to mention serch engine bots - might be a problem 😉

DonationsPro for DragonflyCMS & SMF

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Today results are: Check_words works only after an user click on submit.
Only registered users can submit, no bots or search engine or visitors can do that.

Having more then 90 bad words in english + more then 100 bad words in Italian, 5 $_POST using the check_words function and array_unique to strip duplicate: the generation page is around 20% more (3 seconds vs 3.6 seconds).

Previusly, high page generation time was because of a very poor code.

I'm using the method english + currentlang (if != english).

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS

All times are UTC
This forum is locked: you cannot post, reply to, or edit topics. Forum IndexRequests
Page 1 of 1


Jump to: