Pyromanci
02-27-2006, 03:08 PM
Ok I have this little include file. Thought it might stir some ideas for the SD Core.
Basicly I have 3 functions in it right now.
word_censor, obtain_word_list, phpbb_preg_quote
all 3 work as a whole to do 1 job. It is call out from the phpbb word censor table.
the function word_censor woud be what you use to call out the censoring from within your plugins.
the word_consor plugin has 2 varibles it needs. The usersname and text. Whether you use the username part our not its up to you. the text part is the bigy.
To call this out in a plugin like chatterbox you simple look for this:
**while($message = $DB->fetch_array($getmessages))
**{
****$username = $message['username'];
****$comment**= $message['comment'];
right after just add.
word_censor($username, $comment);
Thats it.
Installing this file into is just as easy.
Upload it to your includes/usersystems/ folder and then open the phpbb2.php file.
Find
if(!defined('IN_SUBDREAMER'))
**die('Hacking attempt!');
Right after add
include("phpbb_addons.php");
Then save and reload the file. easy
Now becuase the board wouldn't allow me to attach the file here is a link where you can dl it.
http://clanubp.org/phpbb_addons.zip
Basicly I have 3 functions in it right now.
word_censor, obtain_word_list, phpbb_preg_quote
all 3 work as a whole to do 1 job. It is call out from the phpbb word censor table.
the function word_censor woud be what you use to call out the censoring from within your plugins.
the word_consor plugin has 2 varibles it needs. The usersname and text. Whether you use the username part our not its up to you. the text part is the bigy.
To call this out in a plugin like chatterbox you simple look for this:
**while($message = $DB->fetch_array($getmessages))
**{
****$username = $message['username'];
****$comment**= $message['comment'];
right after just add.
word_censor($username, $comment);
Thats it.
Installing this file into is just as easy.
Upload it to your includes/usersystems/ folder and then open the phpbb2.php file.
Find
if(!defined('IN_SUBDREAMER'))
**die('Hacking attempt!');
Right after add
include("phpbb_addons.php");
Then save and reload the file. easy
Now becuase the board wouldn't allow me to attach the file here is a link where you can dl it.
http://clanubp.org/phpbb_addons.zip