Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2012-04-04 16:08:49

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

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

Thanks Bloke,

Unfortunately it still doesn’t seem to include the custom field to the count (I used the field name), and actually on admin side it displays only zeros now.

Last edited by Teemu (2012-04-04 16:09:06)

Offline

#22 2012-04-04 16:22:01

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

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

I stand corrected. It does count the custom field, didn’t realize the field name has to be all lowercase. Admin side still shows all zeros though. I use hak_tinymce, if that has any relevance, although the earlier version was displaying ok count after save.

Also I noticed this error is displaying at the bottom of the admin side:

Warning: Invalid argument supplied for foreach() in /home/kiina8/www/textpattern/lib/txplib_misc.php(653) : eval()'d code on line 97

Last edited by Teemu (2012-04-04 16:44:33)

Offline

#23 2012-04-04 18:57:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,456
Website

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

Teemu wrote:

didn’t realize the field name has to be all lowercase.

Ah yes, Textpattern lower-cases it internally.

Admin side still shows all zeros though.

Weird, works for me. But…

Warning: Invalid argument supplied for foreach()

probably wasn’t helping. Try the new beta I just uploaded which squashes that bug. Thanks for the report.


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

#24 2012-11-22 13:35:28

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,205
Website

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

Hi Stef ;)

You’re looking for, now you’ve got it:

#@admin
#@language fr-fr
smd_artstat => Statistiques d'article
smd_artstat_fields => Champs de décompte et sélecteur du DOM
smd_artstat_pos => Emplacement dans la page
smd_artstat_id => Afficher l'ID de l'article
smd_artstat_singular => Nombre pris au singulier
smd_artstat_pos_below_excerpt => Sous le résumé
smd_artstat_pos_below_author => Sous le nom d'auteur
smd_artstat_pos_above_status => Au dessus des statuts
smd_artstat_pos_above_title => Au dessus du titre
smd_artstat_pos_above_textile => Au dessus de l'aide Textile
smd_artstat_pos_above_textfilter => Au dessus du sélecteur Aide Textile
smd_artstat_pos_below_textile => En dessous de l'aide Textile
smd_artstat_pos_below_textfilter => En dessous du sélecteur Aide Textile
smd_artstat_legend => Statistiques article
smd_artstat_word_singular => Mot 
smd_artstat_word_plural => Mots 

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

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

Last edited by Pat64 (2012-11-23 09:35:33)


Patrick.
G+
Github | CodePen

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,456
Website

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,205
Website

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.
G+
Github | CodePen

Offline

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

seav
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: 8,456
Website

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,205
Website

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.
G+
Github | CodePen

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,456
Website

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

Board footer

Powered by FluxBB