vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - FractalizeR: Extended Post Censor (https://vborg.vbsupport.ru/showthread.php?t=162548)

FractalizeR 11-11-2007 10:00 PM

FractalizeR: Extended Post Censor
 
What this hack does?
This hack is a post censor, that will replace unwanted words and phrases by the values you specify.

Features:
  • Supports standard replace
  • Supports replacing using regular expressions
  • Allows to apply censor only to specified usergroups
  • On-the-fly regular expression syntax checking

Some use cases:
  • I don't like posts with multiple exclamation or question marks. Maximum three signs is allowed.
  • Sometimes you ban competitor forum names from using on your forum. But users enter them separating letters by spaces or underscores. This is unwanted and it is difficult to deal with using standard censor
  • Any forms of curses and bad words should be replaced by XXX

Version was tested under VB 3.6.8, but supposed to work on any 3.6.x release. Please report all compatibility issues here.

Please look at control panel screenshot below (please mind, that I am russian and screenshots are from russian forum, so for example usergroup names are incorrectly displayed when I set langauge to English).

FreshFroot 11-12-2007 08:08 PM

hmm looks really good. I know a lot of people try to bypass the filters with spaced.

Just wondering, can this also bypass other characters besides the basic alphabet? Because I know people were using other characters that look like the alphabet to bypass the filters, not sure if your hack can filter it or not?

zglows 11-12-2007 08:35 PM

cool!

FractalizeR 11-12-2007 08:41 PM

Quote:

Originally Posted by FreshFroot (Post 1381277)
Just wondering, can this also bypass other characters besides the basic alphabet? Because I know people were using other characters that look like the alphabet to bypass the filters, not sure if your hack can filter it or not?

Yes, of course. You can use \xhh in search pattern, that denotes symbol with hexadecimal code hh. You can read more about this here: http://ru2.php.net/manual/en/ref.pcre.php

brandondrury 11-12-2007 09:33 PM

I'm not sure if I did something wrong or not, but it's not working. The text isn't showing up and I'm getting the following errors.

Warning: array_keys() [function.array-keys]: The first argument should be an array in \includes\class_postbit.php(296) : eval()'d code on line 15

Warning: array_values() [function.array-values]: The argument should be an array in \includes\class_postbit.php(296) : eval()'d code on line 15

Warning: array_keys() [function.array-keys]: The first argument should be an array in \includes\class_postbit.php(296) : eval()'d code on line 23

Warning: array_values() [function.array-values]: The argument should be an array in \includes\class_postbit.php(296) : eval()'d code on line 23

Warning: preg_replace() [function.preg-replace]: Empty regular expression in \includes\class_postbit.php(296) : eval()'d code on line 23

I'm using 3.6.8 on a local Xampp server.

Brandon

FractalizeR 11-12-2007 10:07 PM

Could you please show me a screenshot of your settings in control panel?

brandondrury 11-13-2007 03:52 AM

I had done several of my arrays, but always came up with the same result. I ended up just copying and pasting your sample array even though I don't see anyone typing "StringIWantToReplaceInto1" anytime soon. :) Still, no luck.

Brandon

projectego 11-13-2007 07:35 AM

[high]* projectego clicks install :)[/high]

FractalizeR 11-13-2007 11:21 AM

brandondrury, have you get rid of those nasty error messages? I cannot reproduce this situation on my forum. About filter - have you set usergroups this filter should be applied to? Filtering will work only for usergroups you select.

Does someone who also installed this hack has any problems with it?

Elenna 11-13-2007 11:06 PM

I havn't tried it yet, i'm still fiddling with the expressions. How would I go about doing the same for multiple question marks? When I put a ? in there, it tells me that there is something wrong with my expression.

Here is what I have in the Regular Expression part:
Code:

Return(array(
'/!{3,}/' => '!!!',
'/?{3,}/' => '???'
));

I would also like to limit the signs to just one. Would I just change the code to:
Code:

Return(array(
'/!{1,}/' => '!',
'/?{1,}/' => '?'
));



All times are GMT. The time now is 09:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03603 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete