Hallo @all!
Vielleicht könnt ihr mir noch bei meinem letzten größeren W3C-Prob helfen:
Und zwar folgendes:
<script> <br /> var pkBaseURL = (("https:" == document.location.protocol) ? "\'.$piwik_https_url.\'" : "\'.$piwik_http_url.\'"); <br /> document.write(unescape("%3Cscript src=\\\'" + pkBaseURL + "piwik.js\\\' type=\\\'text/javascript\\\'%3E%3C/script%3E")); <br /> </script><script> <br /> piwik_action_name = \\\'\\\'; <br /> piwik_idsite = \'.$piwik_site_id.\'; <br /> piwik_url = pkBaseURL + "piwik.php"; <br /> piwik_log(piwik_action_name, piwik_idsite, piwik_url); <br /> </script>
<object></object>
<noscript><p>Web analytics api <img src="\'.$piwik_http_url.\'piwik.php" style="border:0" alt></p></noscript>
Da schimpft der Vali über folgendes:
[QUOTE] Line 122, Column 104: document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
?org" title="Web analytics api" onclick="window.open(this.href);return(false);">[/QUOTE]
Also über die erste Zeile.
Die Datei, in der der Code drin ist, sieht folgendermaßen aus:
<?php
# Piwik tracking code plugin for Joomla! 1.5
# Copyright (C) 2008 by Fredrik Åström
# Homepage : www.gt-r.nu
# Author : Fredrik Åström
# Email : fredrik@lagun.se
# Version : 0.0.1
# License : www.gnu.org/copyleft/gpl.html GNU/GPL
// no direct access
defined( \'_JEXEC\' ) or die( \'Restricted access\' );
jimport( \'joomla.plugin.plugin\');
class plgSystemPiwik extends JPlugin
{
function plgSystemPiwik(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_plugin = JPluginHelper::getPlugin( \'system\', \'piwik\' );
$this->_params = new JParameter( $this->_plugin->params );
}
function onAfterRender()
{
global $mainframe;
$piwik_site_id = $this->params->get(\'piwik_site_id\', \'\');
$piwik_http_url = $this->params->get(\'piwik_http_url\', \'\');
$piwik_https_url = $this->params->get(\'piwik_https_url\', \'\');
if($piwik_site_id == \'\' || $mainframe->isAdmin() || strpos($_SERVER["PHP_SELF"], "index.php") === false)
{
return;
}
$buffer = JResponse::getBody();
$piwik_javascript = \'
<script> <br /> var pkBaseURL = (("https:" == document.location.protocol) ? "\'.$piwik_https_url.\'" : "\'.$piwik_http_url.\'"); <br /> document.write(unescape("%3Cscript src=\\\'" + pkBaseURL + "piwik.js\\\' type=\\\'text/javascript\\\'%3E%3C/script%3E")); <br /> </script><script> <br /> piwik_action_name = \\\'\\\'; <br /> piwik_idsite = \'.$piwik_site_id.\'; <br /> piwik_url = pkBaseURL + "piwik.php"; <br /> piwik_log(piwik_action_name, piwik_idsite, piwik_url); <br /> </script>
<object><noscript><p>Web analytics api <img src="\'.$piwik_http_url.\'piwik.php" style="border:0" alt></p></noscript></object>
\';
$pos = strrpos($buffer, "</body>");
if($pos > 0)
{
$buffer = substr($buffer, 0, $pos).$piwik_javascript.substr($buffer, $pos);
JResponse::setBody($buffer);
}
return true;
}
}
?>
Danke und Gruß
Marcus
Beitrag erstellen
EinloggenKostenlos registrieren