Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Today 09:21:10

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

Stupid question

I need an 11th custom field and I was wondering if I used

ALTER TABLE `textpattern` 
ADD COLUMN `custom_11` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;

to add it would

  1. break textpattern?
  2. mess up the txp updates later?
  3. appear in the write tab?

I would of course back up the db before I run the sql.


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

Offline

#2 Today 09:30:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,625
Website GitHub

Re: Stupid question

That’s the sort of thing that glz_custom_fields does. But you also need to add a custom_11_set row to your prefs table to store the value in. Copy the pattern of the other similar rows to see how it needs to be defined Not sure if it’ll work, as I’ve never tried it.

glz_custim_fields really is worth installing for this situation. Not only does it take the headache away, it also gives you way more control over field order, help text, support for date/time pickers and other field types.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB