Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1186 2017-09-29 12:06:21

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

Re: glz_custom_fields

I found out notextile. inside a custom textarea does not get interpreted and acts like a plain text. Actually textile might not be the issue I’m having. The text from the custom field just gets wierdly encoded/padded when I get it from php.

Not sure if I can post links to other questions here but here my main question greatly involving glz_custom_fields. Any help would be greatly appreciated. https://forum.textpattern.com/viewtopic.php?pid=307250#p307250

phiw13 wrote #307254:

Start your blocks with notextile. ? Hmm not necessarily user friendly…

Maybe there is a plugin that can prevent Textile to work, such as “smd_wrap”?

p.

Offline

#1187 2018-02-25 21:01:14

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 721
Website Mastodon

Re: glz_custom_fields

When i use custom fields in glz_cf 1.5.0, which are set to accept multiple entries, then those show up in an article as

entry1|entry2|whateverelseentry|thelastentrymaybe|butmaybenot

how can i use a different separator than | – say i want to use commas to display between single entries?

unfortunately <txp:custom_field /> doesn’t have a break="" attribute…
and note, that sthg. like <txp:if_custom_field name="genre 1" separator=", "> doesn’t help either.

I suspect i have to edit glz_cf ?

Thanx much in advance!

Last edited by jayrope (2018-02-26 02:41:33)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#1188 2018-02-26 08:39:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,182
Website GitHub

Re: glz_custom_fields

Yes, that’s how glz-cf stores multiple values. I think the reasoning was so that you could have values in your multiple values that contain commas. What you can do is to use rah_replace to turn it into a comma-delimited list or rah_repeat to process the list using the separator it has.

@all: BTW: A new version that’s compatible with v4.7 can now be found in this thread.


TXP Builders – finely-crafted code, design and txp

Offline

#1189 2018-02-26 08:49:58

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: glz_custom_fields

jakob wrote #309435:

@all: BTW: A new version that’s compatible with v4.7 is in the works but not quite done yet.

yay!

(if you want to toss a beta my way, I’ll be happy to destroy test it)


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

Offline

#1190 2018-02-26 10:55:12

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 721
Website Mastodon

Re: glz_custom_fields

Thanx for the hint, Jakob. No idea why i never got to use this nifty little plug before.


A hole turned upside down is a dome, when there’s also gravity.

Offline

#1191 2018-02-26 16:42:05

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 721
Website Mastodon

Re: glz_custom_fields

By the way Jakob, i suppose you need to add
if (class_exists('\Textpattern\Tag\Registry')) { Txp::get('\Textpattern\Tag\Registry') ->register('rah_replace') ; }
to the plugin code to make that nasty tag error go away in debug mode. :)

Last edited by jayrope (2018-02-26 16:43:24)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#1192 2018-02-27 17:16:55

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 721
Website Mastodon

Re: glz_custom_fields

I am wondering, how to extract the single entries from custom fields accepting multiple entries, to process them further, use them as search tags etc.

Could someone get me on the right path, maybe with an example script?

etc_search?

Thank you very much!


A hole turned upside down is a dome, when there’s also gravity.

Offline

#1193 2018-02-27 20:35:12

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

Re: glz_custom_fields

A pull request is awaiting 4.8 to implement a finer multi-valued custom fields control. Atm, I would use etc_query for individual items extraction:

<txp:etc_query data="a|b|c" markup="list:|" query="1" />

will output the second item of data list (namely b=data[1]), the index starting with zero.

And yes, you should be able to use etc_search to, say, retrieve the articles sharing some values with a given list. Please provide an example of what you want if you need help.

Offline

#1194 2018-02-27 21:20:33

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 721
Website Mastodon

Re: glz_custom_fields

Thank you, etc, much appreciated.
I want to read multiple values from one custom field (which are delimited with a | ) in my case custom_25, split those values into a list of individually searchable values to find out, which other articles have that particular term in their custom_25 entries and compile those related articles into a list to look at.

Practical example
One article has
entry1|entry2|entry3 in custom_25
Now i want to find out, which other articles have entry3 also in their custom_25.

Thanx much for any hints. I haven’t etc_query installed (on txp 4.6.2) but smd_query 0.50, but no real mysql query experience….


A hole turned upside down is a dome, when there’s also gravity.

Offline

#1195 2018-04-26 13:14:57

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: glz_custom_fields

jakob wrote #309435:

@all: BTW: A new version that’s compatible with v4.7 is in the works but not quite done yet.

Hello Jakob,

Is it possible to get this new version :-)) ?

Offline

#1196 2018-04-26 13:20:14

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: glz_custom_fields

jpdupont wrote #311426:

Hello Jakob,

Is it possible to get this new version :-)) ?

Here


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

Offline

#1197 2018-04-26 15:32:11

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: glz_custom_fields

Thanks !

Offline

#1198 2018-04-26 16:43:04

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,182
Website GitHub

Re: glz_custom_fields

Ah, thanks for pointing that out. I’ve updated my post to include the link.


TXP Builders – finely-crafted code, design and txp

Offline

#1199 2018-04-29 19:49:52

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: glz_custom_fields

Jakob,
Thank you for maintaining these two essential plugins: glz_custom_fields and bot_write_tab_customize !

Offline

#1200 2018-04-30 11:02:32

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 239
Website GitHub Mastodon

Re: glz_custom_fields

+ 1 :)

Offline

Board footer

Powered by FluxBB