i want to put this code (which calls the website tracking script that i use, "trackpro") into the pagefooter function, so that every single hit is counted.
session_start(); @include 'tpro.php';
so far i included this code like this:
function pagefooter()
{
global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
global $template_footer;
session_start(); @include 'tpro.php';
if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
cpg_debug_output();
}
this works most of the time, but sometimes (!) it doesn't, and i get database errors.
could you please help me to include the above line of code in the pagefooter function more properly? i really like trackpro, and i think it could be also interesting for other coppermine users. unfortunately i haven't found the the best way for inclusion yet.
any help would be very much appreciated!
thank you
did you search the board for "custom header" or "custom footer" already? There are many posts, as users have requested to find out about the usage of tracking code before.
Joachim
just posted about it on the french board: try removing session_start()
session_start() sets some HTTP headers which is the source of the problem, and anyway the way you ( and i too ) implemented trackpro makes the call to it unuseful
just let:
@include 'tpro.php';
-matt-
thank you for the help!
removing session_start() seems to work!
thank you for the hint, matt!
michael