Log in

View Full Version : display or redirect to error page


sde
02-23-2006, 04:26 AM
my plugin has custom error phrases. the problem is that the only way i know how to display them is to create a custom php file and display it.

the plugin runs in global_start and just does some extra authentication checks. is there any way i can forward the user to a custom error phrase without adding my own errors.php page?

i would love to be able to install without having to ftp files.

Marco van Herwaarden
02-23-2006, 08:03 AM
Just use standard_error().

sde
02-24-2006, 05:42 AM
thanks. when i use standard_error in my script that executes in the global_start, it displays the error, but it appears that all styles are gone.

it is just a white page with text.

any ideas what might cause this?

thanks for the help.

Marco van Herwaarden
02-24-2006, 06:18 AM
Not sure, but i guess the styles are not fully loaded yet at global_start.

What are you trying to make?

sde
02-24-2006, 06:29 AM
it is an association that uses vbulletin. it's not a public forum, so the plugin makes sure the user is cookied with valid credentials from the main assication database.

members are only allowed to have 1 forum account, and that is done by associating their member id in a hidden userfield.

so at global_start, i need to make sure they are a member with a valid cookie, make sure they are logged into the vb account that is associated with their member id, and they can not attempt to register a new user account.

if these conditions fail, i need to display an error message.

currently i have added another php script to display the error, then in the global_start plugin, i use a php header redirect to that page with the error message var in the url.

it works, but i want to make the product so they do not have to upload any files.