Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Ajouter un compteur de STATS  (Read 8632 times)

0 Members and 1 Guest are viewing this topic.

claire19

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Ajouter un compteur de STATS
« on: March 05, 2005, 07:00:38 pm »

voilà j'aimerais installer un bouton XITI (compteur de stats) en dessous de "Powered by coppermine gallery"
quel fichier dois-je éditer ?
J'ai été dans theme/classic/syle.css, puis template.html, et theme.php et je trouve pas la ligne où y'à marqué Powered by coppermine gallery .
merci de bien vouloir m'aider
Logged

nol33t

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 244
  • Exploring Coppermine in every directions
    • tieum's pics
Re: Ajouter un compteur de STATS
« Reply #1 on: March 05, 2005, 07:19:05 pm »

La modif a effectuer est bien dans theme.php, tu peux ajouter ton lien dans la fonction "pagefooter()"

par exemple:

Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{

global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $ALBUM_SET, $CONFIG, $time_start, $query_stats;
    global $template_footer;
    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }

echo '<a href="http://getfirefox.com/"title="Get Firefox - The Browser, Reloaded.">
        <img src="http://www.mozilla.org/products/firefox/buttons/firefox_80x15.png" width="80" height="15" border="0" alt="Get Firefox">
        </a> ';

    echo $template_footer;
}

-matt-

--edit: cet exemple permet d'ajouter du texte / image juste avant le Powered by, pour le placer en dessous / à coté il faut faire ça plus proprement --> dc un chouilla plus compliqué ;)

claire19

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Ajouter un compteur de STATS
« Reply #2 on: March 05, 2005, 07:49:18 pm »

ça ne marche pas du tout .

Mon code XITI cé ça

<a href="http://www.xiti.com/xiti.asp?s=NUMERODEMONSITE" title="Mesurez votre audience">
<script type="text/javascript">
<!--
Xt_param = 's=97750&p=';
Xt_r = document.referrer;
Xt_h = new Date();
Xt_i = '<img width="39" height="25" border="0" ';
Xt_i += 'src="http://logv20.xiti.com/hit.xiti?'+Xt_param;
Xt_i += '&hl='+Xt_h.getHours()+'x'+Xt_h.getMinutes()+'x'+Xt_h.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xt_s=screen;Xt_i+='&r='+Xt_s.width+'x'+Xt_s.height+'x'+Xt_s.pixelDepth+'x'+Xt_s.colorDepth;}
document.write(Xt_i+'&ref='+Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" title="Analyse d\'audience">');
//-->
</script>
<noscript>
Mesure d'audience ROI frequentation par <img width="39" height="25" src="http://logv20.xiti.com/hit.xiti?s=NUMERODEMONSITE&amp;p=" alt="Analyse d'audience" />
</noscript></a>
Logged

nol33t

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 244
  • Exploring Coppermine in every directions
    • tieum's pics
Re: Ajouter un compteur de STATS
« Reply #3 on: March 05, 2005, 07:52:17 pm »

ça ne marche pas du tout .
c'est à dire? tu as un message d'erreur?

de plus si tu pouvais poster un lien pour se rendre compte et essayer de t'aider c'est beaucoup plus pratique..

nol33t

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 244
  • Exploring Coppermine in every directions
    • tieum's pics
Re: Ajouter un compteur de STATS
« Reply #4 on: March 05, 2005, 08:08:13 pm »

le code que tu essaye d'insérer contient des simples quotes: '
pour que celles-ci soient intérprétées comme du html et non comme du php, il faut les protéger à l'aide d'un antislash: \

ton code devient donc:
Code: [Select]
echo '
<a href="http://www.xiti.com/xiti.asp?s=97750" title="Mesurez votre audience">
<script type="text/javascript">
<!--
Xt_param = \'s=97750&p=\';
Xt_r = document.referrer;
Xt_h = new Date();
Xt_i = \'<img width="39" height="25" border="0" \';
Xt_i += \'src="http://logv20.xiti.com/hit.xiti?\'+Xt_param;
Xt_i += \'&hl=\'+Xt_h.getHours()+\'x\'+Xt_h.getMinutes()+\'x\'+Xt_h.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xt_s=screen;Xt_i+=\'&r=\'+Xt_s.width+\'x\'+Xt_s.height+\'x\'+Xt_s.pixelDepth+\'x\'+Xt_s.colorDepth;}
document.write(Xt_i+\'&ref=\'+Xt_r.replace(/[<>"]/g, \'\').replace(/&/g, \'$\')+\'" title="Analyse d\'audience">\');
//-->
</script>
<noscript>
Mesure d\'audience ROI frequentation par <img width="39" height="25" src="http://logv20.xiti.com/hit.xiti?s=NUMERODEMONSITE&amp;p=" alt="Analyse d\'audience" />
</noscript></a>';

-matt-

claire19

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Ajouter un compteur de STATS
« Reply #5 on: March 05, 2005, 08:16:27 pm »

ah en effet j'avais pas mis de slashs
moi et le php ça fait 2  :)
je vais tester pour voir . si ca marche, je mettrais un lien vers mon site sur le forum pour que tu puisses voir!
Logged

claire19

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Ajouter un compteur de STATS
« Reply #6 on: March 12, 2005, 02:55:39 am »

bon, j'ai testé, ça ne marche pas . Non seulement le bouton xiti s'affiche pas, mais en plus ça me fait des erreurs .
Y'à pas un autre moyen??
Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Ajouter un compteur de STATS
« Reply #7 on: March 12, 2005, 08:55:11 am »

Claire,
Quote
Y'à pas un autre moyen??
Si !
L'autre moyen c'est :"pour que notre aide soit efficace, nous aimerions un lien vers ton site Coppermine, car soigné un malade que l'on ne voit pas s'apparente à du charlatanisme  ;)
Si tu ne désires pas que ton Coppermine soit visible par le Forum, expédie-nous par PM ton adresse !
(les modérateurs du forum Coppermine fr sont : Frantz, Nol33t, Frantz et moi-même PYAP)

PYAP
Logged

nol33t

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 244
  • Exploring Coppermine in every directions
    • tieum's pics
Re: Ajouter un compteur de STATS
« Reply #8 on: March 12, 2005, 10:06:46 am »

bon, j'ai testé, ça ne marche pas . Non seulement le bouton xiti s'affiche pas, mais en plus ça me fait des erreurs .
J'ai essayé sur mon site avant de te poster le code.. :P
Si tu n'est pas plus spécifique sur "des" erreurs que tu as, il est impossible de t'aider..

-matt-

claire19

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Ajouter un compteur de STATS
« Reply #9 on: March 13, 2005, 05:08:00 am »

voici mon album si ca peut aider


http://www.danielafrenchsite.com/pictures

Logged

nol33t

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 244
  • Exploring Coppermine in every directions
    • tieum's pics
Re: Ajouter un compteur de STATS
« Reply #10 on: March 13, 2005, 05:23:19 pm »

Bonjour Claire,
ton problème n'est pas lié à coppermine mais au code javascript que tu essaies d'insérer: en mettant celui-ci dans une page statique ( html ), il ne marche pas non plus!
en revanche, si tu utilises le code qui se situe dans la page d'accueil de ton site, (qui est différent de celui que tu as posté plus haut dans ce topic):

Code: [Select]
<script language="JavaScript1.1">
<!--
hsh = new Date();
hsd = document;
hsi = '<a href="http://www.xiti.com/xiti.asp?s=97750"';
hsi += ' TARGET="_top"><img width="39" height="25" border=0 ';
hsi += 'src="http://logv20.xiti.com/hit.xiti?s=97750';
hsi += '&p=&hl=' + hsh.getHours() + 'x' + hsh.getMinutes() + 'x' + hsh.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xiti_s=screen;hsi += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;}
hsd.writeln(hsi + '&ref=' + hsd.referrer.replace('&', '$') + '" title="Mesurez votre audience"></a>');
//-->
</script>
<noscript>        </font><a href="http://www.xiti.com/xiti.asp?s=97750"
        target="_top"><font color="#000000" size="1"
        face="Verdana"><img
        src="http://logv20.xiti.com/hit.xiti?s=97750&amp;p=&amp;"
        border="0" title="Mesurez votre audience"></font></a><font
        color="#000000" size="1" face="Verdana">
</noscript>

en protégeant les quotes ( ' ) par des antislash ( \ ), cela marche très bien
(c'est ce code la que j'ai testé)

-matt-

claire19

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Ajouter un compteur de STATS
« Reply #11 on: March 13, 2005, 11:08:58 pm »

ah OK j'vais tester, je reviens apres pour dire si ca marche!
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.