Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2025-09-21 20:37:18

etc
Developer
Registered: 2010-11-11
Posts: 5,471
Website GitHub

Re: [RFC] Custom Fields: expirable?

gaekwad wrote #338838:

etc, it’s your turn to break the repo – godspeed!

Done! Pity, because locally it is taking shape. The main change on the surface is the ability to attach a custom field to multiple entities (articles, images, etc), but the structure behind it should be (almost) ready to allow for defining new content types. Testers welcome.

Offline

#74 2025-09-21 21:36:38

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

Re: [RFC] Custom Fields: expirable?

etc wrote #340586:

Testers welcome.

=*puts my test hat on*=

That is legendarily good stuff. I’m in awe. That takes the idea of custom fields I started and remaps it in the most insanely flexible way. Thank you.

When I get a moment this week I’m going to give this a thorough grilling.


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

#75 Yesterday 09:21:19

etc
Developer
Registered: 2010-11-11
Posts: 5,471
Website GitHub

Re: [RFC] Custom Fields: expirable?

Hope I have not broken (too much of) your nice construction. The most cumbersome part is to adapt the language strings management. Since cfs are content type agnostic now, I had to make their name unique, to avoid homonym cfs sharing their labels/help.

Currently, only articles and images have an admin interface to edit their cfs, but that should suffice for testing.

Offline

#76 Yesterday 10:12:40

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

Re: [RFC] Custom Fields: expirable?

etc wrote #340597:

The most cumbersome part is to adapt the language strings management.

That was horribly kludgy in my original implementation anyway. Keeping CF name changes in sync with lang keys and _instructions and so forth was not pretty.

It’d be nice to make things more atomic (start transaction)? That’d be a start. But if there’s a better way of managing them in a multilingual way, that’d be awesome.


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

#77 Yesterday 10:51:46

etc
Developer
Registered: 2010-11-11
Posts: 5,471
Website GitHub

Re: [RFC] Custom Fields: expirable?

Dunno, I have not really touched this part. Having some local immutable keys would be great. Calling them txpcf_1 would make custom fields export/import tricky, but some internal mapping table txpcf_name <-> meta_id might help.

Foreign keys would be helpful too, but MyISAM supports them poorly.

Offline

Board footer

Powered by FluxBB