This plugin shows the total number of articles and comments as well as statistics about which platforms and browsers were used in comment writing. It uses icons to identify both platforms and browsers.

To install it, just unzip the file into your plugins directory. After this, activate the plugin in your WordPress blog dashboard. To finish, include the line

<?php display_comment_stats(’duh’); ?>

in whatever place in your template. Personally, I like the sidebar (sidebar.php).

The plugin doesn’t have all the platforms and browsers available, just the major ones, but it’s very easy to add any of them. Just go to your WordPress database, table wp_comments, field comment_agent, check the string and use it like the others in dcs.php file following the examples you can see there. You can see it working in this very same page. Worry not, the plugin is written in English :)

The plugin is very easy to translate to any language, just edit dcs.php file and change the few strings it has on the top. If you experience troubles installing it or have any suggestions, please leave a comment in this article. I’ll gladly help you.
Get the plugin here. If you use it, just send me an email. I’m looking forward to your feedback.

Kind regards,
Mario Gamito

CHANGELOG

10/01/2009
Fixed another URL.

28/10/2008
Added the license under this bit of code is under. Some chap wanted to make some modifications and wrote to me asking if he could, because he saw no license. Well, it’s GPL. Mess at will :)

25/10/2008
Forgot to add the Chrome icon. Shame one me :(

25/10/2008
Added Google Chrome Browser

02/10/2008
Another bug fix in the install procedure.

01/10/2008
Fixed a nasty bug that aborted the installation process.
A f* ”

19/07/2008 :: 1.5.0
Fixed the article count. Drafts are no longer being counted.

18/07/2008 :: 1.4.10
No changes, just checking compatibility with WP 2.6

01/05/2008 :: 1.4.8
Added Flock browser.

09/04/2008 :: 1.4.6
A minor tweak.

08/04/2008 :: 1.4.4
Just updated the screenshot in WordPress site. No changes in the code.

02/04/2008 :: 1.4.2
Added Netnewswire, Epiphany and Unbranded Firefox browsers.

30/03/2008 :: 1.4.0
Changed location of the pictures to be inside plugins directory and the install
process is now more easy and standard compliant.

25/03/2008 :: 1.2.4
A minor tweak.

25/03/2008 :: 1.2.2
More detailed instructions.

25/03/2008 :: 1.2.0
Fixed a nasty install bug. Shame on me :(

05/03/2008 :: 1.0.34
Added Lynx browser.

07/02/2008 :: 1.0.32
Some minor tweaks.

23/02/2008 :: 1.0.30
Missing include line in readme.txt. Sorry, my bad :(

22/02/208 :: 1.0.28
Condensed icon display code, it’s now more efficient.

22/20/2008 :: 1.0.20
Fixed a bug that prevented icons from appearing outside the main page.

19/02/2008 :: v. 1.0.18
Added screenshot to plugin’s page.

19/02/2008 :: v. 1.0
Translated to English.

18/02/2008 :: v. 0.2.10
Changed dcs.php header and readme.txt to cope with the standards.

12/02/2008 :: v. 0.2.2
There was a blank space missing between the icons and the figures.

11/02/2008 :: v. 0.2.1
Now, the number of platforms and browsers are automatically arranged in descending order.

rss 25 pás de carvão
  1. 11/Fev/2008 | 10:54

    Ainda não instalei o plugin mas adianto desde já ser bastante interessante ver esses dados. :)


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.11 em Ubuntu Linux Ubuntu Linux
  2. Aldo
    23/Fev/2008 | 16:03

    “To finish, include the line in whatever place in your template. Personally, I like the sidebar (sidebar.php).”

    Which line need to be include in the template?? :(


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.12 em Windows Windows XP
  3. 23/Fev/2008 | 16:41

    @Aldo: Sorry, a linha já lá esteve, não sei como desapareceu :(
    Agora está arranjado. Obrigado por me avisar.


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.12 em Windows Windows Server 2003
  4. BL
    2/Mar/2008 | 22:33

    Viva,
    é dificil, da tua parte, transformares o plug-in num widget? Estou só a perguntar.

    Obrigado pelo plug-in :D


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.10 em Ubuntu Linux Ubuntu Linux
  5. 2/Mar/2008 | 22:40

    @BL: Quando tiver um bocadinho de tempo livre, sim :)


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.12 em Windows Windows Vista
  6. 6/Mar/2008 | 12:56

    Estes plug-ins dão para instalar em contas free, tipo a minha do wordpress?

    E, em que zona da Administração do blog conseguimos fazer alterações como estas? Melhoramentos, Opções? Onde será?

    Cumprimentos


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.12 em Windows Windows XP
  7. majood
    9/Mar/2008 | 02:06

    hi :)

    can you tel me … from where i can get the plugins Visitantes ( visitors )
    like here on your blog .. i need him

    thank you :)


    A usar Internet Explorer Internet Explorer 6.0 em Windows Windows XP
  8. 9/Mar/2008 | 12:40

    @majood: It’s here: http://faked.org/blog/wp-onlinecounter/

    You’re Welcome.

    Regards,
    Mário Gamito


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.12 em Windows Windows Vista
  9. majood
    9/Mar/2008 | 18:26

    ty alot Mário Gamito ..


    A usar Internet Explorer Internet Explorer 6.0 em Windows Windows XP
  10. Marcos de Sousa
    23/Mar/2008 | 18:32

    Aló Mario Gamito,

    Brevemente irei lançar meu Blog no sitio http://www.marcos.co.nr, pelo que irei usar o teu plugin “Display Comments Statistics” versão 1.0.34.

    No entanto, após a instalação constatei que os icons não apareciam no code, então tive que fuçar no code e alterei as linhas
    echo ” “;
    para
    echo ” “;

    E outra coisa que vou alterar num instante é:
    Eu preciso que numa primeira fase as estatisticas estejam disponiveis para os que tiverem role admin, então irei hacker teu code de modo a ter isso patente.

    Obrigado,

    Marcos de Sousa


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.12 em Windows Windows XP
  11. 24/Mar/2008 | 07:07

    @Marcos de Sousa: Estás à vontade.


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.12 em Windows Windows Vista
  12. 4/Abr/2008 | 07:08

    How do I show the user data in the comments list, like you do here?

    Thanks!


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.13 em Windows Windows XP
  13. 4/Abr/2008 | 07:28

    I’m using this plugin on my Web site, works great, I would still like to know how to show info in the comments list though.


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.13 em Windows Windows XP
  14. 4/Abr/2008 | 07:41

    @Tim Wehatley:

    1) At what user data are you referring ?

    2) At what info do you refer in the comments list?


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.13 em Windows Windows Vista
  15. NeX
    2/Mai/2008 | 22:14

    Hey there, my name is Hugo, nice plugin, good job. I have a question… with your plugin, how i can put the total visitors in my blog?. You show this three things:

    Visitantes
    Escrita
    Comentários

    If you can see, in my blog i just can show “Escrita and Comentários” but i want to show “Visitantes” too, i hope that you can help me, thanks.


    A usar Mozilla Firefox Mozilla Firefox 3.0b5 em Linux Linux
  16. 3/Mai/2008 | 15:40

    Hi Hugo,

    Thank you for your nice words about my plugin.

    As to what you’re looking for (the total and online visitors), it’s another plugin (not by me), it just happens that they are placed next to each other on my blog’s sidebar.

    You can find it at http://faked.org/blog/wp-onlinecounter/

    Kind Regards,
    Mário Gamito


    A usar Mozilla Firefox Mozilla Firefox 3.0b5 em Windows Windows Vista
  17. NeX
    3/Mai/2008 | 18:48

    Hey… thanks for your answer :mrgreen:


    A usar Mozilla Firefox Mozilla Firefox 3.0b5 em Linux Linux
  18. 7/Mai/2008 | 22:30

    hi. Thanks for plugin

    perfect.

    best regards


    A usar Mozilla Firefox Mozilla Firefox 2.0.0.14 em Windows Windows XP
  19. 17/Mai/2008 | 05:35

    Does this plugins shows the info about the browser and OS on every comment like it’s showing here under each comment? Or do I need another plugins for that? Love the info that’s showing under each comment btw. :D


    A usar Mozilla Firefox Mozilla Firefox 3.0b5 em Windows Windows XP
  20. 17/Mai/2008 | 09:34

    @JunkieYard: No, that is another plugin: Browser Sniff.
    You can find it here: http://priyadi.net/archives/2005/03/29/wordpress-browser-detection-plugin/


    A usar Mozilla Firefox Mozilla Firefox 3.0b5 em Windows Windows Vista
  21. 17/Mai/2008 | 12:38

    Thanks. Checking it out. Love ya! :-P


    A usar Mozilla Firefox Mozilla Firefox 3.0 em Windows Windows XP
  22. 3/Out/2008 | 06:04

    Hi Mario
    Thank you for the bugfix, installation runs perfectly now.
    Have a nice day


    A usar Mozilla Firefox Mozilla Firefox 3.0.1 em Windows Windows 2000
  23. BL
    25/Out/2008 | 09:55

    Viva,
    Sobre que licença é disponibilizado o plug-in? Posso altera-lo?
    Já o fiz, mas se não deixares modificar, removo a alteração. É que não gosto de ver uma série de zeros a aparecerem (eu não sou tão popular como tu :P).
    Só adicionei dois if($var > 0)

    Cumps,
    BL


    A usar Mozilla Firefox Mozilla Firefox 3.0.3 em Ubuntu Linux Ubuntu Linux
  24. 25/Out/2008 | 10:12

    @BL: É pá, eu nem pus licença nenhuma, embora ande sempre com ideia de pôr. Vou tratar disso hoje. É GPL, podes mexer à vontade, faz o que quiseres na boa.

    Cumprimentos,
    Mário Gamito


    A usar Mozilla Firefox Mozilla Firefox 3.0.3 em Windows Windows Vista
  25. BL
    25/Out/2008 | 13:34

    Fixe :)
    Adicionei tb isto:

    title=\”Browser: $key\”

    e

    title=\”OS: $key\”

    aos echos do img. Assim qd deixas o rato em cima da imagem aparece uma tooltip a dizer ao que corresponde a imagem :)

    Abraço,
    BL

    PS: Não estou a pensar em redistribuir, se quiseres (re)utilizar as alterações tudo bem :)


    A usar Mozilla Firefox Mozilla Firefox 3.0.3 em Ubuntu Linux Ubuntu Linux
atira-lhe uma pá de carvão

Nota: Todos os comentários são moderados.