Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: glz_custom_fields
Hi guys!
Sorry for the long absence, things have been hectic at best.
Your response has been fantastic guys, keep it up! My first free weekend will be used to put together v1.0, v1.1 following shortly thereafter.
Now to reply to your questions and comments:
marios wrote:
Custom field names on this install are mostly IA specific, and don’t give the User a clue, which custom_fields have to be populated, and with which data, if there is not a detailed custom made client manual.
Marios, this will be present in v1.1.
Can be done in greek as well. Let me know, in which format, way.
Cheers Marios! Will send you an e-mail when the help for v1.0 will be finished.
gerhard01 wrote:
I could help out with a German translation.
Great! You’re on the list ; )
Logoleptic wrote:
Gerhard, you might want to be more specific in your original post about exactly how people can go about paying you for this miraculous plugin. ;-)
I’ve updated the starting post, it should be easier now : ).
milosevic wrote:
Good work, nice plugin! If you need spanish translation, I can do it.
Great, you’re on the list!
Rigel wrote:
how I can obtain the value of checbox that comprises of custom_1_set. For example, if custom Set has 4 checkbox and is 2 checked, how I obtain the value of each one separately?
This is something that I wasn’t quiet sure how to implement for v1.0 BETA. After thinking about it, the only way is to have all standard TXP tags that deal with custom fields re-written. This will be present in v1.0 and will be used like this: <txp:glz_custom_field name="FieldName" />. You can use the standard functions right now (e.g. <txp:custom_field name="FieldName" /> although multiple values (like checkboxes) will display like this: value 1|value 2. TXP manual entry for custom_field
How it is used the tag conditional for custom fields for custom set of checkbox?
Same as per the manual entry Rigel: if_custom_field. Custom fields over 10 might not work, this will be sorted in v1.0.
redbot wrote:
1) to list the values for a given field in the same order in which they are entered by the user in the extensions tab (now they are sorted alphabetically)
This might be tricky because most people will want the values sorted in some way. Regardless what list you’re using, having it sorted alphabetically makes it really easy to find values in it. Short lists are OK, but imagine longer lists (like state names, publications etc.). Convetions seem to have the upper hand here.
2) when a field has only one checkbox, avoid putting the name of the only possible value next to the checkbox. Now it looks a little redundant because the name of the field is already describing the meaning of the checkbox.
What you’re saying makes sense, but, again, conventions. Let me give you an example. If you have a custom field named “Active” that has a single checkbox, use a value like “yes” rather than “active”. Maybe a radio would be better in this situation (yes/no) – value consistency.
3) If I press the submit button without making a choice, in some cases I expect to receive a warning like “please choose a search criteria”, not to have a list of hundreds of items ordered alphabetically
Makes a lot of sense. There will be an alert if no search criterion has been selected. Available from v1.0.
maniqui wrote:
Just chime in to suggest that would be great if any translation effort is also made MLP compatible.
Yes maniqui, I will look into that mate ; ).
the_ghost wrote:
Hm… I’m guessing – is it free? $)
mrdale wrote:
There are a bunch of 2.0 features I could use sooner than later. :)
I know you do mate and I’m really thinking about taking this plugin further, but right now it’s just impossible. There are quiet a few more things that need to happen before v2.0 (see the feature list), and although v2.0 will give me a great kick from coding it, I have more burning issues right now, sorry : (.
iblasoft wrote:
i’ve already donated but where is it available for free? i don’t see it anywhere (gerhards blog, textpattern.org, in this thread)
No mate, it’s definitely NOT free. Only the guys behind TXP (the mighty 10) received it for free, that’s it.
hey gerhard, not a huge deal but perhaps adding an error check for attempting to add duplicate values?
This will be sorted for v1.1 along with adding new custom field values from the Write tab.
kevinmcdougall wrote:
I’m wondering if there is a way to use this (or any other plugin) to sort by custom field, when that custom field contains a date?
Yes Kevin, <txp:article /> and <txp:article_custom /> accept a sort attribute which can be used on custom fields as well. Check the TXP manual
Offline
#32 2007-09-27 09:45:30
- kevinmcdougall
- Member
- Registered: 2007-02-08
- Posts: 55
Re: glz_custom_fields
Hi Gerhard,
Thanks for replying,
I’m familiar with the <txp:article /> and <txp:article_custom /> tags, and often use custom fields, but my question is focused on entering date values in the custom field. Are you saying that TXP will recognise date values in a custom field, and sort the articles accordingly?
Offline
Re: glz_custom_fields
Thanks gerhard.
I wasn’t bugging you to get cracking on the 2.0 features. More to encourage people to give so overwhelmingly generously that you would quit your day job to devote all your time to this plugin… then do the 2.0 features. LOL.
I know. We’re all busy, and I do appreciate this excellent plugin as-is. :)
Offline
Re: glz_custom_fields
@kevinmcdougall: it’s a plain SQL “ORDER BY”, it should work just fine for what you need. You can only give it a go and see if you’re getting consistent results.
@mrdale: I don’t think I would like to quit my day job – it got quiet interesting lately and is set to become even more so (I’m stroking kittens the whole day if you wonder).
This plugin will keep improving, just need to sort out some loose ends before I get back coding.
Having mentioned kittens, there are some pretty interesting ideas behind them, and if I could only be Hiro (or Peter : )), we would already be at version 3.0 : ).
Offline
#35 2007-09-29 14:59:10
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: glz_custom_fields
Hi Gerhard,
just another request (the last one, I promise): the <txp:glz_custom_fields_search_form /> tag allows only select input so far.
Will it be possible to use other type of search forms in the next version of the plugin?
You seem to suggest so in the plugin help… and I think this would be very useful indeed.
Cheers
Offline
#36 2007-09-29 23:28:35
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: glz_custom_fields
If the tooltips/help feature of 1.1 is available soon, I may have use for this in an upcoming project (assuming I land the project, of course). This is a great plugin!
A question about 2.0: You’re talking about separating the features of this plugin from the existing custom fields feature, much as rss_unlimited_categories is separated from the built-in category features. What impact will this have on all of the built-in tags that use custom fields? I’m thinking in particular of sorting by custom fields, since creating your own conditional tag to replace <txp:if_custom_field> wouldn’t be that tough. Would we need to use asy_wondertag for sorting? What about the ability of <txp:article_custom /> to narrow its output by custom field value?
Also, have you considered contributing any of this to Crockery? I don’t expect that branch to hit public release until the night before forever, so you’d still have plenty of time to rake in plugin donations. ;-)
Offline
#37 2007-10-11 12:22:37
- ringhio
- New Member
- Registered: 2007-09-10
- Posts: 6
Re: glz_custom_fields
We have a strange problem using the plugin: it works on a default page but not on another page.
Homepage (works)
Section: default
Template: default
<txp:glz_custom_fields_search_form results_page=“default” searchby=“Data” />
<txp:glz_custom_fields_article limit=“5” no_results=“no_results” />
OtherPage (doesn’t work)
Section: uscite
Template: contenitore
<txp:glz_custom_fields_search_form results_page=“uscite” searchby=“Data” />
<txp:glz_custom_fields_article limit=“5” no_results=“no_results” />
For short I’ve copied default template on contenitore template and changed results_page to the right value (section name, from documentation) but if I browse section uscite I’m redirected on no_results page while there are articles with custom_fileld (Data) filled right.
What’s wrong?
Offline
#38 2007-10-25 00:37:30
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: glz_custom_fields
Hi Gerhard,
Just a suggestion for your next release: the plugin won’t work correctly with a php version prior to 5 (no page will be displayed if containing the glz_custom_fields_search_form or glz_custom_fields_article tags)
In particular the problem seems to be caused by the php 5 function “array_combine”.
I’ve fixed it adding:
function array_combine($keys, $values)
{
$result = array();
foreach(array_map(null, $keys, $values) as $pair)
$result[$pair[0]]=$pair[1];
return $result;
}
in the plugin code (the snippet is borrowed from the php online manual).
Hope it helps.
Cheers
Last edited by redbot (2007-10-25 00:41:57)
Offline
#39 2007-10-25 08:32:39
- jelle
- Member
- Registered: 2006-06-07
- Posts: 165
Re: glz_custom_fields
Wow, amazing plugin. I offer my services for a dutch translation.
Offline
#40 2007-10-26 00:11:34
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: glz_custom_fields
ringhio wrote:
We have a strange problem using the plugin: it works on a default page but not on another page.
I can confirm it.
Offline
#41 2007-10-26 01:48:40
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: glz_custom_fields
Hmm. The ‘only on default page’ issue could be a huge problem for a project that I was going to use this on. Is anyone other than ringhio and redbot experiencing this? Does this problem only occur with some of the plugin’s tags, or all of them?
Thanks in advance for the info.
Offline
#42 2007-10-26 09:17:01
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: glz_custom_fields
Logoleptic wrote:
Hmm. The ‘only on default page’ issue could be a huge problem for a project that I was going to use this on. Is anyone other than ringhio and redbot experiencing this? Does this problem only occur with some of the plugin’s tags, or all of them?
Hi Logoleptic ,
I didn’t have the time to investigate further so I don’t know if the problem can be easily fixed with a slight modification of the plugin code (I tend to think so).
As for your question, the plugin uses only two tags which must be used together (one for the search form and the other for the results) but if if you don’t need to use them the plugin will work quite well.
That’s all for now, I’m in your exact same situation with a project I’m working on at night so should I come to a temporary solution later I’ll let you know immediatly.
Offline
#43 2007-10-26 16:40:52
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: glz_custom_fields
redbot wrote
As for your question, the plugin uses only two tags which must be used together (one for the search form and the other for the results) but if if you don’t need to use them the plugin will work quite well.
Thanks for the follow-up redbot. If I’m understanding this earlier post properly, the plugin can still work together with the built-in <txp:if_custom_field> tag for the first ten custom fields. Is this correct? If so, I might not have a problem after all.
Offline
#44 2007-10-26 23:34:51
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: glz_custom_fields
Logoleptic wrote:
If I’m understanding this earlier post properly, the plugin can still work together with the built-in<txp:if_custom_field>tag for the first ten custom fields. Is this correct? If so, I might not have a problem after all.
Yes you are right, if you don’t need a search functionality you don’t need to use these tags, and in this case the plugin is working great.
Offline
Re: glz_custom_fields
Having a small problem using the plugin. What I am trying to do is have my custom field called “Country” (a list of countries) display in a form used by mem_moderation:
The form:
<div class="submit_label">Title</div>
<txp:mod_title_input />
<div class="submit_label">Category</div>
<txp:mod_category1_select />
<div class="submit_label">Another Category</div>
<txp:mod_category2_select />
<div class="submit_label">Country</div>
<txp:custom_field name="Country" />
<div class="submit_label">A brief introduction for your classified</div>
<txp:mod_excerpt_input />
<div class="submit_label">Body</div>
<txp:mod_body_input />
<div class="submit_label">Notes for the Moderator (optional)</div>
<txp:mod_note_input />
<!-- this will put the submitting username in to custom field 1 -->
<input type="hidden" name="custom_1" value='<txp:mem_profile var="name" />' />
<div><txp:mod_submit /></div>
In the page, I see this error notice from TXP:
Tag error: <txp:custom_field name=“Country” /> -> Textpattern Notice: Article tags cannot be used outside an article context on line 1887
And the country field is not displayed. Its a select drop down box.
Perhaps I am missing something simple here?
Last edited by jstubbs (2007-10-27 13:01:32)
Offline