Total Clicks Per Multiple Files

Post your Click counter digestion problems here
Post Reply
RFX

Total Clicks Per Multiple Files

Post by RFX »

Hello,
My question is that I have a desktop wallpaper site, in which I have two distinct sizes for each one of my particualr wallpapers (1024x768 and 1280x1024), yet I want to display the total downloads for the two combined. I know they need to have two different ID#'s, but is there a way to show the total number of clicks combined.

Example:::
File01.jpg-1024x768
File01.jpg-1280x1024
Total Downloads :: ??

Hope my question made sense. . . Great script by the way.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

Impossible without PHP knowledge as you'd have to write a script to display that. Unfortunately I don't have the time to do it for you.

Sorry I can't be of help.

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Guest

Post by Guest »

Hello,
Thanks for the reply, but is it possible to add the two variables together using Javascript.

Like instead of just putting ::
<script language="Javascript">ccount_display('1')</script>

You put ::
<script language="Javascript">ccount_display('1')+ccount_display('2')</script>

or something to that manner?

Thanks for your time
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

Hmmm, you could try this:

Add this code to somewhere in your document head (between <HEAD> and </HEAD> tags):

Code: Select all

<script language="javascript"><!--
function ccount_sum_two(ccid1,ccid2)
{
var ccount_sum=0;

ccount_sum+=ccount_link[ccid1];
ccount_sum+=ccount_link[ccid2];

document.write(ccount_sum);
}
//-->
</script>
Then use this code to sum for example counts on link ID 1 and link ID 4:

Code: Select all

<script language="javascript"><!--
ccount_sum_two(1,4);
//-->
</script>
To count other IDs just replace 1 and 4 in the code above.

Haven't tested this, please let me know if it works.

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
RFX

Post by RFX »

That code worked perfectly. I can't thank you enough. I'll be sure to place a link to your scripts on my homepage.

Once Again, Thanks
Keep Up The Amazing Work :D

-RFX
Post Reply