1
deka87
dirty words censorship
  • 2011/12/6 12:48

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


hi guys,

it there any way use xoops censorship for a certain part of the page only? thanks in advance
Mind anchors

2
trabis
Re: dirty words censorship
  • 2011/12/6 13:57

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi,
not without hacking core :(
You will have to edit class/textsanitizer/censor/censor.php and change $censorConf['censor_enable'] to true or false depending on a global var that you set on your page.

In you page you can use :
$GLOBALS['use_censor'] = true;
//here goes the script that gets the objects you need to censor(filter) 
$GLOBALS['use_censor'] = false;


and in censor.php you can use:
$censorConf['censor_enable'] = false;
if (@
$GLOBALS['use_censor']) {
    
$censorConf['censor_enable'] = true;
}

3
deka87
Re: dirty words censorship
  • 2011/12/6 14:47

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


ok i see. thanks trabis! one more question. is xoops censorship supposed to work with all modules if enabled? i ask because I use the lexikon module with the xoops censor enabled but it doesn't affect a thing.
Mind anchors

4
trabis
Re: dirty words censorship
  • 2011/12/6 19:12

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

deka87 wrote:
is xoops censorship supposed to work with all modules if enabled? i ask because I use the lexikon module with the xoops censor enabled but it doesn't affect a thing.


Censor is used by XoopsObject class. If lexicon uses XoopsObjects, then it
should be working. Note that censor does not apply to admin user. You'll need to login in a user account to test it.

May you provide me a link to download lexicon? Thanks.

5
deka87
Re: dirty words censorship
  • 2011/12/6 20:40

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


sure thing it's in repositoryhttps://xoops.org/modules/repository/singlefile.php?cid=100&lid=1910. mine is heavily hacked but the structure is the same.
Mind anchors

Login

Who's Online

183 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits