Last active
July 14, 2017 12:59
-
-
Save hans2103/3e20ede92f6d4638283242214125fc52 to your computer and use it in GitHub Desktop.
Joomla! error.php template override
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* @package perfecttemplate | |
* @copyright Copyright (c) Perfect Web Team / perfectwebteam.nl | |
* @license GNU General Public License version 3 or later | |
*/ | |
// No direct access. | |
defined('_JEXEC') or die; | |
if (($this->error->getCode()) == '404') | |
{ | |
header("HTTP/1.0 404 Not Found"); | |
switch (JFactory::getLanguage()->getTag()) | |
{ | |
#case 'en-GB': | |
# echo file_get_contents(str_replace('.nl', '.com', JURI::base()).'404?lang=en'); | |
# break; | |
default: | |
// get Joomla! article with menu item alias = 404 | |
echo file_get_contents(JURI::base().'404?lang=nl'); | |
} | |
exit; | |
} | |
if (($this->error->getCode()) == '403') | |
{ | |
header("HTTP/1.0 403 Forbidden"); | |
switch (JFactory::getLanguage()->getTag()) | |
{ | |
#case 'en-GB': | |
# echo file_get_contents(JURI::base().'en/404'); | |
# break; | |
default: | |
// get Joomla! article with menu item alias = 403 | |
echo file_get_contents(JURI::base().'403'); | |
} | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment