Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2025-01-06 10:55:03

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

Re: [RFC] Custom Fields: expirable?

Bloke wrote #338680:

I don’t know how it handles upgrades right now.

I’m not sure we’ll know it before txp 5 takes a more definitive shape. Meanwhile it might be necessary to install it anew.

Offline

#38 2025-01-06 11:25:25

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

Re: [RFC] Custom Fields: expirable?

I’ve just boosted the varchar storage limit to 7500. That’s about the maximum comfortable range given we need two columns (one raw, one textiled) per row, and is a worst-case limit if you entirely use 4-byte characters. Lesser character sets will be able to squeeze up to about 30KB in a field.


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

#39 2025-01-06 14:07:30

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

Re: [RFC] Custom Fields: expirable?

My goodness, that was easy. The system works! Image custom fields have landed

Just need to retrofit the tags so they can read the values.

Enjoy :)


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

#40 2025-01-07 06:23:38

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

Re: [RFC] Custom Fields: expirable?

Bloke wrote #338689:

My goodness, that was easy. The system works! Image custom fields have landed

Just need to retrofit the tags so they can read the values.

Enjoy :)

!!!!!!


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

Offline

#41 Yesterday 07:48:30

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,260
Website

Re: [RFC] Custom Fields: expirable?

So far in some simple testing (creating & assigning CFs to Article and Image Content-type) this seems to work nicely.

Do I understand this correctly: A CF (any render type) with a created field filled cannot be used for content-type nodes created (or uploaded in case of an image) before the date set in the created field ?

Example: article created on 1/1/2025, the CF has the created field filled with 5/1/2025.

Still need to wrap my around the family field: that establishes some kind of grouping, I think and the default field (initial value, used if no value is specified when editing an article, or image ?).

Also, a thought: if the Help field is left blank (no help provided for that CF), does the pophelplink appear next to the CF? Currently it does, that sounds a little odd and confusing to me.

(I spent more or most time so far creating some content on that site)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#42 Yesterday 08:10:24

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

Re: [RFC] Custom Fields: expirable?

phiw13 wrote #338764:

So far in some simple testing (creating & assigning CFs to Article and Image Content-type) this seems to work nicely.

Excellent.

Do I understand this correctly: A CF (any render type) with a created field filled cannot be used for content-type nodes created (or uploaded in case of an image) before the date set in the created field ?

Correct. And likewise the field will not appear if its CF expiry is set to a date after the content was created.

Still need to wrap my around the family field: that establishes some kind of grouping, I think

You can use it for that, yes. But it’s not wired up to anything by default. Still deciding what (if anything) would make sense. At the moment the only way it can be used is via a plugin/theme.

the default field (initial value, used if no value is specified when editing an article, or image ?).

Correct. In the case of (multi-)select lists and check boxes etc, it uses the name not title to match. So if you defined a bunch of Options like this:

orange => Orange
sky-blue-pink => Sky-Blue Pink
mauve => Mauve
red => Red
greenish => Green(ish)

then setting ‘default’ to greenish, sky-blue-pink would preselect those two options on page load.

if the Help field is left blank (no help provided for that CF), does the pophelplink appear next to the CF? Currently it does, that sounds a little odd and confusing to me.

Good call. I did spot that but forgot to fix it. There’s a bug insofar as if you don’t specify a value, it renders the raw help string name, which makes the help field think it’s populated. I’ll see if I can fix that. Thanks for the nudge.


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

#43 Today 00:26:43

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,260
Website

Re: [RFC] Custom Fields: expirable?

Thanks for confirming and explaining my observations.

BTW, right now it is impossible to delete a CF from the multi-edit widget: select the CF, from the widget select “delete”. Result: all CF are deleted… reload the panel (or wander around to another panel and come back to the CF panel): all fields, incl. the deleted one are there.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#44 Today 00:31:41

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

Re: [RFC] Custom Fields: expirable?

Urk. I’ll fix the deletion code. It definitely used to work cos I was deleting fields a week or so ago.

Thanks for spotting it.


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

#45 Today 07:31:36

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,260
Website

Re: [RFC] Custom Fields: expirable?

Bloke wrote #338792:

Urk. I’ll fix the deletion code. It definitely used to work cos I was deleting fields a week or so ago.

When / while you are looking at that, check the other 2 items – change content / render type. those are doing nothing atm, as far as I can see.

Thanks.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#46 Today 07:36:57

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

Re: [RFC] Custom Fields: expirable?

phiw13 wrote #338798:

change content / render type. those are doing nothing atm, as far as I can see.

Will do. I don’t remember wiring those up so it’s probably on the to-do list.


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