Но тут одна проблема - выводится одна страница на все ошибки ...
Как определить код ошибки и вывести соответствующую страницу с помощью php?
Посмотрел код стандартного error.php - там вроде как переменная (или что то в этом роде, в php не силен) error->code используется ...
Помогите составить error.php, который выдает свою страницу на каждую ошибку. 
Я делал, так. Покажется громоздко, зато очень универсально

Сначала
бэкапим (на всякий случай) оригинальный файл
error.php.
В рабочем меняем полностью код на этот
<?php
/**
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
$task = '';
/* Определяем есть ли нужный индивидуальный файл страницы ошибок */
if(file_exists('templates/system/my_error/'.$this->error->code.'.php')) {
/* присваиваем */
$task = 'custom';
/* Иначе */
} else {
/* Определяем есть ли дефолтный файл страницы ошибок */
if(file_exists('templates/system/my_error/my_error.php')) {
/* присваиваем */
$task = 'default';
/* Иначе */
} else {
/* присваиваем */
$task = 'standart';
} // if else
} // if else
switch($task) {
case 'custom':
/* Подключаем индивидуальный файл страницы ошибок */
require_once('templates/system/my_error/'.$this->error->code.'.php');
break;
case 'default':
/* Подключаем дефолтный файл страницы ошибок */
require_once('templates/system/my_error/my_error.php');
break;
case 'standart':
default:
/* Выводим стандартную страницу ошибок Joomla */
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->code ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
</head>
<body>
<div align="center">
<div id="outline">
<div id="errorboxoutline">
<div id="errorboxheader"><?php echo $this->error->code ?> - <?php echo $this->error->message ?></div>
<div id="errorboxbody">
<p><strong><?php echo JText::_('You may not be able to visit this page because of:'); ?></strong></p>
<ol>
<li><?php echo JText::_('An out-of-date bookmark/favourite'); ?></li>
<li><?php echo JText::_('A search engine that has an out-of-date listing for this site'); ?></li>
<li><?php echo JText::_('A mis-typed address'); ?></li>
<li><?php echo JText::_('You have no access to this page'); ?></li>
<li><?php echo JText::_('The requested resource was not found'); ?></li>
<li><?php echo JText::_('An error has occurred while processing your request.'); ?></li>
</ol>
<p><strong><?php echo JText::_('Please try one of the following pages:'); ?></strong></p>
<p>
<ul>
<li><a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('Go to the home page'); ?>"><?php echo JText::_('Home Page'); ?></a></li>
</ul>
</p>
<p><?php echo JText::_('If difficulties persist, please contact the system administrator of this site.'); ?></p>
<div id="techinfo">
<p><?php echo $this->error->message; ?></p>
<p>
<?php if($this->debug) :
echo $this->renderBacktrace();
endif; ?>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
break;
} // switch
?>
Создаем в
templates/system/ свою папку
my_error/ с подпапками
css/ ,
images/ и нужными файлами для удобства пользования. В общем структура расположения папок и файлов будет выглядеть так:
[spoiler title=РАЗВЕРНУТЬ \ СВЕРНУТЬ]
templates/ |-
system/ |-
... |-
my_error/ | |-
css/ | | |-
my_error.css // Дефолтный стиль страниц
| | |-
... | | |-
404.css /
| | |-
500.css // Индивидуальные стили страниц
| | |-
###.css /
| |
| |-
images/ | | |-
111.png | | |-
... // графика страниц (если есть\используется)
| | |-
999.png | |
| |-
my_error.php // Дефолтная страница
| |-
... | |-
404.php /
| |-
500.php // Индивидуальная страница
| |-
###.php /
|
|-
... |-
error.php // правленный нами стандартный файл страниц ошибок
|-
error.php.bak // бэкап оригинального файла (на всяки пожарный)
|-
...[/spoiler]
В дефолтный файл
my_error.php вставляем следующий код
<?php
/**
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->code ?> - <?php echo $this->title; ?></title>
<?php
/* Пытаемся подключить файл дефолтного стиля my_error.css */
if(file_exists('templates/system/my_error/css/my_error.css')) {
?>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/my_error/css/my_error.css" type="text/css" />
<?php
/* Если файла нет, подключаем стандартный файл стилей Joomla */
} else {
?>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
<?php } // if else ?>
</head>
<body>
...
{ далее идет ваш код разметки HTML - верстка}
...
</body>
</html>
В индивидуальные файлы
403.php,
404.php и т.д., вставляем следующий код
<?php
/**
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->code ?> - <?php echo $this->title; ?></title>
<?php
/* Пытаемся подключить файл индивидуального стиля XXX.css (где XXX код ошибки) */
if(file_exists('templates/system/my_error/css/'.$this->error->code.'.css')) {
?>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/my_error/css/<?php echo $this->error->code ?>.css" type="text/css" />
<?php
/* Если файла нет, подключаем файл дефолтного стиля my_error.css */
} else if(file_exists('templates/system/my_error/css/my_error.css')) {
?>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/my_error/css/my_error.css" type="text/css" />
<?php
/* Если и его нет, подключаем стандартный файл стилей Joomla */
} else {
?>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
<?php } // if else ?>
</head>
<body>
...
{ далее идет ваш код разметки HTML - верстка}
...
</body>
</html>
Стили в файлах .css соответственно ваши (на вкус и цвет)
Не забудьте, все файлы сохранять в кодировке UTF-8 без ВОМ