Помогни ни да направим Uroci.net по - богат! Добави урок

Добавяне на новини и коментари към тях

PHP » PHP
House   трудност:    видян: 14075


webnews.badwords.inc.php

Код
<?php 
////////////////////////////////////////////////////////////////////// 
// PHPWebNews - sebflipper Copyright 2002 // 
// http://www.sebflipper.com // 
// Config File // 
// // 
// Please edit this file with your information the best way to do // 
// this is to read my comments on each section // 
// // 
// By using this script you agree to the Licence // 
// // 
////////////////////////////////////////////////////////////////////// 


// Changing text like fuck into **** 
// You can add and delete as you like ;) 
// 
// Adding more words to the censor: 
// 
// $badword[] = array('badword', 'goodword'); 
// 
// duplicate these lines as needed, changing the good 
// and bad words as necessary. 
// 
// Putting a space either side of both badword and goodword will only change 
// a whole word... ie 'ass' will be changed and not 'assessment' 
// 
// NB: Unlike webnews.smileys.inc.php, this file is not case sensitive: 
// Case == CASE == case == cAsE 
// But for ease of reading, use lower case. 
// 
// If you get a REG_EPAREN error, try replacing symbols such as ( and ) with 
// ( and ) ... 

function parseBadwords ($text) { 

$badword = array(); 
$badword[] = array('arse', '****'); 
$badword[] = array('arsehole', '********'); 
$badword[] = array('asshole', '*******'); 
$badword[] = array('bitch', '*****'); 
$badword[] = array('cock', '****'); 
$badword[] = array('cocksucker', '**********'); 
$badword[] = array('cunt', '****'); 
$badword[] = array('dickhead', '********'); 
$badword[] = array('fuck', '****'); 
$badword[] = array('fuckwit', '*******'); 
$badword[] = array('fuk', '***'); 
$badword[] = array('fuking', '******'); 
$badword[] = array('motherfucker', '************'); 
$badword[] = array('nigger', '******'); 
$badword[] = array('pussy', '*****'); 
$badword[] = array('shit', '****'); 
$badword[] = array('wanker', '******'); 
$badword[] = array('wankers', '*******'); 
$badword[] = array('whore', '*****'); 
$badword[] = array('slag', '****'); 
$badword[] = array('bitch', '*****'); 

foreach ($badword as $badwords) { 
$text = eregi_replace(($badwords[0]),($badwords[1]),($text)); 
} 
return trim($text); 
} 
?>

webnews.config.inc.php

Код
<?php 
////////////////////////////////////////////////////////////////////// 
// PHPWebNews - sebflipper Copyright 2002 // 
// http://www.sebflipper.com // 
// Config File // 
// // 
// Please edit this file with your information the best way to do // 
// this is to read my comments on each section // 
// // 
// By using this script you agree to the Licence // 
// // 
////////////////////////////////////////////////////////////////////// 


////////////////////////////////////// 
// MySQL info 
$server = "localhost"; 
$db_user = ""; 
$db_pass = ""; 
$database = "phpwebnews"; 
////////////////////////////////////// 
// 
////////////////////////////////////// 
// Prefects in Database 
$mysql_pre = "wn_"; 
$mysql_news = "news"; 
$mysql_comments = "comments"; 
$mysql_admin = "admin"; 
////////////////////////////////////// 
// 
////////////////////////////////////// 
// The full url of the page that has the script on it e.g. http://www.site.com/index.php 
$mainurl = "http://localhost/website.php"; 
// Dir thats the scripts in 
$dirin = "phpwebnews"; 
// Please use text or HTML for the link Add/View Comments on the main news script 
$add_view_comments = "Add/View Comments"; 
// How many news posts to show per page 
$news_limit = "10"; 
// Spam stopper, set this to a cookie time to stop people spaming, the setting is the time is in seconds 
// eg 3600 is one hour | 1800 is 30 mins | 900 is 15 mins etc 
$spam_time_out = "900"; 
// Spam stopper english time eg 15 mins 
$spam_time_english = "15 mins"; 
// Hours in difference between server time and local time 
$hourdiff = "0"; 
////////////////////////////////////// 
// 
////////////////////////////////////// 
// DO NOT EDIT Program Version 
$webnews_ver = "v1.1"; 
$webnews_ver_date = "17/10/2002"; 
////////////////////////////////////// 
// 


?>


Страници: «1 2 3 4 »

Коментари (2)

wesels12 на 28.01 2011 в 09:27ч.
може ли да дадеш друг линк за сваляне, защото този не работи
xXRonBoyBgXx на 22.12 2015 в 16:15ч.
Не е нужно - копвай!

Регистрирайте се, за да добавите коментар


Калдейта ЕООД - © 2003-2010. Всички права запазени.
Препоръчваме: Национален Бизнес | Bomba.bg | IT Новини | Диплома.бг | TRAVEL туризъм | Реферати | AmAm.bg | Иде.ли | Курсови работи | Фото Форум | Spodeli.net | Фото-Култ | Atol.bg | Elmaz.com | MobileBulgaria.com | Казанлък.Com