This is the blog of Adam Kalsey. Unusual depth and complexity. Rich, full body with a hint of nutty earthiness.
Excerpt: MTWordCount is a Movable Type plugin that counts your entry’s words and inserts it into your page. Version 1.4 includes an image count for photo blogs. Read the whole article…
Nevermind. It is doing it on Daily Monthly and Index rebuilds. I'm fairly certain it's because I don't always have Extended Entry text. But nothing fails, it just spits out that debugging message, so it's not a big deal, heh.
That's a bug. I've made some changes and uploaded a new version of the plugin. That message should be gone now.
what about counting all of the words under a particular category? or all of the words in your entire weblog? i used to export ALL of my entries into one huge file (>1 Mb), open it in a text editor, strip out the HTML tags, word count it and then manually type this number onto my page. i stopped doing it as it was labour intensive and rebuilding the huge file caused other lags on my site (when posting comments, etc). is it possible to have a plug-in that will track all of your entries, update the total word count and then paste the updated value on your site? now that would be nice...
Well, you could do something like this to get a word count of your entire weblog. Create a new index template called wordcount.js that contains: <script> var count = 0; <MTEntries lastn="10000"> count += <MTWordCount>; </MTEntries> document.write(count); </script> Then just place <script src="wordcount.js"> in your page where you want the count to appear. You could do the same thing for a category by changing the MTEntries tag to include a category restriction.
the word counting worked (it generated a wordcount.js file with a bunch of fun code in it), but when i place the on my page, it does not display any text at all...
sorry, the comments cut out my code example. i meant when i place the script=wordcount.js tag on my page, it does not display any text.
Okay, on second thought, maybe I should have tested the Javascript before I posted it... The template that uses the wordcount plugin should not have the <script> or </script> lines in it. And to insert the count into your page, you want to use <script src="wordcount.js"></script> This one is tested and should work fine.
adam, you are the man. seriously. it works like a charm. thanks very much.
It'd be cool if you could put it in the master archive index (sidebar). Then you could see which of the last few entries were large enough to be worth reading. Right now when I rebuild I get: Can't call method "text" on an undefined value at plugins\WordCount.pl line 18.
It sounds like you are placing MTWordCount in your archive sidebar. MTWordCount has to be placed inside of <MTEntries>.
It works great--thanks!
If you look at my site, I get nothing. Word Count: [There is nothing here] I have it installed in: /cgi-bin/mt/plugins/WordCount.pl Permissions are 755..any ideas? Oh and when I upgraded to 2.21 it still shows 2.2, could that be part of the problem?
If you've upgraded the 2.21 and your version still shows 2.2, then there's something wrong. At least one of your files didn't get upgraded. Try performing the upgrade again. Do you get any error messages when you rebuild? Another thing that could have happened is your computer could have converted the plugin file to Windows or Mac format. Try downloading the plugin again and then upload it to your server without opening it on your computer first.
I redownloaded the upgrade tar.gz file, and it still shows 2.2, no error messages tho.. Hmm
You should probably ask about that on the MT support board.
I think I will, but I still get nothing from your plugin.. no errors, no nothing
Trying to troubleshoot a plugin while MT isn't running properly is likely to be a futile excercise. The version number in MT is generated by MT, so it should come up correct if MT is properly installed.
Ignore everything. See the last post by "alf2org" in the mt forum: http://www.movabletype.org/support/ib3/ikonboard.cgi?s=3d33846fe8d7ffff;act=ST;f=10;t=1013 Sorry I took up your time!
Just a tip for WordCount users (stole it from DiveIntoMark) change your RDF template: <MTEntries lastn="15"> <item rdf:about="<$MTEntryLink$>"> <title><$MTEntryTitle encode_xml="1"$></title> <description>In <$MTWordCount$> words: <$MTEntryExcerpt encode_xml="1"$></description> Newsfeed aggregators will show how large the entry is, besides the excerpt
Adam, you know I use this macro and I like it very much. Would it be possible to write a macro which counts images? I have some additional entrys with only a few words but a number of pictures. I would like a link to "More... (xxx words, x pics)"
Sure. Download the latest version of the WordCount plugin. It now counts images with a MTImageCount tag. While I was at it, I made the whole thing run quite a bit faster as well.
Wow, that was quick! And it works really good. I'm glad you thought it an interesting addition as well! Thanks
It's embarrassing, but I have to ask: what could be going wrong for me? I want to count all words written in my blog, so I followed the steps to create a wordcount.js template, inserted the code (I actually took Pat's code from his page and changed the path because I wanted to make sure I got the JavaScript language right), rebuilt, and...nothing. I'm using 2.21, and other JavaScript widgets are working for me - could you please give me some suggestions on what I might troubleshoot? Thank you!
Did you install the WordCount plugin? The JavaScript won't do anything without it. The URL of your Javascript file might help as well. Then I could look and see what's in it.
Yep, in fact I just reinstalled, just to be sure. The plugin is in my plugins folder in the MT directory, CHMODed to 755 (folder is also 755) . The wordcount.js file is at http://www.deliriouscool.org/wordcount.js and the index page souce code shows the Javascript language in the Archives section of the sidebar. Thank you for looking!
Your HTML code shows that you are using src="home/nammer/public_html/wordcount.js" as your script. Unless you have something at http://deliriouscool.com/home/nammer/public_html/wordcount.js then that won't work. You'll want to change that line to say src="/wordcount.js" In HTML, you refer to JavaScript src files in the same way as you refer to image or CSS sources. Use the path of your Web server, not the complete file path of your host.
Ah, perfect - I'm so glad it was so easily fixed - thanks for the path tutorial - I've jotted it down for future reference!
Love the WordCount plugin. I installed it yesterday, including the wordcount total, and it worked like a charm except that I found it slowed down my rebuild massively (see MT support forum thread below), probably because I have over 1250 entries, so I had to un-install it. :-( http://www.movabletype.org/cgi-bin/ikonboard/ikonboard.cgi?s=3da4eb590bdaffff;act=ST;f=8;t=8838 Debbie
Wordcount should be lightning quick. All it does is grabs the text of the entry and performs one very fast regex on it to determine how many words there are. My bet is that using the total site Wordcount is slowing things down. When you use that, Movable Type has to load all of the entries in your Weblog. That's going to take some time with 1250 entries.
I installed the word count plugin on my NaNoWriMo site and it works like a charm on every page. I installed it on a friend's blog with the Category restriction and it works fine on the index page, but the Word Count Total does not work in the Category or Date-Based archives. http://www.peace.us/surfing/
Change your javascript on the archive pages to /surfing/wordcount.js
Thanks. Doh!
I have instructions for how to do the entire blog word count in PHP for those who don't have JS enabled or something. Pretty simple. I would have psted the code here but it doesn't like me ;-). http://www.technoblog.com/wordcount.txt
I'm also using the wordcount plugin on my NaNoWriMo page http://www.r-l-w.net/nano/ but the count seems to be robbing me of some words. The Section 1 count shows 1696, but when I cut n' paste the text into a text editor and hit the text statistics button, it says 1720. I've also verified this effect by using 'wc -w' on a file of just the text on my Unix system at work. The number is about 35 words short for the Section 2 count, measured the same way. Do you have any idea what I might be doing wrong?
The plugin sometimes doesn't see the last word in a paragraph. You can fix this by changing the line that reads my $count = $strText =~ s/((^|\s)\S)/$1/ig; to say my $count = $strText =~ s/((^|\s|$)\S)/$1/ig;
Thanks for the RegEx fix advice- and Thanks for this cool plugin
Hi, everyone! i installed the script, but the he only counts the entry words not the extended ones, any idea? see http://blog.darksider.net. Many thanks
Try creating a test with a longer extended entry, With only one or two words in the extended entry it's hard to see if there really is a problem. Try putting 10-20 words in both the entry body and the extended entry.
i got that... check the 1st post please. only 2 words :( regards, Daksider
(1 <- wordcount) palavras escritas, por Darksider às 04:34
ops its works now! wierd? how its possible to work in this new entry and not in the others?!
What I need you to do is create an entry with a longer entry body and extended entry. There's a known bug where the plugin won't always count the last word in a paragraph. Since your paragraphs only contain one or two words, there's no way to tell if the plugin is counting the extended entry.
thanks for the very fast support :)
Excellent plugin and thanks for the javascript for total word count. I have them both implemented on my blog. :-)
Excerpt: eigentlich müsste ich ja noch ein wenig schuften, aber ich mag nicht mehr, daher habe ich gerade mal noch das
I did the same thing (total word count) on http://www.deanebarker.net. Look down the bottom of the left sidebar. Works beautifully.
Excerpt: http://www.kalsey.com/2002/06/word_count_plugin_for_movable_type/...
Excerpt: A flashier alternative to MTWordCount.
now that i've installed this nifty plug-in (thanks so much), how might I go about using the Word Count data to display, say, the five longest entries throughout my blog?
Excerpt: I've installed the Word count plugin on the site and it's in use on the Farmblog so you can see whether a post is going to take up an hour of your time to read or not. Here's credit where credit is due....
Excerpt: Today's post is a follow-up to my MT installation woes from last week. I promised to write about what happened and how everything was fixed, as there's not much documentation around about this specific problem.
Excerpt: General, indispensible links for MT setup and configuration include: Movable Type, the girlie matters, Empty Pages, Scriptygoddess, and CSS Zen Garden. To minimize the tehno-babble on this blog while keeping track of this behemoth project, here is the ...
I love this plugin! It works perfectly, and you're total weblog count works wonders too, so thank you for that too. The only thing that I wish it had was a method for adding a comma separator as needed. For example, 10,000 verses 10000. Is there anyway to do this, or have I missed something?
Excerpt: Will over at Basingstoke Life has redesigned his site with a Black theme, which while I like the black and white theme, I’m not too sure about the massive image of the Thames. Over here, I have rejigged certain parts...
Excerpt: Some of them are behind the scenes, but there have been a bunch of improvements to the site over the past few days. A thousand thanks to the Six Apart people for making Movable Type, the software behind this site...
Is there anyway to incorporate this into mtarchivelist so that the wordcount will show up beside each entry reference?
I'm surprised no one has asked for an option to count JUST the words in the Extended Entry. Been reading through everything in here and EntryCount and haven't found anything that indicates that either plugin could do it. Did I miss something? Or if I didn't... any chance it could be added? Thanks
I am getting a similar error (as reported Jun 30, 2002) with other MT plugins. Could you please specify how you got around the problem ? MT::App::CMS=HASH(0x140f18) Use of uninitialized value in split at plugins
I'm trying to figure out how to limit the word count to just one category, or to do it by categories instead of on each individual entry. I've looked all over the MT site and MTplugins site, but haven't found the answer, and since I'm relatively new to MT, I'm not sure how to go about it. I got it to count the words for every single one of my entries, but what I would like is to be able to display in the sidebar, by category, the number of words in each category. Can you help me out?
Does this plugin still work for version 2.64?
Excerpt: I created a modified version of MTWordCount that has the property 'exclude' that allows selection of just the Body or just the Extended Entry.
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.
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...
Excerpt: Word count plugin for Movable Type :: Kalsey Consulting Group...
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...
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...
This discussion has been closed.
The One True b!X
June 30, 2002 2:27 AM
Eek, what is this, seen after rebuilding my Dailies. I didn't get it when I rebuilt my Main Index, tho. Your Daily pages have been rebuilt. View your site. MT::App::CMS=HASH(0x140f18) Use of uninitialized value in split at plugins/WordCount.pl line 9. MT::App::CMS=HASH(0x140f18) Use of uninitialized value in split at plugins/WordCount.pl line 9. MT::App::CMS=HASH(0x140f18) Use of uninitialized value in split at plugins/WordCount.pl line 9. MT::App::CMS=HASH(0x140f18) Use of uninitialized value in split at plugins/WordCount.pl line 9.