The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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?
|
#2
|
||||
|
||||
Add to the $errors array.
|
#3
|
||||
|
||||
You lost me. Where do I do that?
|
#4
|
||||
|
||||
Look around the hook "newpost_process".
|
#5
|
||||
|
||||
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']) { $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "goto=lastpost&t=$threadinfo[threadid]"; eval(print_standard_redirect('redirect_automod', true, true)); } When I add it to the newpost_complete hook, it throws a vb error but doesn't say what the error is. |
#6
|
||||
|
||||
You don't print standard errors. You just add an extra variable to the end of the $errors array.
|
#7
|
||||
|
||||
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(); |
#8
|
||||
|
||||
Quote:
Quote:
PHP Code:
|
#9
|
||||
|
||||
So, like this would work for that hook then?
Code:
if ($vbulletin->userinfo['automod']) { $errors[] = $vbprase['utomod']; } |
#10
|
||||
|
||||
Which hook? You have to make sure the hook isn't below the check for errors.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|