![]() |
Quick Reply Error Message
If I want to show an error message after a quick reply is submitted, what hook do I need to use for that?
|
Add to the $errors array.
|
You lost me. Where do I do that?
|
Look around the hook "newpost_process". ;)
|
Ok, I already have an error showing for this mod at newreply_post_complete. The quick-reply uses newpost then and nothing else uses that? This is the code I added to the newpost_process hook and it didn't do anything.
Code:
if ($vbulletin->userinfo['automod']) When I add it to the newpost_complete hook, it throws a vb error but doesn't say what the error is. |
You don't print standard errors. You just add an extra variable to the end of the $errors array.
|
The print standard errors works fine in the other hooks. Or is it just this hook it won't work in?
You lost me on the extra variable. The only thing I saw in the files before that hook was $errors = array(); |
Quote:
Quote:
PHP Code:
|
So, like this would work for that hook then?
Code:
if ($vbulletin->userinfo['automod']) |
Which hook? You have to make sure the hook isn't below the check for errors.
|
Here is what I am using in the newpost_process hook.
Code:
if ($vbulletin->GPC['fromquickreply'] AND $vbulletin->userinfo['automod']) And still no error shows when I hit submit. |
Anyone have any ideas on this?
|
Have you tried using text instead of a phrase in your error message? At least then you can see if it works and if it just doesn't like phrases.
(I'm actually following this because I have custom script running in my attachment uploads and have never been able to get it to spit out errors so I'll probably try something similar to what you do to get this to work.) |
Yeah, I tried it with words after trying the phrase and nothing. :(
|
Are you using Firefox?
|
No, sir. IE7.
Is the code right for that hook? |
All times are GMT. The time now is 06:32 PM. |
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:
|