Page 1 of 1

Displaying 2 (or more) counts on one page?

Posted: Wed Jun 28, 2006 10:58 pm
by dw
Script URL:
Version of script: 1.1
Version of PHP: 5
Hosting company: Speakeasy.net
Have you searched THIS FORUM for your problem: Yes
(if not please do before posting)
If so, what terms did you try:

Write your message below:

Greetings, I'm having some difficulty in achieving what I believe should be possible with ccount. It's no problem to get a count for 1 link, and to display the number. However, with any more than one, the link of the latter are said to "not exist", while the number display is "undefined".

Should this in principle be possible? Is it perhaps a problem with running PHP 5?

Many thanks, for the one link it can currently count, ccount is very nice ;) ---and I'm hopeful for more.

David

Edit: Ah, yes. You can check out an example at http://lindworm.net/test/

Posted: Thu Jun 29, 2006 8:08 am
by Klemen
It's becase ID 4 doesn't exist in your clicks file (you do have a line starting with 4, but not with the entire info). You must first add all the URLs you want to track in the admin panel, you only have one there and not the second one.

Posted: Thu Jun 29, 2006 7:35 pm
by dw
Thanks for the reply.

I've made a simplified version of the same page.

This is pretty strange. I've checked clicks.txt after creating links, and they are there. . . until the first attempt to click a link. When I click a link for the first time, all the links in the click.txt file are "deleted" except the 1st (whichever ID # it is) and the first number of the 2nd link like so:

--

1%%2006/06/29%%http://lindworm.net/test/thanks.html%%1%%One
2

--

Any ideas?

Thanks,
David

Posted: Thu Jun 29, 2006 9:35 pm
by Klemen
Not sure why this is happening to you, have you tried reinstalling CCount or at least uploading a blank clicks.txt file?

Posted: Thu Jun 29, 2006 9:51 pm
by dw
I had already tried the first, and just tried the second, with the same results.

Edit: I've also tried php 4.3.9, with the same results.

Posted: Fri Jun 30, 2006 5:00 pm
by dw
Ah ah, I have worked it out, silly me. In the settings I chose "3" for macintosh . . . but, I suppose because of OS X havinig a unix underbelly, "1" for Unix/Linux line-ends is the way to go.

Many thanks for your time & great script.

David

Posted: Fri Jun 30, 2006 7:15 pm
by Klemen
Yep, changing that usually works as different systems use different line endings. In the next version I will make sure you don't need to choose an operating system to simplify things...


Regards