The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Requested @ https://vborg.vbsupport.ru/showthrea...threadid=31924
Hey, this hack allows your members to specify their own list of 'badwords' wich will be blocked within posts. Note that this only works when Censoring is enabled (In vBulletin Options), if not you won't notice anything from this hack. First preform this query: Code:
ALTER TABLE user ADD censorlist VARCHAR(250) AFTER ignorelist Code:
<tr> <td bgcolor="#F1F1F1"><normalfont><b>Words to Censor in a Thread :</b></normalfont><br> <smallfont>Words you don't want to view, seperate them by spaces.</smallfont></td> <td bgcolor="#F1F1F1"> <input type="text" name="censorlist" size="30" maxlength="250" value="$censorlist"> </td> </tr> Code:
<select name="umaxposts"> <option value="-1" $postsdefaultselected>Use forum default</option> $maxpostsoptions </select> </smallfont></td> </tr> Code:
$censoroptions Code:
$templatesused = "modifyoptions_maxposts,modifyoptions_styleset,modifyoptions_stylecell,usercpnav,modifyoptions"; Code:
$templatesused = "modifyoptions_maxposts,modifyoptions_styleset,modifyoptions_stylecell,modifyoptions_censor,usercpnav,modifyoptions"; Code:
//MaxPosts by User Code:
//Censorlist if ($enablecensor == 1) { $censorlist = $bbuserinfo[censorlist]; eval ("\$censoroptions .= \"".gettemplate("modifyoptions_censor")."\";"); } Code:
$DB_site->query("UPDATE user SET ".$updatestyles."adminemail='$adminemail', showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser', maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."', timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification', startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm', emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]', nosessionhash='$nosessionhash' WHERE userid='$bbuserinfo[userid]'"); Code:
$DB_site->query("UPDATE user SET ".$updatestyles."adminemail='$adminemail', showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser', maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."', timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification', startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm', emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]', nosessionhash='$nosessionhash',censorlist='".addslashes($censorlist)."' WHERE userid='$bbuserinfo[userid]'"); Code:
// ###################### Start censortext ####################### function censortext($text) { global $enablecensor,$censorwords,$censorword,$censorchar,$bbuserinfo; < Cutted > return $text; } Code:
// ###################### Start supercensortext ####################### function supercensortext($text) { global $enablecensor,$censorwords,$censorword,$censorchar,$bbuserinfo; $censorwords .= ' '.$bbuserinfo[censorlist]; if ($enablecensor==1 and $censorwords!="") { if (!isset($censorword)) { $censorwords = preg_quote($censorwords); $censorwords = str_replace('/', '\\/', $censorwords); $censorword=explode(" ",$censorwords); } else { reset($censorword); } 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 { $text=trim(preg_replace("/$val/si",repeatchar($censorchar,strlen($val))," $text ")); } } } } return $text; } Code:
return censortext($bbcode); Code:
return supercensortext($bbcode); It is tested, i cannot give you a demo as our boards aren't public yet, sorry Show Your Support
|
Comments |
#2
|
|||
|
|||
Cool hack, I'll have to install it later
On another note, out of curiosity, are you The Niels that makes OpenBB? |
#3
|
|||
|
|||
cool hack... ^^ Ill install it in a little bit.. Good idea...
-Syphin |
#4
|
|||
|
|||
EDIT : Minor Modifications
Wierd I think I found another bug in vBulletin, it changes first alt color with brackets to some wierd color. Anyways Code:
<tr> <td bgcolor="{ firstaltcolor }"><normalfont><b>Words to Censor in a Thread :</b></normalfont><br> <smallfont>Words you don't want to view, seperate them by spaces.</smallfont></td> <td bgcolor="{ secondaltcolor }"> <input type="text" name="censorlist" size="30" maxlength="250" class="bginput" value="$censorlist"> </td> </tr> |
#5
|
|||
|
|||
Waahoooo
I just found this superb, thanks so much, my code was coming along slowly as was crap. brilliant ! |
#6
|
|||
|
|||
works well thanks!
|
#7
|
|||
|
|||
Can someone update this for 2.2.8?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|