Page 1 of 1

Direct Access to this location is not allowed.

Posted: Tue Dec 26, 2006 12:09 am
by hazman
Hello,

I'm getting - Direct Access to this location is not allowed. when changing templates. Is there something new in the templates in 1.5?

Re: Direct Access to this location is not allowed.

Posted: Tue Dec 26, 2006 12:12 am
by masterchief
Have a look in the index.php file for the tempate.  If it says

defined( '_VALID_MOS' ) or die( ...

and legacy mode is off, this will cause this error.

Change _VALID_MOS to _JEXEC and you should be ok to continue.

Hope this helps.

Re: Direct Access to this location is not allowed.

Posted: Tue Dec 26, 2006 12:36 am
by hazman
Hi Andrew,

What did you guys change this to:

Is there a template tutorial for 1.5?

Re: Direct Access to this location is not allowed.

Posted: Tue Dec 26, 2006 12:55 am
by masterchief
> What did you guys change this to:



or, turn on Legacy support in the Configuration manager

> Is there a template tutorial for 1.5?

Not really, but some better documentation is in the pipeline to be written.

Re: Direct Access to this location is not allowed.

Posted: Tue Dec 26, 2006 3:04 am
by AmyStephen
Barrie North has a Joomla! v 1.5 Template Tutorial and also two free templates - http://www.compassdesigns.net/joomla-bl ... lates.html

The new template jdoc statements and the template override system are described nicely. I am certain you will find it helpful.

Re: Direct Access to this location is not allowed.

Posted: Tue Dec 26, 2006 5:39 pm
by hazman

Code: Select all

<?php 
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO ); ?>

<!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">

<head>
<jdoc:include type="head" />
<?php if ( $my->id ) { initEditor(); } ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
</head>
This is what I have, I'm not getting through to the template.css (no images).

What am I doing wrong?

Re: Direct Access to this location is not allowed.

Posted: Wed Dec 27, 2006 9:09 pm
by compass
template_css.css vs template.css

???

Re: Direct Access to this location is not allowed.

Posted: Thu Dec 28, 2006 6:55 am
by manuman
@ Barry... that naming convention is out-the-window in 1.5 :)

see here... http://dev.joomla.org/component/option, ... ,33/p,210/

Re: Direct Access to this location is not allowed.

Posted: Thu Dec 28, 2006 2:06 pm
by hazman
Anyone know of another template tutorial for 1.5 besides this one - http://www.compassdesigns.net/joomla-bl ... lates.html

Re: Direct Access to this location is not allowed.

Posted: Thu Dec 28, 2006 2:38 pm
by compass
manuman wrote: @ Barry... that naming convention is out-the-window in 1.5 :)
Well, it was always just a convention, you could specifiy whatever you liked in your XML file.

I was asking if he had checked the filename in the index.php matched the actual filename... ;)

Re: Direct Access to this location is not allowed.

Posted: Thu Dec 28, 2006 9:21 pm
by hazman
Thanks for the help.

I fixed my template  :)

Re: Direct Access to this location is not allowed.

Posted: Thu Jan 04, 2007 5:11 pm
by pii33324
Well... not to hijack this thread, but... MOST of the threads posted here usually end up with something like: "fixed my problem" and do not elaborate further on how, or why.

I understand that sometimes the fix might be a small thing or a little configuration issue, or heck, maybe just a missing bracket, but even if it is because of a rookie mistake, it would be pleasant to know what the fix was or what the route to overcome the problem was.

Sorry 'bout the rant, just that I have SEVERAL issues that are giving me fits and when I look for positive outcomes I end up reading thread after thread that say: "Thanks I fixed my problem", even though the suggestions that are offered do NOT resolve the issue, leading me to believe that there was another effective solution that did and the original poster is hoarding.  :P