Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Integration of a php counter  (Read 4645 times)

0 Members and 1 Guest are viewing this topic.

pabloch

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Integration of a php counter
« 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
« Last Edit: October 31, 2006, 11:00:44 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Integration of a php counter
« Reply #1 on: October 31, 2006, 09:08:50 pm »

Logged

pabloch

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Integration of a php counter
« Reply #2 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...
Logged

dage

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Integration of a php counter
« Reply #3 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  ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Integration of a php counter
« Reply #4 on: March 14, 2007, 09:01:19 pm »

Ask the people who provide your counter script, not us.
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: Integration of a php counter
« Reply #5 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)
Logged

Nibbler

  • Guest
Re: Integration of a php counter
« Reply #6 on: May 08, 2007, 08:48:54 pm »

Edit template.html as instructed.
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: Integration of a php counter
« Reply #7 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

Logged

Nibbler

  • Guest
Re: Integration of a php counter
« Reply #8 on: May 08, 2007, 11:11:48 pm »

Move the code just before the </body> tag in template.html.
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: Integration of a php counter
« Reply #9 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
Logged

Nibbler

  • Guest
Re: Integration of a php counter
« Reply #10 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.
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: Integration of a php counter
« Reply #11 on: May 08, 2007, 11:45:38 pm »

As mentioned in my previous answer, did that, same result.

Regards,

Harald
Logged

Nibbler

  • Guest
Re: Integration of a php counter
« Reply #12 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.
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: Integration of a php counter
« Reply #13 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
Logged

Nibbler

  • Guest
Re: Integration of a php counter
« Reply #14 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.
Logged

hlabout

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 118
    • Harald Labout Fotografie
Re: Integration of a php counter
« Reply #15 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
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.