Script URL:
Version of script:1.0
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: comma, formatted
Write your message below:
Is it possible to configure the text counter to display formatted text with commas between the thousands? For example 12,345 instead of 12345.
Thanks, Eric
Formatted text for PHP text counter
After finding this post regarding CCount, I think we sould do a similar mod to text counter.
and changed it to
I was afraid it'd be confused with the single and double quotes but it seems to work.
Eric
I located the code that needed to be changedKlemen Stirn wrote:- find this line:- change it to:Code: Select all
echo "ccount_link[$id]=$count;\n";
Code: Select all
echo "ccount_link[$id]='".number_format($count)."';\n";
Code: Select all
// Print out Javascript code and exit
echo "document.write('$count');";
Code: Select all
// Print out Javascript code and exit
echo "document.write('".number_format($count)."');";

Eric
Eric
I like people who find solutions by themselves and share it with others. 

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Re: Formatted text for PHP text counter
I am sorry, but this instruction did not help me. Could someone tell me if this is still good instructions to add comma? what file do i open? I tried to edit counter.php but could not find the text above in searches.
Re: Formatted text for PHP text counter
These are the steps:
1. open file "counter.php" in a text editor
2. find this line (almost at the end)
3. change it to
4. save, upload and test
1. open file "counter.php" in a text editor
2. find this line (almost at the end)
Code: Select all
echo 'document.write(\''.$count.'\');';
Code: Select all
echo 'document.write(\''.number_format($count).'\');';
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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