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)

Big_Ern 11-18-2007 08:10 AM

Darn, I was hoping it might do titles too. That's one of the big things that would be usefull to censor on my forum.

I'll take a look into the hack & settings to see if I can make it work.... What version of PHP are you running?

FractalizeR 11-19-2007 08:53 AM

I am running 5.2.1. But hack should work on all PHP versions, that VB support.
I will also take a look. The problem is, that thread titles are displayed in many templates and deep hacking is needed.

ePrOmD 11-19-2007 12:57 PM

hi fractalizer

i wanna use your hack to filter mails directions.

so everytime that some user writes somebody@someserver.another.com the hack will replace it with XXXXXX@XXXX.XXX
i don?t have idea of expressions, so i dont know, how can i do it :$
so it?ll be very grateful if you guide me to do that

Skublum 11-19-2007 09:37 PM

Quote:

Originally Posted by brandondrury (Post 1381327)
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

Brandon

I know what the problem you are having is.

It is simply that you need to put a comma after the single quote if there is going to be ANOTHER thing to censor after it.

In other words the comma should be after each one with the exception of the last one

so it SHOULD look like this

PHP Code:

return(array(

'StringIWantToReplaceFrom1' => 'StringIWantToReplaceInto1',

'StringIWantToReplaceFrom2' => 'StringIWantToReplaceInto2',

'StringIWantToReplaceFrom3' => 'StringIWantToReplaceInto3',

'StringIWantToReplaceFrom4' => 'StringIWantToReplaceInto4',

'StringIWantToReplaceFrom5' => 'StringIWantToReplaceInto5'

)); 


Skublum 11-19-2007 09:51 PM

One thing that I might just be missing or it might not exist,

the ability to remove case sensitive blocking. So that if it is at the beginning of a sentence and is capitalized it still gets blocked.

Big_Ern 11-20-2007 06:33 AM

Quote:

Originally Posted by Skublum (Post 1385876)
I know what the problem you are having is.

It is simply that you need to put a comma after the single quote if there is going to be ANOTHER thing to censor after it.

In other words the comma should be after each one with the exception of the last one

so it SHOULD look like this

PHP Code:

return(array(

'StringIWantToReplaceFrom1' => 'StringIWantToReplaceInto1',

'StringIWantToReplaceFrom2' => 'StringIWantToReplaceInto2',

'StringIWantToReplaceFrom3' => 'StringIWantToReplaceInto3',

'StringIWantToReplaceFrom4' => 'StringIWantToReplaceInto4',

'StringIWantToReplaceFrom5' => 'StringIWantToReplaceInto5'

)); 


But the examples we tried all had coma's at the end of each line....

Even if I try it with the default installed blank setting I get the errors. I used this:
Code:

return(array());
And I get error'ss with these samle ones too:
Code:

return(array(
'StringIWantToReplaceFrom1' => 'StringIWantToReplaceInto1',
'StringIWantToReplaceFrom2' => 'StringIWantToReplaceInto2'
));


WTF, just got a msn from a board member while I was testing... setting says its set to admins only, but my friend got the same errors and he is just a regular basic user, so this mod should not even be affecting him....


Quote:

Originally Posted by Skublum (Post 1385890)
One thing that I might just be missing or it might not exist,

the ability to remove case sensitive blocking. So that if it is at the beginning of a sentence and is capitalized it still gets blocked.

Regex does that if you put '/wordToReplace/i' The i makes it case insensitive.

FractalizeR 11-21-2007 02:22 PM

Quote:

Originally Posted by ePrOmD (Post 1385535)
hi fractalizer

i wanna use your hack to filter mails directions.

so everytime that some user writes somebody@someserver.another.com the hack will replace it with XXXXXX@XXXX.XXX
i don?t have idea of expressions, so i dont know, how can i do it :$
so it?ll be very grateful if you guide me to do that

Try such regex:
'/\s+[A-Za-z_\.]+@[A-Za-z_]+\.[A-Za-z_]+\s+/' =>'XXX@XXX.XXX'

2Big_Ern:
Still cannot reproduce error on my PC, but will check these days.

Big_Ern 11-22-2007 12:48 AM

i just find it odd that me & bandonury are getting the same error.... I'm trying to think what might be causing it, but my forum has no other mods installed and I am on a good host that usually never has any tech problems r limitations like some of the free hosts....

thanks for looking into it. I hope we can find a solution, as I would love to install your mod:cool:

Skublum 11-22-2007 08:55 PM

Is there anyway this could work for people using different cases. I don't care if they use different characters to get the word across, that is against my forums rules and they will be warned, but I hate punishing those who know of the censor and just type the word anyway expecting it to be blocked but then because it was at the beginning of a sentence or they write in all caps it gets by.

Big_Ern 11-22-2007 11:17 PM

Make it case insensitive
Quote:

Originally Posted by Big_Ern (Post 1386104)
Quote:

Originally Posted by Skublum (Post 1385890)
One thing that I might just be missing or it might not exist,

the ability to remove case sensitive blocking. So that if it is at the beginning of a sentence and is capitalized it still gets blocked.

Regex does that if you put '/wordToReplace/i' The i makes it case insensitive.



All times are GMT. The time now is 10:14 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.02583 seconds
  • Memory Usage 1,754KB
  • 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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