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: counter installation  (Read 4468 times)

0 Members and 1 Guest are viewing this topic.

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
counter installation
« on: December 02, 2005, 02:13:36 am »

I added a stats counter (from statcounter.com) in template.html and everything works fine. I can read all the stats if I go on the statcounter.com web site and stats are not showed on my site.

With Statcounter we can install 2 different counters:
1) number of visitors
2) page views

I would like to know how to display those counter on a stats.php page. How can I do that? Where do I add the codes?


Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: counter installation
« Reply #1 on: December 02, 2005, 06:13:04 am »

I do not quite understand! Does it work or not? However if your question is how to add php code then do that in the anycontent.php (read the manual)

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: counter installation
« Reply #2 on: December 02, 2005, 11:39:30 pm »

In fact, what I would like to do is to install a counter (html) that will track every pages and I would like to display the counter number only on a specific page (lets say stats.php).

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: counter installation
« Reply #3 on: December 03, 2005, 08:44:38 am »

I do not know the counter system... how they display stats and if it's possible to grab them and display them otherwhere that on the counter homesite. Better you ask these guys

claude258

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 150
    • Album photos Brière
Re: counter installation
« Reply #4 on: December 03, 2005, 02:36:02 pm »

I can install the html code (from statcounter.com) on a page and it will display the number of visitor (or the pageviews).

But I think my question can apply to the installation of any hit counter.

If I want to track every pages so I put the counter in template.html (yes?). But how to display the results in another page (stats.php for exemple).

I would like to simply show something like:
Total number of visitor on the site: 2482
Total page views: 14589

Is it possible?

Thanks.   
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: counter installation
« Reply #5 on: December 03, 2005, 03:45:33 pm »

as suggested above: the technology counter scripts use may differ, so there can be no general recommendation. Plain JavaScript counters can easily be added to template.html, while database-driven counters will have to be added differently. We (the dev team) have no diea of the counter you're trying to implement, nor am I inclined to look into your counter script and do all the work for you. Of course it is possible to implement nearly any kind of counter script, but it needs looking into , coding skills and a good understanding how coppermine works.
If another page holds all the info you need, add a link to it, using the mechanisms in theme.php or tenplate.html. If you need to include a PHP script, use the custom header/footer field (if the php script you want to use doesn't need to perform header manipulation).
Why are you so eager to have stats? Nobody needs them except the admin, so you should implement one that is visible for the admin only, preferably one that hooks on the server data like awstats. You have to understand that every counter means performance penalties as well.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.