From fd3935ea6b6bfee022a948697bb75b7ffae85a59 Mon Sep 17 00:00:00 2001 From: Matthew Juhl <mjuhl24@gmail.com> Date: Thu, 3 Sep 2009 18:53:54 +0000 Subject: [PATCH] Watch for bad language on homepage and filter it out. --- .../views/default/customindex/content.php | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/customindex/views/default/customindex/content.php b/customindex/views/default/customindex/content.php index cf94ac2f..9898d823 100644 --- a/customindex/views/default/customindex/content.php +++ b/customindex/views/default/customindex/content.php @@ -11,9 +11,12 @@ */ // Put your content below + /* + ini_set('display_errors',true); + error_reporting(E_ALL); + */ + include dirname(__FILE__)."/../../../../unl_theme/scripts/badwordfilter.php"; - - ?> <!-- begin splash code from ucommcoleman/workspace/wdntempaltes/splash.shtml --> @@ -181,6 +184,9 @@ if($users){ foreach($users as $user){ + if (filtrado($user->map_explanation . $user->profile_city . $user->username . $user->name)) { + continue; + } if($user->longitude != undefined && $user->longitude != "" && $user->map_explanation != undefined && $user->map_explanation != ""){ echo "<div class=\"member_icon\"><img onclick=\"window.openLocation('" . $user->longitude . "','" . $user->latitude . "','" . $user->username . "',"; if($user->profile_country) @@ -364,18 +370,21 @@ $result3 = mysql_query($query3); $row3 = mysql_fetch_array( $result3 ); - echo '<img style="clear:left;float:left" src="mod/profile/icondirect.php?username=' . $row3["username"] . '&size=small" />'; - echo '<div class="index_item" style="overflow:hidden;float:left;max-width:'; - if (isloggedin()) {echo('400px;');}else{echo('162px;');} - echo 'border:1px solid #dbdbdb; margin-left:14px; min-height:45px; -moz-border-radius:3px;">'; - echo ' <span style="background:url(mod/customindex/commentbubblepoint.png); width:14px; height:34px; z-index:2; position:absolute; left:'; - if (isloggedin()) {echo('303px;');}else{echo('51px;');} - echo '"></span>'; - echo ' <div style="padding:10px;">'; - echo '<p style="margin:0;"><a href="pg/profile/' . $row3['username'] . '">' . $row3['name'] . '</a>: ' . $row2['description'] . '</p>'; - echo '<p style="margin:2px 0 3px 0; font-size:10px; clear:both;float:right"><em>' . friendly_time($row['time_updated']) . '</em></p>'; - echo ' </div>'; - echo '</div><div class="clear"></div>'; + if (!filtrado($row3['name'] . '' . $row2['description'])){ + echo '<img style="clear:left;float:left" src="mod/profile/icondirect.php?username=' . $row3["username"] . '&size=small" />'; + echo '<div class="index_item" style="overflow:hidden;float:left;max-width:'; + if (isloggedin()) {echo('400px;');}else{echo('162px;');} + echo 'border:1px solid #dbdbdb; margin-left:14px; min-height:45px; -moz-border-radius:3px;">'; + echo ' <span style="background:url(mod/customindex/commentbubblepoint.png); width:14px; height:34px; z-index:2; position:absolute; left:'; + if (isloggedin()) {echo('303px;');}else{echo('51px;');} + echo '"></span>'; + echo ' <div style="padding:10px;">'; + echo '<p style="margin:0;"><a href="pg/profile/' . $row3['username'] . '">' . $row3['name'] . '</a>: ' . $row2['description'] . '</p>'; + echo '<p style="margin:2px 0 3px 0; font-size:10px; clear:both;float:right"><em>' . friendly_time($row['time_updated']) . '</em></p>'; + echo ' </div>'; + echo '</div><div class="clear"></div>'; + } + } ?> -- GitLab