vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Replace censored text with an image (https://vborg.vbsupport.ru/showthread.php?t=53665)

Gary King 05-31-2003 10:00 PM

Replace censored text with an image
 
Replace censored text with an image

What does this hack do?

Instead of replacing censored text with a character (like censor with ******), it will instead replace the text with one user-defineable image instead.

How do I install this?

Simply read the instructions in the attached file.


Notes

This hack will...
  • only work for forums where either HTML code and/or image BB code is enabled
  • not censor properly in thread topics

If there is enough demand for the above features to be included, then I will include them.

Dan 06-01-2003 02:05 AM

Nice one Gary.... If i can find an interesting image I'll use it

Christine 06-01-2003 02:05 AM

Wow -- that was quick! :classic:

I am having a problem with it though -- It is pulling through the path to the image path on the post, not the image itself.

What am I missing?

Cheers!

Gary King 06-01-2003 02:17 AM

Quote:

Today at 11:05 PM Oricon said this in Post #2
Nice one Gary.... If i can find an interesting image I'll use it
An image is now attached to the first post of this thread. Check it out ;)

Gary King 06-01-2003 02:18 AM

Quote:

Today at 11:05 PM Christine said this in Post #3
Wow -- that was quick! :classic:

I am having a problem with it though -- It is pulling through the path to the image path on the post, not the image itself.

What am I missing?

Cheers!

Please copy and paste the code where you have included the image's path, and maybe 2-3 lines above and below it.

Christine 06-01-2003 02:25 AM

Here ya go!
PHP Code:

    while (list($key,$val)=each($censorword)) {
      if (
$val!="") {
        if (
substr($val,0,2)=="\\{") {
          
$val=substr($val,2,-2);

          
$text=trim(preg_replace("/([^A-Za-z])".$val."(?=[^A-Za-z])/si","\\1".repeatchar($censorchar,strlen($val)),$text "));
        } else {
          
$censorimage="http://www.sitename.com/images/attach/censored.gif";
                    
$text=trim(preg_replace("/$val/si","<img src='$censorimage'>",$text "));
        }
      } 

Cheers!

Christine 06-01-2003 02:30 AM

Here is another image to look at as well.

Cheers!

Boofo 06-01-2003 02:34 AM

I'm having the same problem as Christine. No image, just the path shows.

Gary King 06-01-2003 02:41 AM

Mind posting a URL to a post containing a censored word so I can see the output?

This hack works for me, so I am not too sure on what the problem might be at this point.

Boofo 06-01-2003 02:43 AM

I have html and image tags turned off, could that have anything to do with it?


All times are GMT. The time now is 06:54 AM.

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.01089 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
  • (1)bbcode_php_printable
  • (2)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