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: Disable counting image views for a certain user/IP address  (Read 9582 times)

0 Members and 1 Guest are viewing this topic.

Fero

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Disable counting image views for a certain user/IP address
« on: October 08, 2003, 02:48:01 am »

Hi all!

In most viewed images I would like to disable me from counting my views. I guess it could be done by blocking IP addresses from which I access my site. Can anyone help?

Also, where can I found info how to repair coppermine link at my website.

Thanks

Fero Bednar

Wildlife and Nature Photography
www.wnp.sk
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Disable counting image views for a certain user/IP address
« Reply #1 on: October 08, 2003, 08:59:05 am »

I moved your post here because this is actually a feature request...

Concerning the repair of the link: the next version will have the correct link in it; we will not provide a fix for the current version, because telling people how to fix it would mean telling people how to remove it...
This has been asked a lot, thanks for not searching the board...

GauGau
Logged

Fero

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Disable counting image views for a certain user/IP address
« Reply #2 on: October 08, 2003, 10:42:27 pm »

Thanks GauGau, the problem is that I have customized coppermine 1.1.0 so much taht I wan't be able simple upload new files from 1.2.0 version. This is not solution for me. What if I send you files you need and you change it for me. You must understand that having a broken link on a site is not very professional, and I don't want to remove it from my site, I am fair and I agree that coppermine deserves a link,

may be I would change it to "Powered by customized Coppermine gallery"

Thanks,

Fero
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
How to ban your own IP from pic hit count
« Reply #3 on: October 09, 2003, 01:31:43 am »

replace this line in your displayimage.php
Code: [Select]

if ($album != "lasthits" && !in_array($pid, $USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data']))

with
Code: [Select]

if ($album != "lasthits" && !in_array($pid, $USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])&&(strstr($_SERVER["REMOTE_HOST"], "000.000")))

where 000.000 is the first set of numbers of your IP
disclaimer: This is not tested , always back up your files, your server may not report the correct IP especially if you use a proxy server (like aol)

Regarding your custom code, that is not our problem, you'll have to apply your customization yourself to the (coming) new release.
Changing the copyright code yourself voids your license of coppermine and may open you up to legal problems....
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.