![]() |
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. |
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 |
You can use this to display success messages (with redirect).
PHP Code:
|
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. |
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.
|
Quote:
|
Yes, if you are creating an Admin/Moderator message, use print_stop_message().
|
Thanks, but thats where I'm getting stuck. How do you create that custom stop message such as:
PHP Code:
|
Have a look at the vBulletin API:
http://members.vbulletin.com/api |
Thats perfect. From there, I should be able to learn more on how the different classes and functions work.
|
All times are GMT. The time now is 05:17 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:
|