День добрый, у меня небольшая проблема возникла с шаблоном xtc_newspro, дело в том, что при выводе компонентов он не выводит их во всю ширину. Понятное дело, необходимо было задать необходимые условия в шаблоне. Поднял информацию, но столкнулся с тем, что там используются новые классы типа JRequest, собственно, старые хелпы не помогли. Не подскажите в какую сторону рыть, заранее огромное спасибо. Вот кодинг шаблона: Код (PHP): <?php # JXTC NewsPro Pro Joomla 1.5 Template - Version 1.0 # ------------------------------------------------------------------------ # Copyright (C) 2009 Monev Software L.L.C. All Rights Reserved. # @license - Copyrighted Commercial Software # Author: JoomlaXTC # Website: http://www.joomlaxtc.com # This file may not be redistributed in whole or significant part. /** * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. * @license GNU/GPL, see LICENSE.php * Joomla! is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); /* Definitions */ define( 'BASEPATH', dirname(__FILE__) ); // Menu $document = &JFactory::getDocument(); $renderer = $document->loadRenderer( 'module' ); $module = JModuleHelper::getModule( 'mod_mainmenu' ); $module->params = "showAllChildren=1";; $options = array( 'style' => "submenu"); $mainmenu = $renderer->render( $module, $options ); /* Get Param Values */ $enable_frontpage = ($this->params->get("enableFrontpage", 1) == 1)?"true":"false"; /* Functions */ function isFrontPage(){ return (JRequest::getCmd( 'view' ) == 'frontpage') ;} $footermod_count = ($this->countModules('user6')>0) + ($this->countModules('user7')>0) + ($this->countModules('user8')>0) + ($this->countModules('user9')>0) + ($this->countModules('user10')>0); $footermod_width = $headlinemod_count > 0 ? ' w' . floor(99 / $headlinemod_count) : ''; ?> <!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" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" > <head> <jdoc:include type="head" /> <script type="text/javascript" src="/newspro/media/system/js/mootools.js"></script> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/jxtc_newspro/css/template.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/jxtc_newspro/css/colors/<?php echo $this->params->get('colorVariation'); ?>.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/jxtc_newspro/css/fonts/<?php echo $this->params->get('fontVariation'); ?>.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/jxtc_newspro/css/fonts/<?php echo $this->params->get('fontSize'); ?>.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/jxtc_newspro/css/<?php echo $this->params->get('styleVariation'); ?>.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/jxtc_newspro/css/typography.css" type="text/css" /> <!--[if lte IE 7]> <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if lte IE 6]> <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie6.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if lt IE 8]> <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script> <![endif]--> <!--[if lt IE 7]> <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script> <![endif]--> <!--[if IE 6]> <script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/DD_belatedPNG_0.0.6a-min.js"></script> <script> DD_belatedPNG.fix('#wrapper'); /* EXAMPLE */ /* string argument can be any CSS selector */ /* using .png_bg example is unnecessary */ /* change it to what suits you! */ </script> <![endif]--> <?php if ($this->params->get('NavType') == 'css'): ?> <script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/jxtc_newspro/js/cssmenu.js"></script> <?php else: ?> <script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/jxtc_newspro/js/moomenu.js"></script> <?php endif; ?> <script src="<?php echo $this->baseurl ?>/templates/jxtc_newspro/js/scripts.js" type="text/javascript"></script> <?php if ($this->countModules( 'user6 or user7 or user8 or user9 or user10' )) : ?> <script type="text/javascript"> <?php $modcount = $this->countModules( 'user6 + user7 + user8 + user9 + user10' ); ?> window.addEvent('domready', function(){ if($('footermods')){ var pos = $('footermods').getSize(); var hsize = pos.size['x']; var hsize = hsize/<?php echo $modcount;?>; var hsize = hsize-20; $$('div#footermods div.moduletable').setStyle('width', hsize+'px'); } }); </script> <?php endif;?> <script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/jxtc_newspro/js/adjustdiv.js"></script> </head> <body class="bg_<?php echo $this->params->get('colorVariation'); ?>bg_<?php echo $this->params->get('backgroundVariation'); ?>> <div id="wrapper"> <div id="innerwrap"> <!-- /Header Starts --> <div id="memberarea" style="overflow: hidden; display: block; visibility: hidden; opacity: 0; height: 0px;"> <jdoc:include type="modules" name="top" style="panel" /> </div> <div id="header"> <!-- /TopHeader Starts --> <div id="headertopwrap"> <div id="topwrap"> <?php if($this->countModules('search')) :?> <div id="searchwrap"><jdoc:include type="modules" name="search"/></div> <?php endif;?> <!-- /search Ends--> <?php if($this->countModules('syndicate')) :?> <div id="synwrap"> <jdoc:include type="modules" name="syndicate"/></div> <?php endif;?> </div></div> <!-- /TopHeader Ends--> <!-- /Logo Starts --> <div id="headermiddlewrap"> <div id="logowrap"> <div class="logo"></div> </div> <div id="bannerwrap"> <?php if($this->countModules('banner')) : ?> <div id="banner"> <jdoc:include type="modules" name="banner"/> </div> <!-- /banner Ends--> <?php endif; ?> </div></div> <!-- /Logo Ends--> <!-- /Menu Starts --> <div id="menuwrap"> <div id="mainmenu"> <?php echo $mainmenu;?> </div></div> <!-- /Menu Ends--> </div> <!-- /Header --> <!-- /Content Starts --> <div id="content"> <!-- /Left Starts --> <?php if($this->countModules('left or left2 or left3')) : ?> <div id="leftwrap"> <div id="leftcontent"> <?php if($this->countModules('left')) : ?> <jdoc:include type="modules" name="left" style="wrap" /> <?php endif; ?> <!-- /Left --></div> <?php if($this->countModules('left2')) : ?> <div id="panelmodule"> <jdoc:include type="modules" name="left2" style="slider" /> </div> <?php endif; ?> <!-- /Left 2--> <div id="leftcontent"> <?php if($this->countModules('left3')) : ?> <jdoc:include type="modules" name="left3" style="wrap" /> <?php endif; ?> </div></div> <?php endif; ?> <!-- /Left 3--> <!-- /Left Ends --> <!-- MainContent Starts --> <div id="maincontent"> <!-- INset Starts --> <?php if($this->countModules('inset or debug')) : ?> <div id="inset"> <?php if($this->countModules('debug')) : ?> <jdoc:include type="modules" name="debug" /> <?php endif; ?> <?php if($this->countModules('inset')) : ?> <jdoc:include type="modules" name="inset" style="wrap" /> <?php endif; ?> </div> <?php endif; ?> <!-- /INset --> <div id="bottomwrap"> <div id="bottomleftwrap"> <!-- newsflash Starts --> <?php if($this->countModules('newsflash')) : ?> <div id="newsflash"> <jdoc:include type="modules" name="newsflash" style="wrap" /> </div> <?php endif; ?> <!-- /newsflash --> <!-- component Starts --> <?php if(JRequest::getCmd( 'view' ) == 'frontpage' and $enable_frontpage=="true") :?> <div id="mainbody"> <jdoc:include type="component" style="xhtml" /> </div> <!-- /MainBody --> <?php elseif(JRequest::getCmd( 'view' ) != 'frontpage') :?> <div id="mainbody"> <jdoc:include type="component" style="xhtml" /> </div> <!-- /MainBody --> <?php elseif(JRequest::getCmd('option') == 'frontpage') :?> <div id="mainbody"> <jdoc:include type="component" style="xhtml" /> </div> <!-- /MainBody --> <?php endif; ?> <!-- /Center --> <!-- /component Ends --> <?php if($this->countModules('user1')) : ?> <div id="topusermods"> <div id="user1"> <jdoc:include type="modules" name="user1" style="wrap" /> </div></div> <?php endif; ?> <!-- /user1 Ends --> <?php if ($this->countModules( 'user2 or user3' )) : ?> <div id="topusermods"> <?php if($this->countModules('user2')) : ?> <div id="user2"> <jdoc:include type="modules" name="user2" style="wrap" /> </div> <!-- /User2 --> <?php endif; ?> <?php if($this->countModules('user3')) : ?> <div id="user3"> <jdoc:include type="modules" name="user3" style="wrap" /> </div> <!-- /USer3 --> <?php endif; ?> </div> <!-- /Top UserMods --> <?php endif; ?> <!-- user4 Starts --> <?php if($this->countModules('user4')) : ?> <div id="topusermods"> <div id="user4"> <jdoc:include type="modules" name="user4" style="wrap" /> </div></div> <!-- /user4 --> <?php endif; ?> <?php if($this->countModules('banner2')) : ?> <div id="banner2"> <jdoc:include type="modules" name="banner2"/> </div> <!-- /banner2 --> <?php endif; ?> </div> <?php if ($this->countModules( 'right' )) : ?> <div id="rightcontent"> <?php if($this->countModules('right')) : ?> <jdoc:include type="modules" name="right" style="xhtml"/> <?php endif; ?> </div> <!-- /Right --> <?php endif; ?> </div> </div> <!-- /MainContent Ends --> <div class="clear"></div> </div> <!-- /Content Ends--> </div> <!-- /InnerWrap --> </div> <div id="footerwrap"> <?php if($this->countModules('user5')) : ?> <div id="user5"> <div id="innerwrap" style="padding:8px;"> <jdoc:include type="modules" name="user5"/> <!-- /user5 --></div></div> <?php endif; ?> <?php if ($this->countModules( 'user6 or user7 or user8 or user9 or user10' )) : ?> <div id="footermods"> <?php if($this->countModules('user6')) : ?> <jdoc:include type="modules" name="user6" style="splittitle"/> <!-- /user6 --> <?php endif; ?> <?php if($this->countModules('user7')) : ?> <jdoc:include type="modules" name="user7" style="splittitle"/> <!-- /user7 --> <?php endif; ?> <?php if($this->countModules('user8')) : ?> <jdoc:include type="modules" name="user8" style="splittitle"/> <!-- /user8--> <?php endif; ?> <?php if($this->countModules('user9')) : ?> <jdoc:include type="modules" name="user9" style="splittitle"/> <!-- /user9--> <?php endif; ?> <?php if($this->countModules('user10')) : ?> <jdoc:include type="modules" name="user10" style="splittitle"/> <!-- /user10--> <?php endif; ?> <!-- /UserMods --> <?php endif; ?> </div> <!-- /Footer --> </div> <!-- /FooterWrap --> <?php if($this->countModules('footer')) : ?> <div id="bottomfoot"> <div class="bottomfootinner"> <div class="foot"> <jdoc:include type="modules" name="footer"/> <!-- /Footer--> </div> <?php endif; ?> <?php if($this->countModules('legals')) : ?> <div class="legal"> <jdoc:include type="modules" name="legals"/> <!-- /Legals--></div> </div> </div> <?php endif; ?> </div> </body> </html>