Contenido

The following description explains how the pixel-code can be used with Contenido:

You can load the module and language file from the following link:
www.f-be.de/contenido-forum/hottracker_pixelzaehler.zip

Using this module you can integrate the pixel-code into your page (in the last container, if possible). The only adaptation that has to be made is in the output element. The variable $kundennummer must be set to the own customer number. This is the number which is used in the personal counting code (which can be found at “Configuration – Pixel-Code”).

In the back end, you can configure whether the counter is active, determine the page and group names and specify whether an SSL connection will be used.
The module selects the current page title and the category name. These values can, however, be overwritten.

The actual code  (the downloadable module is only available with German comments; in the following code some comments have been translated):

Input:
   /****************************************** 
* File : Pixelzähler Input
* Project : Contenido
* Descr :
*
* Author : Florian Behrendt
* modified :
* Created : 15.03.2006
* Modified : 27.03.2008
*
* Version : 2.0
* © GPL ?
*****************************************/

// Define name of the article and name of the category
$query = "SELECT ART.idartlang, ART.title, CAT.name FROM ".
$cfg["tab"]["art_lang"]." AS ART, ".
$cfg["tab"]["cat_lang"]." AS CAT, ".
$cfg["tab"]["cat_art"]." AS C ".
"WHERE ART.idartlang = $idartlang ".
"AND ART.idart = C.idart ".
"AND C.idcat = CAT.idcat ";



// execute query
$db->query($query);
$db->next_record();
$arttitle = $db->f("title");
$catname =$db->f("name");

/* Input fields: count Page / pagename / groupname / and SSL
If the fields are empty, the pagename and categoryname are suggested*/

echo ("<input type=\"checkbox\" name=\"CMS_VAR[1]\" value=\"checked\"CMS_VALUE[1]>".mi18n("count Page")."<BR>" );

if ("CMS_VALUE[2]" == "") {
echo ("<input type=\"Text\" name=\"CMS_VAR[2]\" value=\"$arttitle\">".mi18n("Pagename").":CMS_VALUE[2]<BR>") ;
}
else {
echo ("<input type=\"Text\" name=\"CMS_VAR[2]\" value=\"CMS_VALUE[2]\">".mi18n("Pagename").":CMS_VALUE[2]<BR>") ;
}
if ("CMS_VALUE[3]" == "") {
echo ("<input type=\"Text\" name=\"CMS_VAR[3]\" value=\"$catname\">".mi18n("groupname").":CMS_VALUE[3]<BR>") ;
}
else {
echo ("<input type=\"Text\" name=\"CMS_VAR[3]\" value=\"CMS_VALUE[3]\">".mi18n("groupname").":CMS_VALUE[3]<BR>") ;
}
echo ("<input type=\"checkbox\" name=\"CMS_VAR[4]\" value=\"true\"CMS_VALUE[4]>".mi18n("SSL ")."true<BR>") ;

The following marked text must be adapted to the personal customer number:

Output:
<?php 
/******************************************
* File : Pixelzähler Output
* Project : Contenido*
* Author : Florian Behrendt
* modified :
* Created : 27.03.2008
* Modified : Adaption to Version 5.0
*
* Version : 2.0
* © GPL ?
*****************************************/
$kundennummer = 00000; // Please enter customer number ( wm_custnum=) here

// Output must not happen in edit mode or the page can’t be edited.
if($edit ==""){
// Query if page should be counted.
if (CMS_VALUE[1] == "checked" ){
echo "<!-- WiredMinds eMetrics tracking V5.0 START -->
<script type=\"text/javascript\" src=\"http://ctsde01.wiredminds.de/track/count.js\"></script>
<script type=\"text/javascript\">";
echo "<!--
wm_custnum=\"$kundennummer\";
" ;
echo "// Begin own parameters.
";
// Query for page and group name
echo "wm_page_name=\"CMS_VALUE[2]\";
"; //Seitenname
echo "wm_group_name=\"CMS_VALUE[3]\";
"; //Gruppenname
// Extension for campaign and milestone tracking
echo "// End own parameters.
";
echo "wiredminds.counter();
// -->
</script>
<noscript>
<div>";
if ("CMS_VALUE[4]" == "checked") // SSL
{
echo "<a target=\"_blank\" HREF=\"http://www.wiredminds.de\"><img
src=\"https://ctsde01.wiredminds.de/track/ctin.php?custnum=$kundennummer&nojs=1\"
alt=\"WiredMinds eMetrics tracking\" border=\"0\"></a>";}
else {echo "<a target=\"_blank\" HREF=\"http://www.wiredminds.de\"><img
src=\"http://ctsde01.wiredminds.de/track/ctin.php?custnum=$kundennummer&nojs=1\"
alt=\"WiredMinds eMetrics tracking\" border=\"0\"></a>";}
echo "</div>
</noscript>
<!-- WiredMinds eMetrics tracking V5.0 END -->
";
/* if ("CMS_VALUE[4]" == "checked") // SSL
{
$sll = true;
}
else
{$ssl= false ;}
if ("CMS_VALUE[1]" == "checked") {
// echo click_track("CMS_VALUE[2]","CMS_VALUE[3]", $ssl)
;
}
*/
}
}

?>

Source: http://contenido.org/forum/viewtopic.php?p=74638#74638

© by HotTracker 2002-2010