1
jmass
Custom Error pages
  • 2004/8/8 21:55

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


I know that this has been covered in detail, but I can't find the thread.

I want to customize the error pages (You are not authorized, etc.)

Any RTFMs with a link to the right place would be great!

JMass

2
tom
Re: Custom Error pages
  • 2004/8/8 23:42

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


Ok do you know how to create a .htaccess file?

Creating A .htaccess File

Creating a .htaccess file may cause you a few problems. Writing the file is easy, you just need enter the appropriate code into a text editor (like notepad). You may run into problems with saving the file. Because .htaccess is a strange file name (the file actually has no name but a 8 letter file extension) it may not be accepted on certain systems (e.g. Windows 3.1). With most operating systems, though, all you need to do is to save the file by entering the name as:

".htaccess"

(including the quotes). If this doesn't work, you will need to name it something else (e.g. htaccess.txt) and then upload it to the server. Once you have uploaded the file you can then rename it using an FTP program.

within the file you need to write:

ErrorDocument 400 /errorfiles/000.php
ErrorDocument 401 /errorfiles/401.php
ErrorDocument 403 /errorfiles/403.php
ErrorDocument 300 /errorfiles/404.php
ErrorDocument 404 /errorfiles/404.php
ErrorDocument 500 /errorfiles/500.php

ErrorDocument 400 <-- This tells the server what error number it is.

/file-directory/000.php <-- this tells the server where the error file is located and which one to use, as you see above you can create a different error file for every error.

To include the error file within your site design you could create a php file with the following information:

include('../mainfile.php');
include('../header.php');
?>

All your error html in here, so design it how you like

include('../footer.php');
?>

As you can see in my example, I create a error page for 404, 500, and more.

3
tom
Re: Custom Error pages
  • 2004/8/8 23:43

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


Just to add, if you get stuck, just let me know, I suppose I could package my files up and send them over for you.

Also does your host support custom error pages?

4
jmass
Re: Custom Error pages
  • 2004/8/9 21:17

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


I don't think this is what I am talking about. These are the standard HTML error pages you are talking about, right? I mean the XOOPS pages that display when you try to go to a module you do not have access to and such.

Please correct me if I am wrong.

JMass

5
tom
Re: Custom Error pages
  • 2004/8/9 22:48

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


Ohh sorry, please excuse my dumbness there, lol, having a blonde moment.

Ok in your XOOPS languages there is a global php file, you need to edit that.

Xoops_Root/language/Your_language/global.php

Then look for the line:

define("_NOPERM","Sorry, you don't have the permission to access this area.");

Although I got it wrong, you now also know how to create customer error pages to be displayed in Xoops, rather tham the plain boring 404 pages, lol

6
jmass
Re: Custom Error pages
  • 2004/8/9 23:05

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


Thanks! I will check it out.

JMass

7
jmass
Re: Custom Error pages
  • 2004/8/9 23:11

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


That will change the text... What about the look?

JMass

8
tom
Re: Custom Error pages
  • 2004/8/9 23:21

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


I believe thats in the templates..> system > system_redirect.html

I believe the background color comes from the theme style sheet.

[size=xx-small]My 1300th Post[/size]

9
jmass
Re: Custom Error pages
  • 2004/8/10 0:27

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


Re: 1300th post... Wow.. Especially since 2002. Thanks to ALL who help so much!

JMass

10
tom
Re: Custom Error pages
  • 2004/8/10 0:35

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


Just out of interest, did my last reply answer your post?

P.s. I also had another log in some where, but forgot the password, at the time and for some reason I just created another account (Dohhh lost password, user.php#lost, lol)

never mind.

Login

Who's Online

315 user(s) are online (247 user(s) are browsing Support Forums)


Members: 0


Guests: 315


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits