Textpattern Forum

You are not logged in. Register | Login | Help

#11 2007-01-24 01:10:02

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

I think I might have use for this, but I’m not sure. I’m currently using two custom fields to hold “tasks” for projects in my portfolio (e.g. “Search engine optimization and submission”). These tasks end up in an unordered list that goes into a definition list for each project on the main portfolio page and at the bottom of every individual portfolio article.

Right now I’m just dumping raw HTML into these custom fields, since there’s not any structured way to do it. I’ll probably have to continue using two fields, but I’m wondering if this plugin might give me a way to let visitors filter my portfolio by specific tasks. Is this possible, or am I really looking for more of a tagging plugin?


“Never attribute to malice that which can be adequately explained by stupidity.”

Hanlon’s Razor

Offline

#12 2007-06-01 19:57:03

nabrown78
Moderator
From: Boston, MA, USA
Registered: 2006-10-04
Posts: 289
Website

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

This plugin looks like it might solve my too-few-custom-fields problem. For anyone that has used it, have you noticed any glitches or performance issues?
Thanks.

Offline

#13 2007-08-05 16:25:43

sparkybarkalot
Member
Registered: 2004-10-13
Posts: 43

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

I’m running TXP 4.0.5 and sed_pcf_if_value is failing on me. I’m getting errors saying that ‘custom’, ‘section’, and ‘variable’ aren’t attributes of sed_pcf_if_value. I’ve triple checked my tag code, even copying and pasting the code directly from this thread in case I was misyping something, but still getting those errors.

Anyone else having this problem and / or have any suggestions?

Thanks for a really, really nice plugin.

Offline

#14 2008-01-02 08:05:35

net-carver
Admin
From: UK
Registered: 2006-03-08
Posts: 1,646

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

All

version 0.3 is available.

It adds the sed_pcf_for_each_value tag which acts as an iterator over a CSV field. It’s based on wet_for_each_image so if you know how powerful that is you’ll see the advantage of the new tag.

Available from the download page in normal and compressed formats.


Steve
Textile | My plugins on GitHub | @netcarver

Offline

#15 2008-01-30 22:59:07

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

Hello

Would I be right to say that you can only retrieve values associated with pre-defined names using this plugin?

I’ve already posted what I’m trying to achieve here, but the crux of it is that my ‘names’ can’t be set beforehand, and I’d like to output both these variable ‘names’ and associated values in a definition list.

thanks
Stu

Offline

#16 2008-01-31 05:46:08

net-carver
Admin
From: UK
Registered: 2006-03-08
Posts: 1,646

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

Stuart

Sorry, it doesn’t currently do what you want — it only gets/tests data via a known name.

I’ll think about putting an iterator in for name-value pairs that will operate in a similar way to the new sed_pcf_for_each_value tag.


Steve
Textile | My plugins on GitHub | @netcarver

Offline

#17 2008-01-31 07:04:14

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

OK, thanks anyway. If you find the time to add that later I’d find it really useful.

Offline

#18 2008-02-11 20:17:18

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

Hello Steve

I abandoned the previous search, but I have a new problem! I’m trying to use sed_pcf_for_each_value, but so far I’ve not been able to output anything.

I have an article which contains 4 valid article IDs in a custom field called related-article-IDs. In my article form I have

<txp:sed_pcf_for_each_value name="related-article-IDs"><txp:article_custom id="{value}" form="article_nav" /></txp:sed_pcf_for_each_value>

and in the article_nav form
<li><a rel="bookmark" title="read full article" href="<txp:permlink />"><txp:title /></a></li>

One thing I’m not sure of in the help, is that for sed_pcf_for_each_value you specify an attribute called ‘name’ to hold the custom field to access, whereas in the other tags you’ve used ‘custom’ as the attribute. Is that deliberate? I’ve tried both just incase, but no luck yet.

Hopefully I’m doing something obviously wrong. Any help appreciated.

cheers
Stu

ps. there’s a typo there too:
3. As an enclosing tag… <txp:sed_pcf_for_each_value>... your stuff here...<txp:sed_pcf_for_each_value />
the trailing slash should be at the start of the closing tag I think…

Offline

#19 2008-02-11 20:21:17

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

I should point out a couple of things

  1. the custom field holds a simple, comma separated string 16,18,20,21
  2. the txp:sed_pcf_for_each_value code isn’t written an article form, but pulled from another form which is called with the txp:output_form tag, so I don’t think it’s an issue with articles within articles. I’ll investigate this further though just incase

Offline

#20 2008-03-01 20:00:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: [plugin] [ORPHAN] sed_pcf: Packed Custom Fields.

Steve

Only just got round to trying this excellent plugin out. I was getting close to running out of custom fields and this has saved the day, woohoo!

Couple of things I spotted with v0.3.108:

  1. It doesn’t mention that you need sed_plugin_library in the docs as far as I can see
  2. When I did install the library, the plugin still failed with an invalid call to sed_lib_extract_packed_variable_section(). Looks like you’re intending to rename the functions in a later version of the library(?) I grabbed v0.2 from your site so, unless I missed something, I manually renamed the function calls for now
  3. Might be worth mentioning that the custom field names should be all lower case (i.e. if the field was defined as My Field you require custom="my field" in the plugin. It may even be "my-field", I don’t know). I’m not entirely sure but I think this automatic lower-casing behaviour occurred in 4.0.5 or 4.0.6 cos it caught me out in my plugins

Anyway, kudos to you yet again. Another blinding plugin. Many thanks.

Last edited by Bloke (2008-03-01 20:01:41)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB