Your Ad Here

Word count plugin for Movable Type

MTWordCount is a Movable Type plugin that counts your entry’s words and inserts it into your page.

Tim Appnel has taken over the maintenance and support of this plugin as of Oct 2004.

Download

You can get MTWordCount 1.3 by downloading WordCount.zip.

Installation

Once you’ve downloaded and unzipped WordCount.zip, connect to your FTP server and open the directory where you have Movable Type installed.

Create a directory there called plugins if there isn’t one already.

Copy WordCount.pl to the plugins directory and set the permissions to 755.

Using MTWordCount

Once you’ve installed MTWordCount, using it is as simple as placing a new Movable Type tag in your template.

The <MTWordCount> tag goes between the <MTEntries></MTEntries> tags. The tag will count the number of words in your Main Entry text and your Extended Entry text and insert the count into your page.

Example:

<MTEntries> 
	<p><MTEntryTitle><br> 
	<MTEntryExcerpt> (<MTWordCount> Words) 
</MTEntries>

New in version 1.4 is the <MTImageCount> tag. Authors of photo blogs can use this tag just like WordCount to get a count of all the images in an entry.

License

Like our other freeware, this plugin is released under the open-source MIT License. In plain English, that means you can do whatever you want with the software, including modifying it, selling it, or eating it, but we’re not responsible for anything that goes wrong.

Revision History

1.4 - Aug 31, 2002
(New) New tag: <MTImageCount>.
(Changed) Speed improvements.

1.3 - July 14, 2002
(Changed) Text inside HTML tags is ignored.
(Changed) Text is split on any whitespace instead of just the space character.

1.2 - July 14, 2002
(New) Better error handling.

1.1 - June 30, 2002
(Fix) If Entry text or Extended Entry text is empty, an error may occur.

1.0 - June 27, 2002
Initial release.

Michael
November 13, 2003 9:08 AM

This plugin works fine in 2.63.

MegaLion: I also wanted the ability to just get Body or Extended Count. Go to my web page for a link to a modified version.

Note: While my code works for me, this is really my first try with Perl. Luckily, this is a small plugin to work on.

Trackback from diachrony
November 19, 2003 5:31 PM

Rambling On

Excerpt: I don’t suppose this has any practical value but I came across a script for totalling the word count of a MovableType blog (which I’ve incorporated into the title bar of both my blogs). The original script was posted by...

Trackback from Mind of Knowledge
December 17, 2003 2:30 PM

MT Word Count

Excerpt: Word count plugin for Movable Type :: Kalsey Consulting Group...

Trackback from chris' introspective
September 28, 2004 2:43 PM

MTPHPWordCount

Excerpt: With the shifting of Movable Type templates to dynamic pages, many of the existing Perl plugins won't work (since PHP can't execute Perl). One function I've been waiting to see was the wordcount plugin, however I can't find one. So...

Trackback from Atomkinder Broadcast
October 5, 2004 3:12 PM

Rebuilding EmpireHax

Excerpt: You know it. I know it. Zorak know it. Moltar know it. Rebuilding the Atomkinder news system with MovableType turned into quite a mission. I used a bunch of stuff to do it, here be the record of the process...

These are the last 15 comments. Read all 67 comments here.

This discussion has been closed.

Lijit Search

Best Of

Recently Read

Get More

Subscribe | Archives

Recently

Sprout Test (May 7)
A test post for Sprout widgets.
Product Leadership (May 3)
An anthology of product leadership writing.
Fighting Monster patent claims (Apr 16)
The patent bully picked on the wrong little guy.
Peavy's pine tar (Apr 6)
Jake Peavy's cheating
Bush and Morgan on inner city baseball (Mar 30)
Morgan and Bush discuss the role of baseball in the inner cities.
Not a fork (Mar 27)
We have no intention of forking Drupal. That would be nuts. So what are we doing then?
Eating our dogfood in the sausage factory (Mar 26)
Recursive development for the new Drupal powered community platform.

Subscribe to this site's feed.

Elsewhere

Feed Crier
Get alerted by IM when your favorite web sites and feeds are updated.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks
Del.icio.us
My tagstream at del.icio.us.
Waddlespot
My son's Club Penguin community. News, blogs, tips, and tricks.

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2008 Adam Kalsey.
Content management by Movable Type.