The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to return error phrase in attachdata_presave hook?
I'm trying to block certain attachments from being posted. When I make use of returning "false" in the attachdata_presave hook I can successfully stop the file from being saved in VB. However, when I try to customize the error message shown in the browser to the end-user, it only works when I am logged in as "admin". Registered users still see the standard error message.
Here's what I have in attachdata_presave Code:
$bannedmatches = $this->dbobject->query_first(" SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "banned_attachment WHERE filehash = '" . $this->fetch_field('filehash') . "' "); if ($bannedmatches['count'] > 0) { $return_value = false; $this->error('jb_file_not_allowed_here'); } Quote:
Quote:
Thanks for your help, James |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|