![]() |
Create Private Message Filter
Hello,
I was wondering if someone could point me in the right direction to create a plugin that will: when a user sends a pm run it through the filter of keywords if it fails the filter dont post, otherwise post. Is there a list of hooks that i can find and maybe a good tutorial on coding for vbulletin. I have seen this hack requested many times. Thanks --------------- Added [DATE]1214244284[/DATE] at [TIME]1214244284[/TIME] --------------- Ok well i hacked something up this might work : goto private.php and add this hook: 1) search for : Code:
$pm['message'] =& $vbulletin->GPC['message']; Code:
($hook = vBulletinHook::fetch_hook('filter_pm')) ? eval($hook) : false; forum/includes/xml create a file with the contents: Code:
<?xml version="1.0" encoding="ISO-8859-1"?> Goto plugin manager click create new plugin select filter name filter_pm as ur hook location add this: Code:
$bad_texts = array('badword1','badword1','badword1','badword1','badword1'); Please dont flame me this is my first attemt at messing with vb's plugin system I did find a current hook that could be used called: ($hook = vBulletinHook::fetch_hook('private_insertpm_proces s')) ? eval($hook) : false; but i couldnt figure out how to remove the recipient already set. --------------- Added [DATE]1214320122[/DATE] at [TIME]1214320122[/TIME] --------------- I changed this bit of code here Code:
$bad = (' ','-','_'); |
Excuse me, after the first two instructions I was not able to find filter_pm in the plugin locations dropdown menu. Why?
|
Quote:
|
All times are GMT. The time now is 11:32 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|