Direct Access to this location is not allowed. Topic is solved

Locked
hazman

Direct Access to this location is not allowed.

Post by hazman » Tue Dec 26, 2006 12:09 am

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?
Last edited by Jinx on Sat Dec 30, 2006 3:09 pm, edited 1 time in total.

User avatar
masterchief
Joomla! Hero
Joomla! Hero
Posts: 2247
Joined: Fri Aug 12, 2005 2:45 am
Location: Brisbane, Australia
Contact:

Re: Direct Access to this location is not allowed.

Post by masterchief » Tue Dec 26, 2006 12:12 am

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.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.

hazman

Re: Direct Access to this location is not allowed.

Post by hazman » Tue Dec 26, 2006 12:36 am

Hi Andrew,

What did you guys change this to:

Is there a template tutorial for 1.5?
Last edited by hazman on Tue Dec 26, 2006 12:41 am, edited 1 time in total.

User avatar
masterchief
Joomla! Hero
Joomla! Hero
Posts: 2247
Joined: Fri Aug 12, 2005 2:45 am
Location: Brisbane, Australia
Contact:

Re: Direct Access to this location is not allowed.

Post by masterchief » Tue Dec 26, 2006 12:55 am

> 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.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7018
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Direct Access to this location is not allowed.

Post by AmyStephen » Tue Dec 26, 2006 3:04 am

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.

hazman

Re: Direct Access to this location is not allowed.

Post by hazman » Tue Dec 26, 2006 5:39 pm

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?

User avatar
compass
Joomla! Ace
Joomla! Ace
Posts: 1347
Joined: Fri Aug 26, 2005 1:31 am
Contact:

Re: Direct Access to this location is not allowed.

Post by compass » Wed Dec 27, 2006 9:09 pm

template_css.css vs template.css

???
Follow me on Twitter @compassdesign
www.compassdesigns.net - Get get free templates and news for Joomla
simplweb.com/joomla-hosting - Fully Managed Joomla Hosting - Unlimited Support

User avatar
manuman
Joomla! Guru
Joomla! Guru
Posts: 891
Joined: Fri Aug 12, 2005 1:58 am
Location: Perth - Western Australia
Contact:

Re: Direct Access to this location is not allowed.

Post by manuman » Thu Dec 28, 2006 6:55 am

@ Barry... that naming convention is out-the-window in 1.5 :)

see here... http://dev.joomla.org/component/option, ... ,33/p,210/
Shayne Bartlett - Joomla Co-Founder
CTO/Web Architect: Elastik Limited https://elastik.space

hazman

Re: Direct Access to this location is not allowed.

Post by hazman » Thu Dec 28, 2006 2:06 pm

Anyone know of another template tutorial for 1.5 besides this one - http://www.compassdesigns.net/joomla-bl ... lates.html

User avatar
compass
Joomla! Ace
Joomla! Ace
Posts: 1347
Joined: Fri Aug 26, 2005 1:31 am
Contact:

Re: Direct Access to this location is not allowed.

Post by compass » Thu Dec 28, 2006 2:38 pm

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... ;)
Follow me on Twitter @compassdesign
www.compassdesigns.net - Get get free templates and news for Joomla
simplweb.com/joomla-hosting - Fully Managed Joomla Hosting - Unlimited Support

hazman

Re: Direct Access to this location is not allowed.

Post by hazman » Thu Dec 28, 2006 9:21 pm

Thanks for the help.

I fixed my template  :)

pii33324
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Dec 21, 2006 1:54 pm

Re: Direct Access to this location is not allowed.

Post by pii33324 » Thu Jan 04, 2007 5:11 pm

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


Locked

Return to “Joomla! 1.5 BETA”