Author Topic: how to have hits counted without "detail" template being hit  (Read 5766 times)

0 Members and 1 Guest are viewing this topic.

Offline HelpMeNow

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
In the admin panel, under category settings, I have set view images permission to "private".

I have altered the thumbnail_bit.html so that when someone click on it, it actually will go to the "download" URL for that thumbnail.

Since the category settings are set to private, the hits are not counted for images. Is there a way that I could alter/hack something so that hits can be registered for this type of senario?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
how to have hits counted without "detail" template
« Reply #1 on: May 06, 2003, 12:24:59 AM »
doesnt it count as "downloads" instead of hits?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
how to have hits counted without "detail" template
« Reply #2 on: May 06, 2003, 12:36:44 AM »
Also keep in mind that hits are not counted for admin users

Offline HelpMeNow

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
how to have hits counted without "detail" template
« Reply #3 on: May 06, 2003, 01:08:40 AM »
Quote from: V@no
doesnt it count as "downloads" instead of hits?


No, because in order to turn the thumbnail into a hyperlink, I had to add the following to get it to download:

Code: [Select]
<a href="{image_download_url}" target="_blank">{thumbnail}<br />
</a> <b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif
image_is_new}
<br />
{lightbox_button} <br />


(Also, I'm aware that admin doesn't count.) It's not counting for anyone.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
how to have hits counted without "detail" template
« Reply #4 on: May 06, 2003, 01:27:51 AM »
see, this was very usefull information! ;)
in /includes/functions.php find:
Code: [Select]
   "image_download_url" => $image_row['image_download_url'],
replace with:
Code: [Select]
   "image_download_url" => $site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id']),
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline HelpMeNow

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
how to have hits counted without "detail" template
« Reply #5 on: May 06, 2003, 01:43:06 AM »
Quote from: V@no
see, this was very usefull information! ;)
in /includes/functions.php find:
Code: [Select]
   "image_download_url" => $image_row['image_download_url'],
replace with:
Code: [Select]
   "image_download_url" => $site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id']),


V@no,
In this case, should I reverse my thumbnail_bit to original?

Let me tell you what I'm trying to acheive with this:

I want to use this as a "Links Page" for internet magazines. So, all I need are for users to only view the thumbnails for each internet-magazine site....and when they click on it, they will go to the home page of that internet-magazine site. (In a pop-up new browser window)

I'm putting the URL address of each internet-magazine site in the "Download URL" of 4images for each image added...in my case for each magazine-site added.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
how to have hits counted without "detail" template
« Reply #6 on: May 06, 2003, 02:11:32 AM »
Quote from: HelpMeNow
In this case, should I reverse my thumbnail_bit to original?

no, keep it as it is now.
it will count downloads though...
this is the easiest way to do, because the hits counting in the details.php...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline HelpMeNow

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
how to have hits counted without "detail" template
« Reply #7 on: May 06, 2003, 06:49:49 AM »
Thanks V@no,

Works like a charm.  :D