Textpattern CMS support forum

You are not logged in. Register | Login | Help

#41 2018-11-07 16:17:31

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

Re: [solved] Nth year counter from given start

Destry wrote #315041:

I know Bloke did no small amount of magic just to get TXP Mag operating more like a real magazing, at least on the organizational side.

It was fun. But to be fair, Textpattern has most of the elements already, they just needed tying to the URL because of the custom formats we wanted:

  • txpmag.com/issues = all issues list, latest first.
  • txpmag.com/issues/N = issue N landing page
  • txpmag.com/issues/YEAR = latest issue from that year
  • txpmag.com/issues/YEAR/MO = issue from that year and month
  • txpmag.com/people/your-name = person bio + articles they authored + sidebar showing latest issue articles

Most of it was handled from a single “routing” Form that’s included at the top of every page. That analyses the URL and makes a bunch of decisions to work out which of the above ‘contexts’ apply and then sets variables accordingly.

After that, each structural element – sidebar, main copy, etc – uses conditionals to display the relevant content based on the variables that have been set.

The rest of the article stuff works as standard Textpattern. Built-in magic :)

btw, there’s a mag article on it :)

if I was building a CMS today, it would be specifically for editorial publishing and workflow, not website design in general.

My status-mods branch is one such experiment into this arena. No implied hierarchical publishing statuses. Each status is in one of two default camps: either ‘published’ or ‘unpublished’ and then you (or plugins) can rewire each as you like, or make more statuses and groups.

In this brave new world, there’s nothing to stop a plugin from registering new statuses or repurposing Pending as “Intent to publish”. With some smd_bio goodness, said publishing workflow plugin could even ping someone with an ‘editor’ role to notify them it’s ready for review. Or whatever.

The posts garnered zero interest so I assumed it was not of use (or too Blokey-terse to understand!)

Last edited by Bloke (2018-11-07 16:40:13)


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

#42 2018-11-07 18:09:58

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
Website

Re: [solved] Nth year counter from given start

Bloke wrote #315049:

there’s a mag article on it :)

Thank you for the deserved reminder about the article I probably reviewed!

When the server kinks are ironed out with the mag’s admin-side so things are working properly again (e.g. macros), I’ll have another look at it all. I’ve been in this pressed for time/losing sleep cycle lately and it’s not been doing me well. I apologize for my ignorance and forgetfulness of history. My wife says I am losing my mind. She might be right. And now I’m singing Billy Joel.

The posts garnered zero interest so I assumed it was not of use (or too Blokey-terse to understand!)

I guess I missed that one. ‘But what does it all mean, Basil?’


The text persuades, the *notes prove。

Offline

#43 2018-11-07 18:14:15

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
Website

Re: [solved] Nth year counter from given start

Bloke wrote #315048:

Use adi_matrix for sure.

Cool. Thanks.


The text persuades, the *notes prove。

Offline

#44 2018-11-07 18:22:38

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

Re: [solved] Nth year counter from given start

Destry wrote #315054:

‘But what does it all mean, Basil?’

  1. Txp’s publishing statuses are rigid and their meaning cannot be changed.
  2. There is an implied hierarchy: Draft < Hidden < Pending < Live < Sticky
  3. There are two ‘groups’ of status: Published (Live and Sticky), Unpublished (everything else).
  4. In numerous places in the code, the above paradigm is enforced.

This is limiting. I’m seeking to open this up so there is:

  • The ability to make your own status values.
  • No implied hierarchy.
  • The ability to make your own status groups and assign one or more statuses to them (Default: 2 groups, as it is today).
  • No enforced knowledge in the code of “status x is greater than status y”. Everything is done on the basis of a) which group it is in, and b) the order in which the statuses are configured in that group.

Game on for plugins to play and completely rip up the publishing paradigm.

Last edited by Bloke (2018-11-07 18:23:53)


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