forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: pabloch on October 31, 2006, 08:58:51 pm

Title: Integration of a php counter
Post by: pabloch on October 31, 2006, 08:58:51 pm
Hi everybody,

I am deploying a php stats script on all my web pages to have a clear idea about my visitors and about how they move on the site. The stats are from : http://www.phpmyvisites.us/

Now, in their FAQ they recommend to put the script in the footer of the web pages (to be sure that the page is loaded completely before the counter registrates the visit). I've read dozens of messages related to the "footer" question and it appears the Coppermine creators doesn't want us to edit it, because of the copyright question.

Would you know where else I can implement my statistics script ? (I don't want to put it in the anycontent.php, because it is displayed only on the beginning and one cannot monitor the lengh of the visits).

Thanks for your answers !
P
Title: Re: Integration of a php counter
Post by: Nibbler on October 31, 2006, 09:08:50 pm
Add it to your template.html.


http://www.phpmyvisites.us/faq/insert-phpmyvisites-javascript-coppermine-13.html  8)
Title: Re: Integration of a php counter
Post by: pabloch on October 31, 2006, 10:37:28 pm
Excellent ! Thank you very much, it works.  :D

PS: sorry, didn't notice that their site gives the clue on how to integrate the script in Coppermine...
Title: Re: Integration of a php counter
Post by: dage on March 14, 2007, 03:10:55 pm
Please i need some help.

I want to put this counter in my Coppermine Gallery (danielarenas.enfoca2.com) and i read all with carefull but i'm no so good with this kid of languages.

So, i saw at their FAQ that i have to copy de javascript on the template.html of my theme in Coppermine, but where's de javascript code? I dowload the archive http://www.phpmyvisites.us/downloads.html (version 2.2 stable) and its a zip format and there are a lot of archives into. I have to install all in my coppermine root or the only thing i have to do is to copy the javascript code... and where is it?

Thank's  ;)
Title: Re: Integration of a php counter
Post by: Joachim Müller on March 14, 2007, 09:01:19 pm
Ask the people who provide your counter script, not us.
Title: Re: Integration of a php counter
Post by: hlabout on May 08, 2007, 08:42:53 pm
Like this plugin very much, very usefull.
Installing in coppermine was no problem.
Just put the code at the beginning of my theme.php.
Only encountered a smal problem.
With the use of phpmyvisites there is a black border at the start of my website (upperside).
Can perhaps somebody tell me how I can get rid of this black border.

Thanks,

Harald

www.haraldlabout.nl/fotografie

(could not find information about it in the phpmyvisites documentation)
Title: Re: Integration of a php counter
Post by: Nibbler on May 08, 2007, 08:48:54 pm
Edit template.html as instructed.
Title: Re: Integration of a php counter
Post by: hlabout on May 08, 2007, 11:00:13 pm
Nibbler,

Thanks for the quick answer

From the beginning I have put the generated javascript code at the beginning of my theme.php.
Worked fine.
Just tried it with the code at the beginning of the Template.html.
Same effect, black bar at he top of my website page.
When I remove the javascript code, than the black bar is gone ??????????
Very strange.

Hope you can help me.

Harald

www.haraldlabout.nl/fotografie

Title: Re: Integration of a php counter
Post by: Nibbler on May 08, 2007, 11:11:48 pm
Move the code just before the </body> tag in template.html.
Title: Re: Integration of a php counter
Post by: hlabout on May 08, 2007, 11:21:03 pm
Nibbler,

Thanks again for your answer.
Put the code just before </body> tag in Template.html, also same result.
It does not matter where I put the code, I am still getteing that irritating black bar at the top of my site.
Very strange.

Harald
Title: Re: Integration of a php counter
Post by: Nibbler on May 08, 2007, 11:37:13 pm
Take the code out of your theme.php and place it just before the </body> tag in your template.html.
Title: Re: Integration of a php counter
Post by: hlabout on May 08, 2007, 11:45:38 pm
As mentioned in my previous answer, did that, same result.

Regards,

Harald
Title: Re: Integration of a php counter
Post by: Nibbler on May 09, 2007, 12:04:20 am
Well at the moment the code is in your theme.php so please move it and try my solution.
Title: Re: Integration of a php counter
Post by: hlabout on May 09, 2007, 10:59:49 am
Nibbler,

At this moment I placed the code in my template.html.
Same result.
I leave it there, sorry I changed it back to my theme.php before.
I hope you can see what the problem is.

Regards,

Harald

www.haraldlabout.nl/fotografie
Title: Re: Integration of a php counter
Post by: Nibbler on May 09, 2007, 12:22:08 pm
Place the code just before the </body> tag - you have it just before the <body> tag which is illegal.
Title: Re: Integration of a php counter
Post by: hlabout on May 09, 2007, 04:50:58 pm
Nibbler,

It is amazing what al little / can make a difference, al working okay now.
But it is more amazing that I tried it severall times and did not notice the difference in <body> & </body>.
I think I need a pair of new glasses.
I have made severall code changes in in my coppermine gallery and never had a such problems.
Thanks for your help.

Harald