Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using joomla 3.x and have restricted access of some articles to certain user groups. When I am not logged in I get a really ugly message "You are not authorized to view this resource".

I would like that the user sees instead a custom message and a login screen, you know the basic "Thank you for your interest in …………… please register or login" message. Is it possible to change this in the code of joomla or is there even a addon which can do that?

share|improve this question

closed as not a real question by Simon Hayter, John Conde May 10 '13 at 20:39

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Have you already committed to area51.stackexchange.com/proposals/34294/… – Marcel May 10 '13 at 14:09

From the Joomla! online documentation:

To override the system error results, copy the templates/system/error.php file into your templates/ directory. If it finds one, Joomla! will use the error.php file from the current template, in place of the system file. You can format the page, as desired, to match your template.

So add something like the following to your template's error.php:

<?php if ($this->error->code == '403') : ?>
    <div id="errorboxheader">Not Allowed</div>
        <div id="errorboxbody"><p>Sorry! You are not authorized to view this resource. Please login or register.</p>
        <!-- Copy the code of the login module here! -->
<?php endif; ?>
share|improve this answer
I tried this but it doesn't seem to work, is it maybe because my joomla front-end is using a german language extension? – elhombre May 20 '13 at 12:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.