Reply #31 December 21, 2012 - 11:50 11:50
Gracias Tari,
Ok, para ello hay una solución "temporal", que hace trabajar ambos mods sin problemas.
En el archivo /Sources/subs.php buscar una función llamada:
function ob_google_analytics($buffer)
y reemplazarla por esta otra:
// Google Analytics Integration
function ob_google_analytics($buffer)
{
global $modSettings, $context;
if (!empty($modSettings['googleAnalyticsCode']) && !isset($_REQUEST['xml']) && $context['current_action'] != 'tags') {
$google_code = '
<script type="text/javascript"><!-- // -->' . chr(60) . '![CDATA[' . '
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'' . $modSettings['googleAnalyticsCode'] . '\']);
_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);
})();
// ]]' . chr(62) . '</script>';
// add in the analytics code at the very end of the head section
$buffer = substr_replace($buffer, $google_code . "\n" . '</head>', stripos($buffer, '</head>'), 7);
}
// All done
return $buffer;
}