Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • marbol Friend
    #163230

    Hi,

    I want change layout of my page in other way (I know T3 Famework and I know how to edit layouts.xml files). I copied “page” folder with “default.php” file to my template folder and edited this file. I added new blocks areas like here:

    [PHP]
    <?php
    $blks = &$this->getBlocksXML (‘top-b’);
    $blocks = &T3Common::node_children($blks, ‘block’);
    foreach ($blocks as $block) :
    $this->showBlock ($block);
    endforeach;
    ?>
    [/PHP]

    Next I changed default.xml file in my layouts folder. Like here:

    [PHP]
    <blocks name=”top-b” style=”xhtml”>
    <block name=”mainnav” type=”mainnav” no-main=”1″ wrap-inner=”1″></block>
    <block name=”cpanel” type=”usertools/cpanel”></block>
    <block name=”featured” type=”modules” main-inner=”1″>featured</block>
    </blocks>
    [/PHP]

    Everything is ok but when the site is offline i can’t login. I get 403 Error. What’s wrong?

    Khanh Le Moderator
    #388666

    Just clone your case in my local and every work well. I don’t get 403 error when site is offline. Please check what happen if you:
    – rollback your changes.
    – switch to use another template (eg: default Joomla template).

    marbol Friend
    #388858

    Hi,

    If I rollback my changes all is ok. All is ok also when I use another templates. Problem is only with my template after my changes. This is what I change:

    templates/myTemplate/page/default.php

    [PHP]
    <?php if ($this->isIE() && ($this->isRTL())) { ?>
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
    <?php } else { ?>
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
    <?php } ?>

    <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>”>

    <head>
    <?php //gen head base on theme info
    $this->showBlock (‘head’);
    ?>

    <?php
    $blocks = T3Common::node_children($this->getBlocksXML (‘head’), ‘block’);
    foreach ($blocks as $block) :
    $this->showBlock ($block);
    endforeach;
    ?>

    <?php echo $this->showBlock (‘css’) ?>
    </head>

    <body id=”bd” class=”<?php if (!T3Common::mobile_device_detect()):?>bd<?php endif;?> <?php echo $this->getBodyClass();?>”>
    <div id=”ja-wrapper”>
    <a name=”Top” id=”Top”></a>

    <?php
    $blks = &$this->getBlocksXML (‘top-a’);
    $blocks = &T3Common::node_children($blks, ‘block’);
    foreach ($blocks as $block) :
    $this->showBlock ($block);
    endforeach;
    ?>
    <div id=”ja-header-b”>
    <div class=”header-b-wrap1″>
    <?php
    $blks = &$this->getBlocksXML (‘top-b’);
    $blocks = &T3Common::node_children($blks, ‘block’);
    foreach ($blocks as $block) :
    $this->showBlock ($block);
    endforeach;
    ?>
    </div>
    </div>

    <div id=”ja-container” class=”wrap <?php echo $this->getColumnWidth(‘cls_w’)?$this->getColumnWidth(‘cls_w’):’ja-mf’; ?>”>
    <div class=”content-wrap1″>
    <?php
    $blks = &$this->getBlocksXML (‘top-c’);
    $blocks = &T3Common::node_children($blks, ‘block’);
    foreach ($blocks as $block) :
    $this->showBlock ($block);
    endforeach;
    ?>

    <!– MAIN CONTAINER –>

    <?php $this->genBlockBegin ($this->getBlocksXML (‘middle’)) ?>
    <div id=”ja-mainbody” style=”width:<?php echo $this->getColumnWidth(‘mw’) ?>%”>
    <!– CONTENT –>
    <div id=”ja-main” style=”width:<?php echo $this->getColumnWidth(‘m’) ?>%”>
    <div class=”inner clearfix”>

    <?php echo $this->loadBlock (‘message’) ?>

    <?php
    //content-mass-top
    if($this->hasBlock(‘content-mass-top’)) :
    $block = &$this->getBlockXML (‘content-mass-top’);
    ?>
    <div id=”ja-content-mass-top” class=”ja-mass ja-mass-top clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php

    endif; ?>

    <div id=”ja-contentwrap” class=”clearfix <?php echo $this->getColumnWidth(‘cls_m’); ?>”>
    <div id=”ja-content” class=”column” style=”width:<?php echo $this->getColumnWidth(‘cw’) ?>%”>
    <div id=”ja-current-content” class=”column” style=”width:<?php echo $this->getColumnWidth(‘c’) ?>%”>
    <?php
    //content-top
    if($this->hasBlock(‘content-top’)) :
    $block = &$this->getBlockXML (‘content-top’);
    ?>
    <div id=”ja-content-top” class=”ja-content-top clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>

    <?php if (!$this->getParam (‘hide_content_block’, 0)): ?>
    <div id=”ja-content-main” class=”ja-content-main clearfix”>
    <?php echo $this->showBlock (‘content’) ?>
    </div>
    <?php endif ?>

    <?php
    //content-bottom
    if($this->hasBlock(‘content-bottom’)) :
    $block = &$this->getBlockXML (‘content-bottom’);
    ?>
    <div id=”ja-content-bottom” class=”ja-content-bottom clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>
    </div>

    <?php
    //inset1
    if($this->hasBlock(‘inset1’)) :
    $block = &$this->getBlockXML (‘inset1’);
    ?>
    <div id=”ja-inset1″ class=”ja-col column ja-inset1″ style=”width:<?php echo $this->getColumnWidth(‘i1’) ?>%”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>
    </div>

    <?php
    //inset2
    if($this->hasBlock(‘inset2’)) :
    $block = &$this->getBlockXML (‘inset2’);
    ?>
    <div id=”ja-inset2″ class=”ja-col column ja-inset2″ style=”width:<?php echo $this->getColumnWidth(‘i2’) ?>%”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>

    </div>

    <?php
    //content-mass-bottom
    if($this->hasBlock(‘content-mass-bottom’)) :
    $block = &$this->getBlockXML (‘content-mass-bottom’);
    ?>
    <div id=”ja-content-mass-bottom” class=”ja-mass ja-mass-bottom clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>
    </div>
    </div>
    <!– //CONTENT –>
    <?php if (($l = $this->getColumnWidth(‘l’))): ?>
    <!– LEFT COLUMN–>
    <div id=”ja-left” class=”column sidebar” style=”width:<?php echo $l ?>%”>
    <?php
    //left-mass-top
    if($this->hasBlock(‘left-mass-top’)) :
    $block = &$this->getBlockXML (‘left-mass-top’);
    ?>
    <div id=”ja-left-mass-top” class=”ja-mass ja-mass-top clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>

    <?php
    $cls1 = $cls2 = “”;
    if ($this->hasBlock(‘left1’) && $this->hasBlock(‘left2’)) {
    $cls1 = “ja-left1”;
    $cls2 = “ja-left2″;
    }
    if ($this->hasBlock(‘left1’) || $this->hasBlock(‘left2’)):
    ?>
    <div class=”ja-colswrap clearfix <?php echo $this->getColumnWidth(‘cls_l’); ?>”>
    <?php if ($this->hasBlock(‘left1’)):
    $block = &$this->getBlockXML(‘left1’);
    ?>
    <div id=”ja-left1″ class=”ja-col <?php echo $cls1;?> column” style=”width:<?php echo $this->getColumnWidth(‘l1’)?>%”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif ?>

    <?php if ($this->hasBlock(‘left2’)):
    $block = &$this->getBlockXML(‘left2’);
    ?>
    <div id=”ja-left2″ class=”ja-col <?php echo $cls2;?> column” style=”width:<?php echo $this->getColumnWidth(‘l2’)?>%”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif ?>
    </div>
    <?php endif ?>
    <?php
    //left-mass-bottom
    if($this->hasBlock(‘left-mass-bottom’)) :
    $block = &$this->getBlockXML (‘left-mass-bottom’);
    ?>
    <div id=”ja-left-mass-bottom” class=”ja-mass ja-mass-bottom clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>
    </div>
    <!– //LEFT COLUMN–>
    <?php endif; ?>

    </div>
    <?php if (($r = $this->getColumnWidth(‘r’))): ?>
    <!– RIGHT COLUMN–>
    <div id=”ja-right” class=”column sidebar” style=”width:<?php echo $r ?>%”>

    <?php
    //left-mass-top
    if($this->hasBlock(‘right-mass-top’)) :
    $block = &$this->getBlockXML (‘right-mass-top’);
    ?>
    <div id=”ja-right-mass-top” class=”ja-mass ja-mass-top clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>

    <?php
    $cls1 = $cls2 = “”;
    if ($this->hasBlock(‘right1’) && $this->hasBlock(‘right2’)) {
    $cls1 = “ja-right1”;
    $cls2 = “ja-right2″;
    }
    if ($this->hasBlock(‘right1’) || $this->hasBlock(‘right2’)): ?>
    <div class=”ja-colswrap clearfix <?php echo $this->getColumnWidth(‘cls_r’); ?>”>
    <?php if ($this->hasBlock(‘right1’)):
    $block = &$this->getBlockXML(‘right1’);
    ?>
    <div id=”ja-right1″ class=”ja-col <?php echo $cls1;?> column” style=”width:<?php echo $this->getColumnWidth(‘r1’)?>%”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif ?>

    <?php if ($this->hasBlock(‘right2’)):
    $block = &$this->getBlockXML(‘right2’);
    ?>
    <div id=”ja-right2″ class=”ja-col <?php echo $cls2;?> column” style=”width:<?php echo $this->getColumnWidth(‘r2’)?>%”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif ?>
    </div>
    <?php endif ?>
    <?php
    //right-mass-bottom
    if($this->hasBlock(‘right-mass-bottom’)) :
    $block = &$this->getBlockXML (‘right-mass-bottom’);
    ?>
    <div id=”ja-right-mass-bottom” class=”ja-mass ja-mass-bottom clearfix”>
    <?php $this->showBlock ($block); ?>
    </div>
    <?php endif; ?>
    </div>
    <!– //RIGHT COLUMN–>
    <?php endif; ?>
    <?php $this->genBlockEnd ($this->getBlocksXML (‘middle’)) ?>

    <?php
    $blks = &$this->getBlocksXML (‘bottom-a’);
    $blocks = &T3Common::node_children($blks, ‘block’);
    foreach ($blocks as $block) :
    $this->showBlock ($block);
    endforeach;
    ?>
    </div>
    </div>
    <?php
    //Add fix height for main area
    if (T3Common::node_attributes ($this->getBlocksXML (‘middle’), ‘fixheight’)) {
    $this->showBlock (‘fixheight’);
    }
    ?>
    <!– //MAIN CONTAINER –>
    <div id=”ja-bottom”>
    <div class=”bottom-wrap1″>
    <?php
    $blks = &$this->getBlocksXML (‘bottom-b’);
    $blocks = &T3Common::node_children($blks, ‘block’);
    foreach ($blocks as $block) :
    if (T3Common::getBrowserSortName() == ‘ie’ && T3Common::getBrowserMajorVersion() == 7) echo “<br class=”clearfix”/>”;
    $this->showBlock ($block);
    endforeach;
    ?>
    </div>
    </div>
    </div>

    <?php if ($this->isIE6()) : ?>
    <?php $this->showBlock(‘ie6/ie6warning’) ?>
    <?php endif; ?>

    <?php $this->showBlock(‘debug’) ?>

    </body>

    </html>
    [/PHP]

    templates/core/etc/layouts/default.xml

    <?xml version=”1.0″ encoding=”utf-8″?>
    <layout name=”desktop”>
    <!–Extra css load for this layout–>
    <stylesheets>
    </stylesheets>
    <blocks name=”top-a” style=”xhtml”>
    <block name=”header-a” type=”header” main-inner=”1″></block>
    </blocks>
    <blocks name=”top-b” style=”xhtml”>
    <block name=”mainnav” type=”mainnav” no-main=”1″ wrap-inner=”1″></block>
    <block name=”cpanel” type=”usertools/cpanel”></block>
    <block name=”featured” type=”modules” main-inner=”1″>featured</block>
    </blocks>
    <blocks name=”top-c” style=”xhtml”>
    <block name=”topsl-a” type=”spotlight” main-inner=”1″>top1,top2,top3,top4,top5</block>
    <block name=”topsl-b” type=”spotlight” main-inner=”1″>top6,top7,top8,top9,top10</block>
    </blocks>
    <blocks name=”middle” colwidth=”28″>
    <block name=”content-mass-top”>content-top</block>
    <block name=”left-mass-top”>left-top</block>
    <block name=”right-mass-top”>right-top</block>
    <block name=”right1″ width=”20″>left</block>
    <block name=”right2″>right</block>
    <block name=”content-mass-bottom”>content-bottom</block>
    <block name=”left-mass-bottom”>left-bottom</block>
    <block name=”right-mass-bottom”>right-bottom</block>
    </blocks>
    <blocks name=”bottom-a” style=”xhtml”>
    <block name=”botsl-a” type=”spotlight” main-inner=”1″>bottom1,bottom2,bottom3,bottom4,bottom5</block>
    </blocks>
    <blocks name=”bottom-b” style=”xhtml”>
    <block name=”botsl-b” type=”spotlight” main-inner=”1″ special=”right” specialwidth=”50″>bottom6,bottom7,bottom8,bottom9,bottom10</block>
    <block name=”footer” type=”footer” wrap-inner=”2″></block>
    </blocks>
    </layout>

    marbol

    Khanh Le Moderator
    #389595

    I’ve applied all your changes and got no error. You may update your site information into the ticket UOO-771-80252 or through PM, I’ll check the problem on your end.

    marbol Friend
    #390340

    Hi,

    Thank You. I’m sorry I don’t understand what means <blockquote>You may update your site information into the ticket UOO-771-80252 or through PM</blockquote>

    Sorry for stupid question 😉

    mariusz

    Khanh Le Moderator
    #390382

    <em>@marbol 239266 wrote:</em><blockquote>Hi,

    Thank You. I’m sorry I don’t understand what means

    Sorry for stupid question 😉

    mariusz</blockquote>

    Hi [name],

    Visiting our support site http://support.joomlart.com, then login with your JoomlArt account, you will find the your ticket UOO-771-80252 relating to this issue there. You can update your site information (such as admin account, http://ftp...) and reopen the ticket. I’ll check the problem on your real site. (it should be a system specific problem which I cannot duplicate on my end)

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 2 voices, and was last updated by  Khanh Le 13 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum