vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   how to make word censor (https://vborg.vbsupport.ru/showthread.php?t=94792)

Thug 08-21-2005 08:27 PM

how to make word censor
 
Hi im doing a script www.oh-twadi.com/ratedesi1 and im curious to no how i would go about creating a word censorship on it
so i can blank words of my choice

Marco van Herwaarden 08-22-2005 10:20 AM

You can use str_replace()

Thug 08-25-2005 03:15 PM

can you tell me more abit it please
i wish to try it

Andreas 08-25-2005 03:29 PM

$censored = str_replace(array('fuck', 'shit'), '*** Censored ***', 'This Text contains foul language');

Thug 08-25-2005 03:42 PM

ok i got http://www.oh-twadi.com/censor.php
that working using
PHP Code:

<?php

$badWords 
= array('Note''bush');

function 
replacebadwords($string,$badword_array) {
    foreach (
$badword_array as $v) {
        
$newstring "";
        for(
$i 0$i strlen($v); $i++) {
            
$newstring .= "*";
        }
    
$string str_replace($v,$newstring,$string);
    }
    
    return 
$string;
}

$text "Note mom is george bush's grandma.";

$text replacebadwords($text,$badWords);

echo 
$text;

?>

But how do i get it to work on www.oh-twadi.com page

Marco van Herwaarden 08-25-2005 03:56 PM

@Thug,

Is it really needed that you put your URL 1 or more times in EVERY post you make?

Just a personal note, but i am getting a bit sick from it, and i plan to remove all unneeded links to your site if you continue.

Thug 08-25-2005 04:02 PM

doesnt make a diff
cause if u search oh-twadi on google vbulletin cums up so realy it gets more hits to u

Marco van Herwaarden 08-25-2005 08:42 PM

Well i don't care about what happens when i google for twidle-didle-doo, i just care about you spamming this board with your url. Sorry for putting it that blunt, but you seem not to understand if i put it in another way.

PS Maybe i am just tired, and not up to write it down in a more diplomatic way.

Thug 08-25-2005 10:32 PM

tiddle dum lol it meens yours .com asians seem to be creative
i aint goin toargue cause then i wud stoop as low as you
all i want is to no how to add the censorship on a non vb page

sabret00the 08-25-2005 10:44 PM

Quote:

Originally Posted by MarcoH64
twidle-didle-doo

LMAO


All times are GMT. The time now is 07:02 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.01103 seconds
  • Memory Usage 1,731KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete