Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-05 15:02:57

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

Displaying article's authors by steps

Hi folks ;)

I need to display each articles (there is a lot of) first ONLY if authors had published more than 10 articles, then, in a second time, I want to publish their articles IF the number of articles is a multiple of 5.

It seems I need to use modulo within my PHP script. If you have any ideas, please give me the way to make this working.

Thanks lot by advance.

Best regards,


Patrick.

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

Offline

#2 2009-02-06 08:52:52

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

Re: Displaying article's authors by steps

Pat64 wrote:

I want to publish their articles IF the number of articles is a multiple of 5.

smd_if has a divisible operator. Perhaps a couple of nested smd_if calls will do the trick?


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

#3 2009-02-06 10:30:51

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

Re: Displaying article's authors by steps

Ok. Tks Stef ;)

I will going to look further with your plugin and tell you if I can realize my purpose.

Cheers,


Patrick.

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

Offline

Board footer

Powered by FluxBB