Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » mdn_count

#76 2010-11-27 04:04:49

radneck
Plugin Author
Registered: 2005-07-03
Posts: 109

Re: mdn_count

geoff777 wrote:

Hi does this plugin support multiple sections?

Hi Geoff,

It certainly does. Just put them all in separated by commas (as you have above), and it should be right to roll :)

Last edited by radneck (2010-11-27 04:06:33)

Offline

#77 2010-11-27 09:16:04

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: mdn_count

Hi thanks for the quick reply.

I’ll install it and give it a try.

Any chance of adding custom fields … ?


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#78 2010-11-27 13:48:43

radneck
Plugin Author
Registered: 2005-07-03
Posts: 109

Re: mdn_count

geoff777 wrote:

Any chance of adding custom fields … ?

Care to elaborate what you mean? Count custom fields that have names? Or additional custom fields added by plugins?

Last edited by radneck (2011-02-27 05:32:26)

Offline

#79 2010-11-29 20:11:12

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: mdn_count

To the count filter … count where section=“x” category1 =“y” and custom_field1=“z”

I use a custom_field name=“frontpage” that is either yes/no I’d like to be able to count all my “frontpage” articles.

Thanks
Geoff

Last edited by geoff777 (2010-11-29 20:12:13)


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#80 2010-11-30 00:57:57

radneck
Plugin Author
Registered: 2005-07-03
Posts: 109

Re: mdn_count

Okay I see what you mean, similar to customfieldname. This is a pretty specific scenario, but I think it could be done with a couple of generic attributes, filterfield and filtervalue. That way you could use if for custom fields, and other users could use if for any other column in the table.

OK, I’ll add it to the list :)

Last edited by radneck (2015-11-04 07:42:09)

Offline

#81 2010-11-30 11:08:58

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: mdn_count

Hi Mitch,

Yes, I guess if you could build in as many attributes from article_custom as you can find time to …

Thanks for making this …

Geoff


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#82 2011-07-25 17:48:06

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: mdn_count

geoff777

Just wanted to send a quick thanks for updating the plug in. I have been using the old version for awhile but needed to have it count multiple section. Old version could not do this, but your new version does.

Thanks again.

progre55

Offline

#83 2011-07-26 03:52:29

radneck
Plugin Author
Registered: 2005-07-03
Posts: 109

Re: mdn_count

No problem, glad it helped.
I’ve been meaning to update this plugin as per geoff777’s request above, but haven’t got round to it.

Hopefully I’ll get some time this weekend.

Last edited by radneck (2015-11-04 07:39:30)

Offline

#84 2012-04-07 07:23:54

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: mdn_count

is it possible to integrate this plugin into code below?

<txp:section_list break="" default_title="Home" include_default="1" sections="houses,farms,apartments,lands,commercial-real-estate,rent" wraptag="ul" class="sub">
  <li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>><txp:section link="1" title="1" /></li>
</txp:section_list>

what you think?

the default usage of a plugin:

<txp:mdn_count [section="sectionname"] />

or maybe you know better solution for counting articles per sections?

Last edited by Gallex (2012-04-07 07:26:16)

Offline

#85 2012-04-07 09:54:36

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: mdn_count

Does something like that sound good ?

<txp:section_list break="" default_title="Home" include_default="1" sections="houses,farms,apartments,lands,commercial-real-estate,rent" wraptag="ul" class="sub">
  <txp:variable name="scount" value='<txp:mdn_count section=''<txp:section />'' />' />
  <txp:if_variable name="scount" value="0">
  <txp:else />
    <li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>><txp:section link="1" title="1" /></li>
  </txp:if_variable>
</txp:section_list>

Offline

#86 2012-04-07 11:35:52

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: mdn_count

no…..i can’t see any counter number anywhere:(

Offline

#87 2012-04-07 12:46:10

Remillard
Plugin Author
From: Lenexa, KS
Registered: 2004-05-16
Posts: 169

Re: mdn_count

It’s my understanding that there is some sort of article count in the main codebase. I don’t know, however, if it does the counting by sections and whatnot. If anyone wants to take the code and create a patch, I’m sure the folks who hang out on the txp-dev mailing list would be happy to consider it. I’m personally not involved much with Textpattern anymore, but glad the plugin is still helpful to some folks.

Oh, perhaps I misunderstood the question, I only got an email summary and I“ll admit I didn’t read it very closely. I don’t know how well it would tie into other plugin usage there.

And very glad cain is keeping up with things and has added functionality to it.

Last edited by Remillard (2012-04-07 12:49:12)

Offline

#88 2012-04-07 12:51:46

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

Re: mdn_count

Does this work?

<txp:section_list break="" default_title="Home" include_default="1" sections="houses,farms,apartments,lands,commercial-real-estate,rent" wraptag="ul" class="sub">
  <li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>><txp:section link="1" title="1" /> <txp:mdn_count section='<txp:section />' /></li>
</txp:section_list>

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

Offline

#89 2012-04-07 13:59:52

Gallex
Member
Registered: 2006-10-08
Posts: 1,331

Re: mdn_count

working, and very well! thank’s colak!
but could you provide code for: display total number of articles under those sections: houses, farms, apartments, lands, commercial real estate, rent, as well?

Offline

#90 2012-04-07 14:01:49

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: mdn_count

Edit: not what you needed, sorry.

Last edited by els (2012-04-07 14:02:55)

Offline

  1. Index
  2. » Plugin support
  3. » mdn_count

Board footer

Powered by FluxBB