- Postagens: 1
- Obrigados Recebidos: 0
Erro ao criar posições no template.
- caubi
- Autor do Tópico
- Offline
- JCB! Novato
Menos
Mais
10 anos 2 semanas atrás #95801
por caubi
caubi created the topic: Erro ao criar posições no template.
Olá todo mundo, sou novo no fórum, procurei alguns tópicos relacionado ao meu problema e não encontrei.
Estou tentando criar novas posições no meu template, segui algumas dica que encontrei por aqui. Adicionais as novas posições no TemplateDetails.xml, depois tentei adicionar os códigos PHP no index.php. O que me retornou um erro de sintaxe. "Parse error: syntax error, unexpected T_ENDIF in /home/sescrr/www/portal/templates/mega_tourim/index.php on line 157 "
abaixo segue meu index.php
___________________________________________________________________________
<?php
//No direct access!
defined( '_JEXEC' ) or die;
include_once(JPATH_ROOT . "/templates/" . $this->template . '/lib/splitmodules.php');
JHTML::_('behavior.framework', true);
$doc = &JFactory::getDocument();
$doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega.script.js');
if($this->countModules('top-nav')){
$doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega_menudropdown.js');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ;
<html xmlns=" www.w3.org/1999/xhtml" ; xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<?php
$menu =& JSite::getMenu();
if($menu->getActive() == $menu->getDefault()){
$home = '';
}else{
$home = '_innerpages';
}
?>
<jdoc:include type="head" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/layout.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/template.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/typography.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/customs.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/menu.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 8]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->
<?php if($this->countModules('right')) {
$fright = '';
}else{
$fright = '_fr';
}
?>
</head>
<body id="page">
<div class="mega_wrapper">
<div class="mega_wrapper_i">
<div class="mega_header<?php echo $home;?>">
<div class="mega_header_i">
<div class="mega_logobox">
<?php if($this->countModules('logo')) { ?>
<jdoc:include type="modules" name="logo" />
<?php } ?>
<?php if(!$this->countModules('logo')) { ?>
<a href="<?php echo JURI::base()?>" class="logo"></a>
<?php } ?>
</div>
<?php if($this->countModules('top-nav')) { ?>
<div class="mega_main_menu">
<div class="mega_main_menu_i">
<div id="mega_menu">
<div class="mega_main_menu_r"></div>
<jdoc:include type="modules" name="top-nav" />
</div>
</div>
</div>
<?php } ?>
<?php if($menu->getActive() == $menu->getDefault()) {?>
<?php echo '';?>
<?php }else{ ?>
<div class="mega_breadcrumb">
<div class="mega_breadcrumb_i">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<jdoc:include type="modules" name="breadcrumb" />
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
<?php }?>
</div>
</div>
<div class="mega_main<?php echo $home;?>">
<?php if($this->countModules('slideshow')) {?>
<div class="mega_slideshow">
<div class="mega_slideshow_i">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<jdoc:include type="modules" name="slideshow" />
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
<?php }?>
<!-- TOP MODULES START HERE -->
<?php
$template = array ('topbox-0','topbox-1','topbox-2','topbox-3','topbox-4');
$tops = splitmodules ($this,$template,99);
if($tops) :
?>
<?php if($this->countModules('topbox-0 + topbox-1 + topbox-2 + topbox-3 + topbox-4')) {?>
<div class="mega_tops" id="mega_tops">
<div class="mega_tops_i" id="mega_tops_i">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<?php if( $this->countModules('topbox-0')) {?>
<div class="topbox topbox0<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-0" style="megabox" />
</div>
<?php if( $this->countModules('topbox-1')) {?>
<div class="topbox topbox1<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-1" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('topbox-2')) {?>
<div class="topbox topbox2<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-2" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('topbox-3')) {?>
<div class="topbox topbox3<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-3" style="megabox" />
</div>
<?php if( $this->countModules('topbox-4')) {?>
<div class="topbox topbox4<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-4" style="megabox" />
</div>
<?php }?>
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
<?php } endif;?>
<!-- END -->
<!-- START MAIN BODY -->
<?php if($menu->getActive() == $menu->getDefault()) {?>
<div class="mega_main_body">
<div class="mega_main_body_i">
<div class="mega_main_body_w">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<div class="front_page<?php echo $fright;?>">
<div class="front_page_i">
<jdoc:include type="component" />
</div>
</div>
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
</div>
<?php }else{?>
<div class="mega_main_body">
<div class="mega_main_body_i">
<div class="mega_main_body_w">
<div class="mega_front_page_innerpages<?php echo $fright;?>">
<div class="rounded_top_fp_innerpages"></div>
<div class="rounded_mid_fp_innerpages">
<div class="rounded_mid_i_fp_innerpages">
<jdoc:include type="component" />
</div>
</div>
<div class="rounded_bot_fp_innerpages"></div>
</div>
<?php if($this->countModules('right')) {?>
<div class="mega_right_column">
<div class="mega_right_column_i">
<jdoc:include type="modules" name="right" style="megaright" />
</div>
</div>
<?php }?>
</div>
</div>
</div>
<?php }?>
<!-- END -->
<div class="mega_footer">
<div class="mega_footer_i">
<!-- BOTTOM MODULES START HERE -->
<?php
$template = array ('botbox-1','botbox-2','botbox-3','botbox-4');
$bots = splitmodules ($this,$template,99);
if($bots) :
?>
<?php if($this->countModules('botbox-1 + botbox-2 + botbox-3 + botbox-4')) {?>
<div class="mega_bots" id="mega_bots">
<div class="mega_bots_i" id="mega_bots_i">
<?php if( $this->countModules('botbox-1')) {?>
<div class="botbox botbox1<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-1" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('botbox-2')) {?>
<div class="botbox botbox2<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-2" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('botbox-3')) {?>
<div class="botbox botbox3<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-3" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('botbox-4')) {?>
<div class="botbox botbox4<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-4" style="megabox" />
</div>
<?php }?>
</div>
</div>
<?php } endif;?>
<!-- END -->
<div class="mega_copyright_follow">
<div class="mega_copyright_follow_i">
<div class="mega_copyright">
<jdoc:include type="modules" name="copyright" />
</div>
<div class="mega_follow">
<jdoc:include type="modules" name="follow" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="clear: both;"><jdoc:include type="modules" name="debug" /></div>
</body>
</html>
Gostaria de uma ajuda.
Desde já agradeço.
Estou tentando criar novas posições no meu template, segui algumas dica que encontrei por aqui. Adicionais as novas posições no TemplateDetails.xml, depois tentei adicionar os códigos PHP no index.php. O que me retornou um erro de sintaxe. "Parse error: syntax error, unexpected T_ENDIF in /home/sescrr/www/portal/templates/mega_tourim/index.php on line 157 "
abaixo segue meu index.php
___________________________________________________________________________
<?php
//No direct access!
defined( '_JEXEC' ) or die;
include_once(JPATH_ROOT . "/templates/" . $this->template . '/lib/splitmodules.php');
JHTML::_('behavior.framework', true);
$doc = &JFactory::getDocument();
$doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega.script.js');
if($this->countModules('top-nav')){
$doc->addScript(JURI::root().'/templates/'.$this->template.'/js/mega_menudropdown.js');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ;
<html xmlns=" www.w3.org/1999/xhtml" ; xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<?php
$menu =& JSite::getMenu();
if($menu->getActive() == $menu->getDefault()){
$home = '';
}else{
$home = '_innerpages';
}
?>
<jdoc:include type="head" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/layout.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/template.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/typography.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/customs.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/menu.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 8]>
<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->
<?php if($this->countModules('right')) {
$fright = '';
}else{
$fright = '_fr';
}
?>
</head>
<body id="page">
<div class="mega_wrapper">
<div class="mega_wrapper_i">
<div class="mega_header<?php echo $home;?>">
<div class="mega_header_i">
<div class="mega_logobox">
<?php if($this->countModules('logo')) { ?>
<jdoc:include type="modules" name="logo" />
<?php } ?>
<?php if(!$this->countModules('logo')) { ?>
<a href="<?php echo JURI::base()?>" class="logo"></a>
<?php } ?>
</div>
<?php if($this->countModules('top-nav')) { ?>
<div class="mega_main_menu">
<div class="mega_main_menu_i">
<div id="mega_menu">
<div class="mega_main_menu_r"></div>
<jdoc:include type="modules" name="top-nav" />
</div>
</div>
</div>
<?php } ?>
<?php if($menu->getActive() == $menu->getDefault()) {?>
<?php echo '';?>
<?php }else{ ?>
<div class="mega_breadcrumb">
<div class="mega_breadcrumb_i">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<jdoc:include type="modules" name="breadcrumb" />
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
<?php }?>
</div>
</div>
<div class="mega_main<?php echo $home;?>">
<?php if($this->countModules('slideshow')) {?>
<div class="mega_slideshow">
<div class="mega_slideshow_i">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<jdoc:include type="modules" name="slideshow" />
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
<?php }?>
<!-- TOP MODULES START HERE -->
<?php
$template = array ('topbox-0','topbox-1','topbox-2','topbox-3','topbox-4');
$tops = splitmodules ($this,$template,99);
if($tops) :
?>
<?php if($this->countModules('topbox-0 + topbox-1 + topbox-2 + topbox-3 + topbox-4')) {?>
<div class="mega_tops" id="mega_tops">
<div class="mega_tops_i" id="mega_tops_i">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<?php if( $this->countModules('topbox-0')) {?>
<div class="topbox topbox0<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-0" style="megabox" />
</div>
<?php if( $this->countModules('topbox-1')) {?>
<div class="topbox topbox1<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-1" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('topbox-2')) {?>
<div class="topbox topbox2<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-2" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('topbox-3')) {?>
<div class="topbox topbox3<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-3" style="megabox" />
</div>
<?php if( $this->countModules('topbox-4')) {?>
<div class="topbox topbox4<?php echo $tops; ?>" style="width: <?php echo $tops; ?>;">
<jdoc:include type="modules" name="topbox-4" style="megabox" />
</div>
<?php }?>
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
<?php } endif;?>
<!-- END -->
<!-- START MAIN BODY -->
<?php if($menu->getActive() == $menu->getDefault()) {?>
<div class="mega_main_body">
<div class="mega_main_body_i">
<div class="mega_main_body_w">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<div class="front_page<?php echo $fright;?>">
<div class="front_page_i">
<jdoc:include type="component" />
</div>
</div>
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
</div>
<?php }else{?>
<div class="mega_main_body">
<div class="mega_main_body_i">
<div class="mega_main_body_w">
<div class="mega_front_page_innerpages<?php echo $fright;?>">
<div class="rounded_top_fp_innerpages"></div>
<div class="rounded_mid_fp_innerpages">
<div class="rounded_mid_i_fp_innerpages">
<jdoc:include type="component" />
</div>
</div>
<div class="rounded_bot_fp_innerpages"></div>
</div>
<?php if($this->countModules('right')) {?>
<div class="mega_right_column">
<div class="mega_right_column_i">
<jdoc:include type="modules" name="right" style="megaright" />
</div>
</div>
<?php }?>
</div>
</div>
</div>
<?php }?>
<!-- END -->
<div class="mega_footer">
<div class="mega_footer_i">
<!-- BOTTOM MODULES START HERE -->
<?php
$template = array ('botbox-1','botbox-2','botbox-3','botbox-4');
$bots = splitmodules ($this,$template,99);
if($bots) :
?>
<?php if($this->countModules('botbox-1 + botbox-2 + botbox-3 + botbox-4')) {?>
<div class="mega_bots" id="mega_bots">
<div class="mega_bots_i" id="mega_bots_i">
<?php if( $this->countModules('botbox-1')) {?>
<div class="botbox botbox1<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-1" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('botbox-2')) {?>
<div class="botbox botbox2<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-2" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('botbox-3')) {?>
<div class="botbox botbox3<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-3" style="megabox" />
</div>
<?php }?>
<?php if( $this->countModules('botbox-4')) {?>
<div class="botbox botbox4<?php echo $bots; ?>" style="width: <?php echo $bots; ?>;">
<jdoc:include type="modules" name="botbox-4" style="megabox" />
</div>
<?php }?>
</div>
</div>
<?php } endif;?>
<!-- END -->
<div class="mega_copyright_follow">
<div class="mega_copyright_follow_i">
<div class="mega_copyright">
<jdoc:include type="modules" name="copyright" />
</div>
<div class="mega_follow">
<jdoc:include type="modules" name="follow" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="clear: both;"><jdoc:include type="modules" name="debug" /></div>
</body>
</html>
Gostaria de uma ajuda.
Desde já agradeço.
Please Entrar ou Registrar to join the conversation.
- juninhoguitarr
- Offline
- JCB! Hero
- Não há nada tão bom que não possa melhorar!
10 anos 2 semanas atrás #95817
por juninhoguitarr
superhospedagens.com - Fazemos Parcerias com Desenvolvedores
superhospedagens.com/webradios.html - Precisa de WebRádios?
criarsitesbr.com.br - Desenvolvimento e Consultoria
juninhoguitarr replied the topic: Re: Erro ao criar posições no template.
Olá Caubi tudo bem amigo.
ao que tudo indica está sinalizando que existe uma condição errada nessa linha (157) ou pouco acima dela
T_ENDIF in /home/sescrr/www/portal/templates/mega_tourim/index.php on line 157
se você entrar no seu código fonte essa linha exatamente contem esse conteúdo:
mas eu credito que o problema pode estar em uma dessas linhas:
ao que tudo indica está sinalizando que existe uma condição errada nessa linha (157) ou pouco acima dela
T_ENDIF in /home/sescrr/www/portal/templates/mega_tourim/index.php on line 157
se você entrar no seu código fonte essa linha exatamente contem esse conteúdo:
<div class="front_page_i">
mas eu credito que o problema pode estar em uma dessas linhas:
<?php if($menu->getActive() == $menu->getDefault()) {?>
<div class="mega_main_body">
<div class="mega_main_body_i">
<div class="mega_main_body_w">
<div class="rounded_top"></div>
<div class="rounded_mid">
<div class="rounded_mid_i">
<div class="front_page<?php echo $fright;?>">
<div class="front_page_i">
<jdoc:include type="component" />
</div>
</div>
</div>
</div>
<div class="rounded_bot"></div>
</div>
</div>
</div>
<?php }else{?>
superhospedagens.com - Fazemos Parcerias com Desenvolvedores
superhospedagens.com/webradios.html - Precisa de WebRádios?
criarsitesbr.com.br - Desenvolvimento e Consultoria
Please Entrar ou Registrar to join the conversation.