Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#721 2010-08-24 12:49:30
Re: glz_custom_fields
aswihart wrote:
Is there a way to make a hierarchical display of values in a glz_custom_fields select / multi-select box? That would be a great feature if it’s not already possible.
It’s not possible out of the box, but you can always roll your own custom field type. Check the custom-script example file that comes with the latest v1.2.4. After unpacking the plugin, look for the my-images.php
file.
Offline
#722 2010-08-24 12:50:46
Re: glz_custom_fields
THE BLUE DRAGON wrote:
I got a site with 76 custom fields (yes)
and this is the error I’m getting trying to create more:
Sorry mate, that’s a MySQL limitation, nothing I can do about it without having to rewrite the plugin…
Offline
#723 2010-08-24 13:52:16
Re: glz_custom_fields
gerhard wrote:
Sorry mate, that’s a MySQL limitation, nothing I can do about it without having to rewrite the plugin…
Is there anything that I can do?
is this error only because I got too many “text” type inputs?
if for example I will create textareas instead of text-inputs and change them to look as text-input will it work?
or it’s doesn’t matter what type of field it is?
Does creating more custom fields with the same set-position will work?
(for example: creating 10 custom fields on the same position “custom_1_set”)
Last edited by THE BLUE DRAGON (2010-08-24 13:52:57)
Offline
#724 2010-08-27 19:25:32
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: glz_custom_fields
Hi Gerhard & all; I’m running into a problem which I’m not sure how to fix.
I created a textarea
type custom field to add embedding code for Issuu documents, but it all shows up as text on the site, and not interpreting the code. I’m probably missing something but I’m afraid I’m gonna need some help(!) Thanks in advance,
Ben P.
Offline
#725 2010-08-27 19:29:29
Re: glz_custom_fields
ploinkr — you should be able to get it to work by putting — oops, I meant to say escape=”“ (instead of html=”“) in your txp:custom_field tag
like this:
<txp:custom_field name=“nameofyourtextareacustomfield” escape=”“ />
Last edited by photonomad (2010-08-27 19:33:50)
Offline
#726 2010-08-29 14:03:47
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: glz_custom_fields
photonomad, thanks a lot – that worked! I knew it had to do with “escaping” but really had no idea how/where to put that. Cheers! :-)
Offline
#727 2010-09-04 07:35:40
Re: glz_custom_fields
THE BLUE DRAGON wrote:
is this error only because I got too many “text” type inputs? or it’s doesn’t matter what type of field it is?
Nope, it doesn’t matter what type of fields they are. As soon as you create a new custom field, 2 things happen:
- A new entry gets added into
txp_prefs
with the custom set name and type - A new column gets added to the
textpattern
table for that custom set, e.g.custom_1
Your problem is that you’ve hit the MySQL limitation for how many columns there can be in a table, 85.
Does creating more custom fields with the same set-position will work? (for example: creating 10 custom fields on the same position “custom_1_set”)
I’m not sure that I understand what you mean. A custom field is a custom set. For example, custom_1_set in the txp_prefs
table refers to custom_1 in the textpattern
table. It’s just a naming inconsistency IMO, but they are effectively the same thing.
Your only option would be to use less custom fields. What custom fields have you defined? I might offer suggestions on merging some of them.
photonomad wrote:
Hi Gerhard & all; I’m running into a problem which I’m not sure how to fix.
Stacey, thanks for helping ploinkr out, that was a quick and accurate reply ; ).
Offline
#728 2010-09-16 08:41:09
- feragnoli
- Member
- From: the hague
- Registered: 2005-02-10
- Posts: 150
Re: glz_custom_fields
hello, I keep on having this problem when using custom scripts.
the server seems to issue this notification just before the custom fields in the write tab:
220 FTP on myserver.com ready 421 Login Timeout (60 seconds): closing control connection
help!
what was that again…?
Offline
#729 2010-09-16 09:26:06
Offline
#730 2010-09-16 09:35:51
- feragnoli
- Member
- From: the hague
- Registered: 2005-02-10
- Posts: 150
Re: glz_custom_fields
hello Gerhard,
I seem to have fixed the problem… not sure how it first came about though…
thank you for your reply!
what was that again…?
Offline
#731 2010-09-17 03:19:47
- radneck
- Plugin Author
- Registered: 2005-07-03
- Posts: 109
Re: glz_custom_fields
Just a quick FYI guys:
If you want to user glz_custom_fields with, for example, <txp:article_custom />
’s attribute customfieldname you cannot use spaces in the custom field name. This is quite annoying when developing a site for a client, as you want the custom field to show up in the Write tab as My Custom Field and not My_Custom_Field. I think this feature is planned for a future release, but until then here’s a quick and dirty hack:
Edit the glz_custom_fields plugin and look for the following line:
"<label for=\"$custom_id\">{$custom_set['name']}</label><br />$custom_set_value", " class=\"$custom_class\""
and replace it with:
"<label for=\"$custom_id\">".str_replace('_', ' ', $custom_set['name'])."</label><br />$custom_set_value", " class=\"$custom_class\""
This will basically replace underscores in the field name with spaces when in the Write tab, but will still allow you to reference the proper name (with underscores intact) when playing around in templates and forms.
Hope this helps someone.
Offline
#732 2010-09-17 03:33:59
Re: glz_custom_fields
There is also a very useful plugin that can be used alongside glz_cf for the same effect, and no hacks. I love it!
Offline