Impress your friends with your blog stats
Blogging, Programming April 10th, 2007 - 11,927 viewsI was chatting with my buddy ryan earlier about PaulStamatiou.com and noticed the little word/comment counter he has in the header of his blog. I thought it was cool, so I wrote a wordpress plugin to generate the same stats for my blog! Now I’m making it available to you. I’m calling the plugin Impress, and you can download it here (pretty-printed version).
Here’s how you install it:
- Save the file to your wordpress plugins directory (wp-content/plugins) as impress.php
- Activate the plugin under the plugins tab on the wordpress admin panel (it should be the one called Impress)
- Place a call to the impress() function in your header.php, footer.php or some other template file - it should look like
<?php impress(<format>); ?>
That’s all!
The impress function takes one argument: a specially formatted string that determines what the output will be. There are six special keywords that will be replaced with your statistics, the rest of the string can be anything (it will be displayed along with the stats). The keywords are :users, :posts, :pages, :comments, :categories, :post_wordcount, :page_wordcount, and :comment_wordcount. They’re pretty self explanatory, so I’ll let you figure out what they mean.
Here’s an example from my blog (see the lower right-hand corner):
<p><?php impress("So far I've written :post_wordcount words
in :posts posts. :comments comments have been posted,
with a total of :comment_wordcount words."); ?><p>
Let me know if you have any thoughts, comments, suggestions, etc. Otherwise, enjoy!
Update: It’s fast, too! I’m being dugg right now and the server’s not breaking a sweat.
April 10th, 2007 at 10:02 pm
This plugin is awesome, check out my site to see how I implemented it!
Thanks!
May 3rd, 2007 at 3:36 pm
Hey… that’s nice plugin… I have installed the same in my blog..!
May 13th, 2007 at 9:57 am
[…] I wrote the impress wordpress plugin (which calculates some simple blog stats - see the bottom right of this page) I wanted to make it […]
May 13th, 2007 at 7:07 pm
[…] [插件下载 | Plugin download] [插件主页 | Plugin Page] […]
May 14th, 2007 at 3:38 pm
[…] Impress displays blog stats showing the number of users, posts, pages, comments, categories, words, and more on your blog. […]
May 14th, 2007 at 5:47 pm
Nice work and thanks for doing the dirty work and releasing something like this.. I’ve gotten a few emails asking about it. That’s some clean code as well, my 5 minute implementation seems rather slow.
May 14th, 2007 at 7:43 pm
Paul,
Thanks man - props to you for the idea. The code is pretty fast, but honestly it’s probably not a calculation you want to do with every page impression on a blog like yours (especially since you have quite a few posts).
You can easily enable caching via memcache. I didn’t mention it in my post because I thought it would confuse the 95% of people who don’t need it. And the 5% who do need it can probably figure out how it works from the code. That, and if you have a highly trafficked site you’ll probably have WP-Cache installed, which makes caching via memcache unnecessary.
May 15th, 2007 at 8:34 am
Thanks for this, Mike. I’m not 100% decided I’ll use it, since I’m hoping to keep my design as clean as I can… then again, the way Paul, Ryan, and you have used it is pretty non-obtrusive.
Thanks again.
May 15th, 2007 at 11:07 am
I tried to implement this plugin in a text widget, but that did’nt work. What about a widget for this one? :-)
May 15th, 2007 at 11:15 am
I’m not quite sure what you mean…
Do you mean using the widget sidebar plugin? If so, that’s a pretty good idea. Don’t know why I didn’t think of that. I’ll take a look at the code and see what I can do.
May 15th, 2007 at 11:23 am
That’s exactly what I mean. I’ve noew tried to put it inside my footer, but I only get an error message: “Parse error: syntax error, unexpected ‘
May 15th, 2007 at 11:30 am
I’ll take a look at the code and try implementing it as a widget. In the meantime you can shoot me an email at mmalone/at/vt/dot/edu, or contact me on AIM on the screen name lo4fy and I’ll see if I can help you figure out what’s going on.
May 15th, 2007 at 1:19 pm
[…] Impress despliega estadísticas del blog que muestran el número de usuarios, entradas, páginas, comentarios, palabras y mucho mas en tu blog. […]
May 15th, 2007 at 5:32 pm
[…] Impress Your Friends - Installs a sidebar widget which displays things like how many posts you have had, how many words you posted, how many comments you have had, etc […]
May 15th, 2007 at 8:00 pm
Great Plugin… I was able to implement this plugin and it looks great…
May 16th, 2007 at 1:09 pm
I’m glad people are using and enjoying this plugin. I’m probably going to be working on some updates soon, so if you have any suggestions for features you’d like to see please post them here.
So far, I plan on adding widget support (i.e. for the widget sidebar), and configuration options through the admin menu so you don’t need to edit code to change the plugin’s output.
Again, if there’s anything you’d like to see added to the next release (including additional statistics), let me know!
May 16th, 2007 at 8:55 pm
[…] [插件下载 | Plugin download] [插件主页 | Plugin Page] […]
May 18th, 2007 at 4:24 am
Hello mike,
thanks for this great and so simple Plugin.
I just integrated it into my own Blog.
Take care,
LostInPlay
May 18th, 2007 at 9:51 am
Hi Mike. They released a plugin today where you can implement php-code into a “custom” widget. That plugin + yours = a solution for me! :-D
May 18th, 2007 at 9:56 am
Awesome! So did you get it working? If so, do you have a link to the plugin? I think some other people might be interested in using it.
May 18th, 2007 at 10:21 am
I haven’t started working on it yet, but will start later today. Will tell you where to find it then. OK?
May 18th, 2007 at 1:45 pm
It’s working now. How to do it:
1) Download and install “Widgetize anything”: http://www.erik-rasmussen.com/blog/2006/11/30/widgetize-anything/
2) If you’ve upgrade to Wordpress 2.2, you can move to 4)
3) Download and install “Automaticc”.
4) Activate both plugins in the Dashboard
5) In the Dashboard, go to Presentation > Widgets
6) Pull the “Widgetize anything 1″ widget into the sidebar
7) Open the “Widgetize anything 1″, and name it as you wish in the header.
8) Paste the code from Mikes example (above) into the lower part of the widget. The code in Mikes example is:
[]
Brackets [] shown here for illustrating purposes only!
9) Trim the code by removing [] in the beginning an the end.
Brackets [] shown here for illustrating purposes only!
10) You must also remove [] in the end. The code will then look like this:
[impress(”So far I’ve written :post_wordcount words
in :posts posts. :comments comments have been posted,
with a total of :comment_wordcount words.”);]
Brackets [] shown here for illustrating purposes only!
Visit my blog for an example, bottom right corner.
May 18th, 2007 at 1:46 pm
I forgot to leave the url for “Automaticc”:
http://automattic.com/code/widgets/
Good luck!
May 18th, 2007 at 1:48 pm
An now I can see most of the code in my comment has been removed. Silly of me not to think about that.
Basically, you get the picture by looking at 10) where unwanted code has been removed.
May 24th, 2007 at 4:49 am
[…] Impress displays blog stats showing the number of users, posts, pages, comments, categories, words, and more on your blog. […]
July 15th, 2007 at 4:59 pm
This is awesome! I’ve been searching for ages for something like this. Is there a way to include categories in it as well? I’m aiming to have something like this in my sidebar:
Posts: number
Comments: number
Categories: number
Last Post: “Title”
Last Commentator: name
If you could help me that’d be great. Thanks! I know this comment is pretty late, but hopefully you’ll reply. I found this page through Google.
July 22nd, 2007 at 6:32 am
Cool plugin! I just downloaded, installed and implemented it on my About page with the help of the PHP Exec plugin. Thanks a lot! :)
August 1st, 2007 at 4:09 pm
[…] Impress - Impress your readers with statistics on the number of users, posts, comments, pages, categories, words in posts, words in comments, and words in pages you have. […]
August 7th, 2007 at 4:49 am
[…] Impress - Display number of users, posts, pages, comments, categories, words, and more on your blog for visitors to see. […]
August 7th, 2007 at 8:36 pm
[…] Akismet Spam Count - Alexa Rank - GeneralStats - Google PageRank - Impress - Jon’s Showoff Rankings […]
August 7th, 2007 at 10:23 pm
[…] Impress - 显示注册用户数量、日志数量、页面数量、评论数量、目录数量、字数等信息。 […]
August 8th, 2007 at 12:26 am
[…] Impress - 与GeneralStats功能类似的一个插件。 […]
August 12th, 2007 at 3:53 pm
[…] Impress – показывает посетителям количество юзеров, постов, страниц, комментариев, категорий и слов. […]
August 16th, 2007 at 10:25 pm
[…] Impress - Display number of users, posts, pages, comments, categories, words, and more on your blog. […]
August 19th, 2007 at 2:52 pm
[…] Impress - Display number of users, posts, pages, comments, categories, words, and more on your blog for visitors to see. […]
August 19th, 2007 at 10:41 pm
[…] Impress - 显示注册用户数量、日志数量、页面数量、评论数量、目录数量、字数等信息。 […]
August 28th, 2007 at 7:33 am
[…] Impress […]
September 4th, 2007 at 10:03 am
[…] Visit & Download […]
September 4th, 2007 at 11:37 pm
[…] Impress allows your to display/share your blog statistics with your readers. […]
September 5th, 2007 at 2:35 am
[…] Impress allows your to display/share your blog statistics with your readers. […]
September 5th, 2007 at 4:57 am
[…] слов в статье, слов в комментариях, и слов на страницу. Impress - поти тоже что и предыдущий. оформление статей Add […]
September 5th, 2007 at 10:14 am
[…] Impress - 与GeneralStats功能类似的一个插件。 […]
September 5th, 2007 at 5:34 pm
[…] another fun WordPress plugin. Impress pulls out some of the same data as a word count plugin I’ve been using for a while, but makes […]
September 5th, 2007 at 5:36 pm
Ooooh, nice! Installed, working. Thanks.
September 6th, 2007 at 6:21 am
[…] Impress - 与GeneralStats功能类似的一个插件。 […]
September 11th, 2007 at 7:25 pm
Hi, Mike,
Great little plug-in. I have it shoe-horned in the Cutline theme with minor alterations.
Question though. How can I get this to exclude page ID’s? I have a couple pages that I don’t wish to count-in as they’re a part of the Shop system installed.
September 16th, 2007 at 2:53 am
[…] Impress allows your to display/share your blog statistics with your readers. […]
September 19th, 2007 at 3:35 am
Thanks for the great plugin Mike, I have been using it a short while.
Do you have any plans to upgrade it to work with WP2.3?
September 20th, 2007 at 1:59 am
[…] […]
September 26th, 2007 at 8:54 am
[…] Impress - Display number of users, posts, pages, comments, categories, words, and more on your blog. […]
September 27th, 2007 at 11:01 am
[…] Impress - A plugin to help you share stats with your readers about things such as number of comments or number of words in all posts. […]
September 28th, 2007 at 4:46 am
[…] Impress - Display number of users, posts, pages, comments, categories, words, and more on your blog. […]
October 6th, 2007 at 1:01 pm
[…] 15)Impress - Mostra il numero di pagine, post, utenti, commenti, categorie e molto altro, e ne permette la visualizzazione a tutti i visitatori. […]
October 10th, 2007 at 12:25 am
[…] Impress - 显示用户、文章、页面、评论、分类、字词以及访客等信息 […]
October 14th, 2007 at 10:20 am
Does this plugin still work with WP 2.3? Thanks!
October 19th, 2007 at 9:42 pm
[…] Impress your friends with your blog stats - I’m Mike […]
October 22nd, 2007 at 11:52 pm
[…] Akismet Spam Count- Alexa Rank- GeneralStats- Google PageRank- Impress- Jon’s Showoff Rankings […]
November 4th, 2007 at 8:37 am
[…] Impress - Te permite mostrar a tus lectores el número de usuarios, posts, páginas, comentarios, […]
November 4th, 2007 at 2:32 pm
[…] слов в статье, слов в комментариях, и слов на страницу. Impress - поти тоже что и предыдущий. Add Graphic Signature - плагин […]
November 4th, 2007 at 2:36 pm
[…] слов в статье, слов в комментариях, и слов на страницу. Impress - поти тоже что и предыдущий. Add Graphic Signature - плагин […]
November 9th, 2007 at 7:50 am
[…] Impress - 显示博客用户、分类、日志、评论等数量。 […]
November 10th, 2007 at 9:11 am
[…] слов в статье, слов в комментариях, и слов на страницу. Impress - поти тоже что и предыдущий. Add Graphic Signature - плагин […]
November 16th, 2007 at 4:21 pm
[…] слов в статье, слов в комментариях, и слов на страницу. Impress - поти тоже что и предыдущий. Add Graphic Signature - плагин […]
November 18th, 2007 at 10:03 pm
[…] Impress - 显示博客用户、分类、日志、评论等数量。 […]
November 22nd, 2007 at 12:00 pm
[…] слов в статье, слов в комментариях, и слов на страницу. Impress - поти тоже что и предыдущий. оформление […]
December 1st, 2007 at 1:58 am
[…] Impress - 与GeneralStats功能类似的一个插件。 […]
December 3rd, 2007 at 1:15 am
[…] Impress - 显示博客用户、分类、日志、评论等数量。 […]
December 6th, 2007 at 8:28 am
[…] Impress - 显示博客用户、分类、日志、评论等数量。 […]
December 9th, 2007 at 8:41 am
[…] Impress - Display number of users, posts, pages, comments, categories, words, and more on your blog. […]
December 12th, 2007 at 3:38 pm
[…] Impress - 与GeneralStats功能类似的一个插件。 […]
January 22nd, 2008 at 4:59 am
[…] слов в статье, слов в комментариях, и слов на страницу. Impress - поти тоже что и предыдущий. Add Graphic Signature - плагин […]
January 28th, 2008 at 7:19 am
[…] downloaded and installed the plugin “Impress” from I’m Mike. This will show total words, posts, comments and other calculations. for now I have set it to […]
January 28th, 2008 at 7:20 am
Thanks for the plugin Mike. I have installed it on my site.
February 5th, 2008 at 4:24 pm
[…] Impress - 显示博客用户、分类、日志、评论等数量。 […]
February 10th, 2008 at 3:46 am
[…] Impress - 与GeneralStats功能类似的一个插件。 […]
March 6th, 2008 at 11:20 am
[…] they use information specific to your site to generate more content. For example, a plugin that lists statistics about your website must pull that information from the database. Other plugins read and write to […]
March 15th, 2008 at 7:42 am
[…] Impress - Display number of users, posts, pages, comments, categories, words, and more on your blog. […]
March 28th, 2008 at 1:54 pm
[…] - 显示博客用户、分类、日志、评论等数量。 Google PageRank - 显示Google PR值。 Impress - 显示博客用户、分类、日志、评论等数量。 Jon’s Showoff Rankings Widget - […]