Kategorienamen und Seitentitel ausgeben
Verfasst: Mi 21. Jul 2004, 09:46
Hi,
um ein "Statistik-Tool" einzubinden (www.wired-minds.de-->Statistik-Tool), brauche ich ein Modul, der mir den Seitentitel und den Kategorienamen ausgibt.
Was im Ausgabe-Fenster drin steht, kann ich euch schon zeigen:
--------------------------------------------------------------------------
<?PHP
function click_track($page_name="", $group_name="", $SSL=false)
{
// Click Track counter code (eMetrics)
if ($SSL) { $ct_protocol="https"; $ct_port=":".CT_COUNT_SERVER_HTTPS_PORT; } else { $ct_protocol="http"; $ct_port=""; }
$ct_server="ctsde01.wiredminds.de";
$ct_script="click_track/ctin.php";
$custnum="30";
if ($_SERVER['HTTP_REFERER']) {
$referrer=htmlspecialchars($_SERVER['HTTP_REFERER']);
}
$click_track_code="";
$click_track_code.="<!-- WiredMinds Web eMetrics V1.08 START -->\n";
$click_track_code.="<script type=\"text/javascript\">\n";
$click_track_code.="<!--\n";
$click_track_code.=" var resolution=\"\";\n";
$click_track_code.=" var color_depth=\"\";\n";
$click_track_code.=" var plugin_list=\"\";\n";
$click_track_code.=" var jv=0;\n";
$click_track_code.=" var ref=document.referrer;\n";
$click_track_code.=" if(typeof(top.document)==\"object\") ref=top.document.referrer;\n";
$click_track_code.=" resolution=screen.width+\"x\"+screen.height;\n";
$click_track_code.=" color_depth=navigator.appName!='Netscape'? screen.colorDepth : screen.pixelDepth;\n";
$click_track_code.=" for (var i=0; i<navigator.plugins.length; i++) { plugin_list += navigator.plugins[i].name + ';'; }\n";
$click_track_code.=" if (navigator.javaEnabled()) { jv=1; }\n";
$click_track_code.=" document.write('<A target=\"_blank\" HREF=\"".$ct_protocol."://www.wiredminds.de\"><IMG SRC=\"".$ct_protocol."://".$ct_server.$ct_port."/".$ct_script."?custnum=".$custnum."&sname=&pagename=".$page_name."&group=".$group_name."&js=1&jv='+jv+'&resolution='+resolution+'&color_depth='+color_depth+'&plugins='+escape(plugin_list)+'&referrer='+escape(ref)+'\" alt=\"WiredMinds eMetrics tracking with Click Track\" border=\"0\"></A>');\n";
$click_track_code.="//-->\n";
$click_track_code.="</script>\n";
$click_track_code.="<noscript>\n";
$click_track_code.="<a target=\"_blank\" HREF=\"".$ct_protocol."://www.wiredminds.de\"><img SRC=\"".$ct_protocol."://".$ct_server.$ct_port."/".$ct_script."?custnum=".$custnum."&sname=&pagename=".$page_name."&group=".$group_name."&referrer=".$referrer."\" alt=\"WiredMinds eMetrics tracking with Click Track\" border=\"0\"></a>\n";
$click_track_code.="</noscript>\n";
$click_track_code.="<!-- WiredMinds Web eMetrics V1.08 END -->\n";
return($click_track_code);
}
?>
-------------------------------------------------------------------------------------
Also brauche ich lediglich die Variablen page_name und group-name füttern ...
kann mir da jemand helfen?
Thank you in advance!
um ein "Statistik-Tool" einzubinden (www.wired-minds.de-->Statistik-Tool), brauche ich ein Modul, der mir den Seitentitel und den Kategorienamen ausgibt.
Was im Ausgabe-Fenster drin steht, kann ich euch schon zeigen:
--------------------------------------------------------------------------
<?PHP
function click_track($page_name="", $group_name="", $SSL=false)
{
// Click Track counter code (eMetrics)
if ($SSL) { $ct_protocol="https"; $ct_port=":".CT_COUNT_SERVER_HTTPS_PORT; } else { $ct_protocol="http"; $ct_port=""; }
$ct_server="ctsde01.wiredminds.de";
$ct_script="click_track/ctin.php";
$custnum="30";
if ($_SERVER['HTTP_REFERER']) {
$referrer=htmlspecialchars($_SERVER['HTTP_REFERER']);
}
$click_track_code="";
$click_track_code.="<!-- WiredMinds Web eMetrics V1.08 START -->\n";
$click_track_code.="<script type=\"text/javascript\">\n";
$click_track_code.="<!--\n";
$click_track_code.=" var resolution=\"\";\n";
$click_track_code.=" var color_depth=\"\";\n";
$click_track_code.=" var plugin_list=\"\";\n";
$click_track_code.=" var jv=0;\n";
$click_track_code.=" var ref=document.referrer;\n";
$click_track_code.=" if(typeof(top.document)==\"object\") ref=top.document.referrer;\n";
$click_track_code.=" resolution=screen.width+\"x\"+screen.height;\n";
$click_track_code.=" color_depth=navigator.appName!='Netscape'? screen.colorDepth : screen.pixelDepth;\n";
$click_track_code.=" for (var i=0; i<navigator.plugins.length; i++) { plugin_list += navigator.plugins[i].name + ';'; }\n";
$click_track_code.=" if (navigator.javaEnabled()) { jv=1; }\n";
$click_track_code.=" document.write('<A target=\"_blank\" HREF=\"".$ct_protocol."://www.wiredminds.de\"><IMG SRC=\"".$ct_protocol."://".$ct_server.$ct_port."/".$ct_script."?custnum=".$custnum."&sname=&pagename=".$page_name."&group=".$group_name."&js=1&jv='+jv+'&resolution='+resolution+'&color_depth='+color_depth+'&plugins='+escape(plugin_list)+'&referrer='+escape(ref)+'\" alt=\"WiredMinds eMetrics tracking with Click Track\" border=\"0\"></A>');\n";
$click_track_code.="//-->\n";
$click_track_code.="</script>\n";
$click_track_code.="<noscript>\n";
$click_track_code.="<a target=\"_blank\" HREF=\"".$ct_protocol."://www.wiredminds.de\"><img SRC=\"".$ct_protocol."://".$ct_server.$ct_port."/".$ct_script."?custnum=".$custnum."&sname=&pagename=".$page_name."&group=".$group_name."&referrer=".$referrer."\" alt=\"WiredMinds eMetrics tracking with Click Track\" border=\"0\"></a>\n";
$click_track_code.="</noscript>\n";
$click_track_code.="<!-- WiredMinds Web eMetrics V1.08 END -->\n";
return($click_track_code);
}
?>
-------------------------------------------------------------------------------------
Also brauche ich lediglich die Variablen page_name und group-name füttern ...
kann mir da jemand helfen?
Thank you in advance!