Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2012-11-23 10:22:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,243
Website GitHub

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

Pat64 wrote:

Note: the last 2 words have a space after its.

Thanks Patrick. Loaded into my dev copy and will be distributed next time I do a plugin sweep. I don’t know if the trailing spaces will survive the import process as I think strings are trimmed. Certainly Plugin Composer trims them when they are edited.

May I suggest you to add this feature? “Estimated reading time”

Great idea. I already have a public-facing reading time on my blog so it makes sense to fold this into the plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#26 2012-11-23 13:04:37

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

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

Bloke wrote:

Great idea. I already have a public-facing reading time on my blog so it makes sense to fold this into the plugin.

For Mr. Bloke: hip, hip, hip, hourray!


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#27 2013-01-16 16:45:28

seav
New Member
From: Philippines
Registered: 2009-11-02
Posts: 2
Website

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

Bug report:

If the site preferences specifies that article excerpts are disabled, the live word count on the Write page stops working. That’s because the JavaScript tries to find the #excerpt HTML element and doesn’t find it leading to a silent JavaScript error.

Offline

#28 2013-01-16 17:24:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,243
Website GitHub

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

seav wrote:

If the site preferences specifies that article excerpts are disabled, the live word count on the Write page stops working.

Ah, good catch thanks. For now if you want it to start working again just visit the prefs and remove the ‘#excerpt’ entry from the Word count fields and DOM selectors. That should stop it looking for the missing selector.

Last edited by Bloke (2013-01-16 17:24:57)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#29 2013-11-23 09:13:34

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

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

Hi Mister Stef ;)

SEO guru give that advice: “Your URL’s length must to be less than 90 characters”
Maybe you could add a new counter based on the title.

Best regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#30 2013-11-25 23:58:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,243
Website GitHub

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

Pat64 wrote:

Maybe you could add a new counter based on the title.

You can do that yourself. Visit Admin->(Advanced) Prefs and find Article Stats. In the Word count fields and DOM selectors option, add Title -> #title as one of the (comma-separated) items. Job done.

Last edited by Bloke (2013-11-25 23:59:16)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#31 2013-11-26 09:19:43

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

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

Offline

#32 2013-11-26 14:50:51

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

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

Bloke wrote:

You can do that yourself. Visit Admin->(Advanced) Prefs and find Article Stats. In the Word count fields and DOM selectors option, add Title -> #title as one of the (comma-separated) items. Job done.

Cool, Stef. It count the number of words into the title (not the number of characters into the “Title_url” + protocol + domain name):

http://www.johnfdoherty.com/lessons-from-google-about-url-lengths/


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#33 2013-11-26 20:20:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,243
Website GitHub

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 :-)

Last edited by Bloke (2013-11-26 20:24:55)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#34 2013-11-30 08:41:14

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

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

Cool Stef :)

Ok for the “scheme URI” counting: I understand.
Tks for your reply.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#35 2014-02-20 06:41:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,006
Website GitHub Mastodon Twitter

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

I was wondering if this plugin could help me with this.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#36 2014-02-20 08:46:58

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,243
Website GitHub

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

colak wrote #279119:

I was wondering if this plugin could help me with this.

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.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB