Re: smd_article_stats: Article stats to count words 'n stuff

douglgm wrote:

Maybe I’m being dim, but didn’t he want to count the number of characters in the title, not the number of words?

Haha, I need my eyes or brain tested. You’re right. Sorry for being a dumbass. Suppose I could add a similar system for counting characters so you could somehow choose which bits you want displayed. Leave it with me and I’ll see if I can come up with anything.

I don’t think counting the domain + protocol + title is very practical though. I mean, it’d have to add up the site_url pref, guess the protocol (one character possible drift), figure out how long the intermediate parts are depending on your permlink scheme and, if necessary, work out how long the section is (remember section names are language dependent). There’s a lot of scope for error. Best advice: tell authors to use common sense and keep article titles short enough :-)

Re: smd_article_stats: Article stats to count words 'n stuff

Yes. It has a public tag that can output the word counts from a single article so all you have to do is put it inside a list-building tag like <txp:article> (on a landing page), or <txp:article_custom>. Then you can use something like adi_calc (or roll your own txp:variable addition system) to total the words in the selected field thrown out by smd_article_stats.

Re: smd_article_stats: Article stats to count words 'n stuff

Hello Stef, ‘cause I’m using Claire’s Swap Body Excerpt your plugin show the number of words in the “wrong” way (first the body words and then the excerpt words).So, I know, it’s not your fault… hehehe… :P but, can you add a function to swap the counters?

EDIT: didn’t notice the Advanced Prefs: it’s already possible!

The best would be an auto-check if Claire’s plugin is activated and perform as a result… ;)-

… and even the possibility to localize the plugin (“word/s” => “parola/e” in Italian) even in the interface (“Article Stats” => “Statistiche”)

I’m guessing that should be the sum of 1,991 + 119 (the desire) but isn’t getting processed, and the numbers are off.

Franky, I don’t care if the counts are off by a few words, but that’s more than a few. And the summation is troubled.

Stef’s response from a different thread soon to be deleted:

You might want a break=" + " attribute to separate the items :-)

As for the disparity in counts, well, it’s tricky. I think the plugin counts the body text typed on the admin side, which may include tags and headings and Textile codes and stuff. But on the public site, it only counts the rendered HTML, minus tags. So depending how much markup you use there may be some differences. A few hundred words seems a lot, though!

EDIT: I just found an article with over 9K words in it and the difference between public and admin counts was 10 words – that accounted for the ‘h2.’ tags in the admin side body text. Do you have a lot of Textile markup in your article body?

EDIT 2: The plugin doesn’t (currently) do sums. But if you’re running 4.7 you could maybe find a way to run the output through <txp:evaluate> to do the maths.