Excuse for my bad english.
I follow this article http://codex.gallery2.org/index.php/Gallery2:How_to_embed_counter_code_at_the_page_bottom
This is the code provided to me by the counter site guys:
<?php
define('__PHP_STATS_PATH__','/home/marioi/domains/mario.it/public_html/stats/');
include(__PHP_STATS_PATH__.'php-stats.redir.php');
?>
This is my question. Is someone able' to repair me the following code that doesn't work?
{g->addToTrailer}
{php}
$countercode = <<<END
<?php
define('__PHP_STATS_PATH__','/home/marioi/domains/mario.it/public_html/stats/');
include(__PHP_STATS_PATH__.'php-stats.redir.php');
?>
END;
echo $countercode;
{/php}
{/g->addToTrailer}
Tnx
----------------------------------
Versione di Gallery = 2.1.2 core 1.1.0.2
Versione PHP = 4.4.2 apache
Webserver = Apache/1.3.34 (Unix) mod_ssl/2.8.25 OpenSSL/0.9.7f PHP/4.4.2 mod_perl/1.29 FrontPage/5.0.2.2510 mod_jk/1.2.18
Database = mysql 4.1.12-standard-log, lock.system=flock
Strumenti = ArchiveUpload, Exif, Getid3, ImageMagick, NetPBM, Ffmpeg, Thumbnail, Gd
Accelerazione = none, none
Sistema operativo = Linux roar.netjaguar.com 2.6.8-022stab070.5-entnosplit #1 SMP Tue Apr 4 23:10:45 MSD 2006 i686
Tema predefinito = PGtheme
Locale = it_IT
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Posts: 28
I tried the same, my code is
{g->addToTrailer}
{php}
$countercode = <<<END
<?php
include('././././counter/counter.php');
?>
END;
echo $countercode;
{/php}
{/g->addToTrailer}
can´someone help?
Is this the right way to embed a counter or shall we just put the php code somewhere? Well when I tried that nothing happend and I´m not sure if the php code works all alone, becouse gallery2 works with smarty
please someone help or just explain what´s wrong, there has ro be someone having the same problem and has solved it!
Posts: 28
is the example just for specific counters?
Posts: 28
Well I found out how to do it right
so, just use this code without all that stuff that was suggested to you in that artikle you´ve mentiond above.
{php}
include('path to counter/counter.php');
{/php}
and that was it!!