Last active
February 3, 2021 11:48
-
-
Save Repflez/5861532 to your computer and use it in GitHub Desktop.
ABXD Plugin - Blabblerizer Reading trolls' posts has never been funnier! (Breaks BBCodes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($loguser['powerlevel'] > 3) | |
$general['options']['items']['blabberized'] = array( | |
"caption" => "Blabberize this user posts", | |
"type" => "checkbox", | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fieldLists["userfields"] .= ",blabberized"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function &blabberize_text(&$text) | |
{ | |
$text = preg_replace("/ /i", ' ', $text); // No cheating :p | |
$text = preg_replace("/\b(?<!&)[^.,'\";:?!&\s0-9]{3}\b/i", Settings::pluginGet("blab3"), $text); | |
$text = preg_replace("/\b(?<!&)\w{4}\b/i", Settings::pluginGet("blab4"), $text); | |
$text = preg_replace("/\b\w{5}\b/i", Settings::pluginGet("blab5"), $text); | |
$text = preg_replace("/\b\w{6}\b/i", Settings::pluginGet("blab6"), $text); | |
$text = preg_replace("/\b\w{7}/i", Settings::pluginGet("blab7"), $text); | |
$text = preg_replace("/\b\w{8,}/i", Settings::pluginGet("blab8"), $text); | |
return $text; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tables["users"]["fields"]["blabberized"] = $bool; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name=Blabberizer | |
description=Replaces trolls' posts to a (funny) mess. | |
author=Repflez | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$settings = array( | |
"blab3" => array( | |
"type" => "text", | |
"name" => "Replacement for 3-letter words", | |
"default" => "bla", | |
), | |
"blab4" => array( | |
"type" => "text", | |
"name" => "Replacement for 4-letter words", | |
"default" => "blah", | |
), | |
"blab5" => array( | |
"type" => "text", | |
"name" => "Replacement for 5-letter words", | |
"default" => "blub", | |
), | |
"blab6" => array( | |
"type" => "text", | |
"name" => "Replacement for 6-letter words", | |
"default" => "blubba", | |
), | |
"blab7" => array( | |
"type" => "text", | |
"name" => "Replacement for 7-letter words", | |
"default" => "blabber", | |
), | |
"blab8" => array( | |
"type" => "text", | |
"name" => "Replacement for 8-letter words", | |
"default" => "blabba", | |
), | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment