Click to See Complete Forum and Search --> : Dynamic Scoreboard
Paintball24
10-26-2005, 08:01 PM
I am trying to create a dynamic scoreboard and I need help.
Okay, here's the deal I have a website and there are PHP codes on it to automatically count clicks to certain links and I want a scoreboard to rank those clicks from highest to lowest. Only the top ten.
Then, have a total of all the clicks.
Can anyone help me?
Sheldon
10-26-2005, 08:05 PM
Do you have database access? mySQL??
Paintball24
10-26-2005, 08:53 PM
Yes, but I don't think I'll need it. I just need to have them ordered automatically.
The values show up on my website ever I write this:
<script language="Javascript">ccount_display('5')</script>
And then I would like all the values totalled. I have about 5 values currently but more will come.
That blue text is the number is the value. That is the 5th value.
Sheldon
10-26-2005, 09:24 PM
But what is going to store/remember them??
I think i am missing the point sorry.
Paintball24
10-26-2005, 09:26 PM
It is a PHP text file.
I just need a way to sort them in descending order and add them all together.
Paintball24
10-27-2005, 06:51 PM
any ideas?
Paintball24
10-30-2005, 07:52 AM
*bump*
LiLcRaZyFuZzY
10-30-2005, 08:02 AM
a textfile for each link?
Paintball24
10-30-2005, 08:04 AM
No.
Okay, I just need to add together some values.
chazzy
10-30-2005, 09:46 AM
if you load up everything into variables, arrays, you can use multisort i think http://us3.php.net/manual/en/function.array-multisort.php
you can also find array sum and other fun functions there.
Paintball24
10-30-2005, 02:12 PM
Okay, in that code can I insert links that show numbers?
LiLcRaZyFuZzY
10-30-2005, 02:35 PM
...are the values saved in plain text files or in php files as arrays?
Paintball24
10-30-2005, 04:22 PM
I think php files.
gameguy43
10-30-2005, 06:23 PM
sounds to me like you need to be posting on the javascript forums. adding and ordering values can all be done with javascript. If you can get at the values without php, then you dont need to use it.
Paintball24
10-30-2005, 08:52 PM
Okay. This is what I'm using.
http://www.phpjunkyard.com/php-click-counter.php
When you set it up you get an admin panel within your website. Then, you take any link to anything and enter in the admin panel. It gives you a new link that when it is accessed it counts how many time people click on it.
Then, to display the counts you place this anywhere:
<script language="Javascript">ccount_display('5')</script>
***I have about 20 links that do that and I want to add them together to find out the total of all of the different links.
What language will I have to do this with? I was thinking PHP because the CCount file is in PHP, but maybe I should use JS.
What do you think?
SpectreReturns
10-31-2005, 10:06 PM
...are the values saved in plain text files or in php files as arrays?
They're saved as plain text, comma seperated values. I just looked at the file he posted, and it seems like more work to use than to actually rewrite this working with a database.
Paintball24
11-01-2005, 01:56 PM
So. What do I do?