The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Success/Error Messages
I'm trying to learn how to add a success message when a user submits data in a plugin/product I'm working on.
I discovered the print_stop_message() But I'm not sure if there is either: 1. A function to show a success message, or 2. If there is a way to create a customized stop message. |
#2
|
|||
|
|||
This is what I have used for custom "no permission" error pages.
First, I created the phrase my_no_permisission_videos, with the phrase type Front-End Error Messages. Then I've used this for cusom error pages: Code:
eval(standard_error(fetch_error('my_no_permisission_videos'))); James |
#3
|
||||
|
||||
You can use this to display success messages (with redirect).
PHP Code:
|
#4
|
|||
|
|||
Well, I really trying to keep all the code in one file. And really don't want to be redirecting for a success or failure message.
I just want to show a custom message if the the form was submitted sucessfully, or if not, the reason the form failed. This is was I have now, but unsure if it can be customized. PHP Code:
JamesAB I'll try and see if I can understand what you mentioned. Not sure yet on how to add custom vbphrases. |
#5
|
||||
|
||||
print_stop_message() is used for Admin/Mod CP messages - and not for geenral messages to the user. The code I posted above will do want you want.
|
#6
|
|||
|
|||
Right, I am creating a backend Admin product/Mod. So should I be able to create a custom stop message for the new mod I'm working on?
|
#7
|
||||
|
||||
Yes, if you are creating an Admin/Moderator message, use print_stop_message().
|
#8
|
|||
|
|||
Thanks, but thats where I'm getting stuck. How do you create that custom stop message such as:
PHP Code:
|
#9
|
||||
|
||||
Have a look at the vBulletin API:
http://members.vbulletin.com/api |
#10
|
|||
|
|||
Thats perfect. From there, I should be able to learn more on how the different classes and functions work.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|