Не ставится на joomla 3
Выдает только return_links(); ?>
манипуляции с .htaccess не помогают вставлял код и в начало index.php шаблона и в head и в body результат один |
Василий Елисеев, а обработка пхп включена на хостинге?
|
включена, раньше без проблем ставил на joomla 1,5 на этом же хостинге
|
Вложений: 1
вот скрин хостинга
Вложение 6748 |
покажите index.php с установленным кодом.
|
<?php
if (!defined('_SAPE_USER')){ define('_SAPE_USER', '2e2daa2bdc87c7030a554e4a6e967afc'); } require_once(realpath($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php')); $sape = new SAPE_client(); ?> <?php // © IceTheme 2013 // GNU General Public License defined('_JEXEC') or die; // A code to show the offline.php page for the demo if (JRequest::getCmd("tmpl", "index") == "offline") { if (is_file(JPATH_ROOT . "/templates/" . $this->template . "/offline.php")) { require_once(JPATH_ROOT . "/templates/" . $this->template . "/offline.php"); } else { if (is_file(JPATH_ROOT . "/templates/system/offline.php")) { require_once(JPATH_ROOT . "/templates/system/offline.php"); } } } else { // Include Variables include_once(JPATH_ROOT . "/templates/" . $this->template . '/icetools/vars.php'); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>"> <head> <?php if ($this->params->get('responsive_template')) { ?> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php } ?> <jdoc:include type="head" /> <?php // Include CSS and JS variables include_once(JPATH_ROOT . "/templates/" . $this->template . '/icetools/css.php'); ?> </head> <body class="<?php echo $pageclass->get('pageclass_sfx'); ?>"> <!-- topbar --> <section id="topbar"> <div class="container"> <jdoc:include type="modules" name="mainmenu" /> <?php if ($this->params->get('social_icon_fb') or $this->params->get('social_icon_tw')) { ?> <div id="social_icons"> <ul> <?php if($this->params->get('social_icon_fb')) { ?> <li class="social_facebook"> <a target="_blank" rel="tooltip" data-placement="bottom" title="<?php echo $fb_fans; ?> Facebook" href="http://www.facebook.com/<?php echo $social_fb_user; ?>"><span>Facebook</span></a> </li> <?php } ?> <?php if($this->params->get('social_icon_tw')) { ?> <li class="social_twitter"> <a target="_blank" rel="tooltip" data-placement="bottom" title="<?php echo $twitterFollowerCount; ?>Twitter" href="http://www.twitter.com/tap4fun" ><span>Twitter</span></a> </li> <?php } ?> </ul> </div> <?php } ?> </div> </section> <!-- /topbar --> <!-- header --> <header id="header"> <div class="container"> <?php if ($this->countModules('weather')) { ?> <div id="weather"> <jdoc:include type="modules" name="weather" /> </div> <?php } ?> <?php if ($this->countModules('search')) { ?> <div id="search"> <jdoc:include type="modules" name="search" /> </div> <?php } ?> <?php if ($this->countModules('language')) { ?> <div id="language"> <jdoc:include type="modules" name="language" /> </div> <?php } ?> <?php if ($this->countModules('icecarousel')) { ?> <div id="icecarousel" class="clearfix"> <jdoc:include type="modules" name="icecarousel" /> </div> <?php } ?> </div> </header><!-- /header --> <?php if ($this->countModules('promo1 + promo2 + promo3 + promo4 + banner')) { ?> <!-- promo --> <section id="promo"> <div class="container"> <div class="row"> <?php if ($this->countModules('promo1')) { ?> <div class="<?php echo $promospan;?>"> <jdoc:include type="modules" name="promo1" style="general" /> </div> <?php } ?> <?php if ($this->countModules('promo2')) { ?> <div class="<?php echo $promospan;?>"> <jdoc:include type="modules" name="promo2" style="general" /> </div> <?php } ?> <?php if ($this->countModules('promo3')) { ?> <div class="<?php echo $promospan;?>"> <jdoc:include type="modules" name="promo3" style="general" /> </div> <?php } ?> <?php if ($this->countModules('promo4')) { ?> <div class="<?php echo $promospan;?>"> <jdoc:include type="modules" name="promo4" style="general" /> </div> <?php } ?> <?php if ($this->countModules('banner')) { ?> <div id="banner" class="clearfix"> <jdoc:include type="modules" name="banner" /> </div> <?php } ?> </div> </div> </section><!-- /promo --> <?php } ?> <!-- content --> <section id="content"> <div class="container"> <!-- columns --> <div id="columns" class="clearfix"> <div id="content_left"> <?php if ($this->countModules('breadcrumbs')) { ?> <div id="breadcrumbs"> <jdoc:include type="modules" name="breadcrumbs" /> </div> <?php } ?> <?php if ($this->countModules('left')) { ?> <div id="leftcol"> <div class="inside"> <jdoc:include type="modules" name="left" style="left" /> </div> </div> <?php } ?> <div id="middlecol"> <div class="inside"> <?php if ($this->countModules('notice')) { ?> <div id="ice_notice" class="alert alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <jdoc:include type="modules" name="notice" /> </div> <?php } ?> <jdoc:include type="message" /> <jdoc:include type="component" /> </div> </div> </div> <?php if ($this->countModules('sidebar')) { ?> <!-- sidebar --> <aside id="sidebar"> <div class="inside"> <jdoc:include type="modules" name="sidebar" style="sidebar" /> </div> </aside><!-- sidebar --> <?php } ?> </div><!-- /columns --> <?php if ($this->countModules('bottom1 + bottom2 + bottom3 + bottom4')) { ?> <!-- bottom --> <section id="bottom" class="row"> <?php if ($this->countModules('bottom1')) { ?> <div class="<?php echo $bottomspan;?>"> <jdoc:include type="modules" name="bottom1" style="general" /> </div> <?php } ?> <?php if ($this->countModules('bottom2')) { ?> <div class="<?php echo $bottomspan;?>"> <jdoc:include type="modules" name="bottom2" style="general" /> </div> <?php } ?> <?php if ($this->countModules('bottom3')) { ?> <div class="<?php echo $bottomspan;?>"> <jdoc:include type="modules" name="bottom3" style="general" /> </div> <?php } ?> <?php if ($this->countModules('bottom4')) { ?> <div class="<?php echo $bottomspan;?>"> <jdoc:include type="modules" name="bottom4" style="general" /> </div> <?php } ?> </section><!-- bottom --> <?php } ?> <?php if ($this->countModules('slider')) { ?> <div id="iceslider"> <jdoc:include type="modules" name="slider" style="iceslider" /> </div> <?php } ?> </div> </section><!-- /content --> <!-- footer --> <footer id="footer"> <div class="container"> <?php if ($this->countModules('footer1 + footer2 + footer3 + footer4')) { ?> <div id="footermods" class="row"> <?php if ($this->countModules('footer1')) { ?> <div class="<?php echo $footerspan;?>"> <jdoc:include type="modules" name="footer1" style="general" /> </div> <?php } ?> <?php if ($this->countModules('footer2')) { ?> <div class="<?php echo $footerspan;?>"> <jdoc:include type="modules" name="footer2" style="general" /> </div> <?php } ?> <?php if ($this->countModules('footer3')) { ?> <div class="<?php echo $footerspan;?>"> <jdoc:include type="modules" name="footer3" style="general" /> </div> <?php } ?> <?php if ($this->countModules('footer4')) { ?> <div class="<?php echo $footerspan;?>"> <jdoc:include type="modules" name="footer4" style="general" /> </div> <?php } ?> </div> <?php } ?> <!-- copyright --> <div id="copyright_area" class="clearfix"> <?php if($this->params->get('icelogo')) { ?> <p id="icelogo"> <a href="http://www.icetheme.com"> <img src="templates/<?php echo $this->template;?>/images/icetheme.png" alt="IceTheme" width="80" ></a></p> <?php } ?> <p id="copyright">© <?php echo date('Y');?> <?php echo $sitename; ?> </p> <?php if ($this->countModules('copyrightmenu')) { ?> <div id="copyrightmenu"> <jdoc:include type="modules" name="copyrightmenu" /> </div> <?php } ?> <?php if ($this->params->get('social_fb') or $this->params->get('social_tw')) { ?> <div id="ice_social"> <?php if($this->params->get('social_tw')) { ?> <div id="social_tw"> <?php echo $social_tw; ?> </div> <?php } ?> <?php if($this->params->get('social_fb')) { ?> <div id="social_fb"> <?php echo $social_fb; ?> </div> <?php } ?> </div> <?php } ?> </div><!-- copyright --> </div> </footer><!-- footer --> <?php if ($this->params->get('google_analytics')) { ?> <!-- Google Analytics --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '<?php echo $google_analytics_code; ?>']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <!-- Google Analytics --> <?php } ?> <?php if ($this->params->get('other_tracker')) { ?> <!-- Other Analytics --> <?php echo $javascript_tracker_code; ?> <!-- Other Analytics --> <?php } ?> <?php if ($this->params->get('go2top')) { ?> <a href="#" class="scrollup" style="display: inline; "><?php echo JText::_('TPL_TPL_FIELD_SCROLL'); ?></a> <?php } ?> </body> </html> <?php } ?> Добавлено через 2 минуты RemoveHandler .php .htm .html AddHandler application/x-httpd-php .php .htm .html это .htaccess |
Ну, а <?php echo $sape->return_links(); ?> вы куда засунули?
|
создал модуль с произвольным html-кодом и опубликовал
view-source:http://spartan-wars.info/ строка 405 |
Разобрался в итоге начало файла index.php выглядит так:
<?php if (!defined('_SAPE_USER')){ define('_SAPE_USER', 'ВАШ КОД'); } require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php'); $o['charset'] = 'UTF-8'; $sape = new SAPE_client($o); unset($o); ?> а код показа ссылок так: <?php if ($this->countModules('sidebar')) { ?> <!-- sidebar --> <aside id="sidebar"> <div class="inside"> <jdoc:include type="modules" name="sidebar" style="sidebar" /> <div class="sapalink" etyle="style2"><? echo $sape->return_links(); ?></div> </div> Проблема была в том, что код вызова ссылок нельзя делать модулем, его нужно вставлять непосредственно в index.php шаблона. Все это на joomla3 |
Цитата:
Нужно или ставить modPHP и помещать туда весь код, или весь код помещать в шаблон. |
Часовой пояс GMT +3, время: 00:52. |
Работает на vBulletin® версия 3.8.7.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot
SAPE.RU — система купли-продажи ссылок с главных и внутренних страниц сайтов.