Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1111 2014-10-29 09:40:54
- ingleslenobel
- Member
- Registered: 2014-10-16
- Posts: 88
Re: glz_custom_fields
I’m relatively new to textpattern but I’m on the hunt for something that increases my custom fields beyond the 10 that looks like the default. This thread starts in 2007 – but the plugin looks perfect. can I ask, does this work for the latest version of textpattern or is there something else similar available (doesn’t matter paid or not)
Thank you!!
Offline
#1112 2014-11-02 20:00:47
- ingleslenobel
- Member
- Registered: 2014-10-16
- Posts: 88
Re: glz_custom_fields
Hello,
My textpattern install is in a directory above main; it is a blog mechanism rather than main site CMS. This plugin is tremendously useful.
I would like to check that I’ve installed it properly, because looking through my logs I’m getting some 404s:
GET /extremist/plugins/glz_custom_fields/glz_custom_fields.js HTTP/1.0
GET /extremist/plugins/glz_custom_fields/glz_custom_fields.css HTTP/1.0
I don’t have a /plugin/ directory – is this because it’s 4.5?
Offline
#1113 2014-11-02 21:28:30
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: glz_custom_fields
Without a plugins directory the plugin isn’t properly installed. With TXP in a subfolder, naming can be tricky (you might have a textpattern folder inside a textpattern folder), hence I simply paste here what’s in the plugin’s read-me:
.
|-- HISTORY.txt
|-- README.txt
|-- index.php
|-- ...........
|-- plugins <<< THIS IS THE FOLDER THAT YOU NEED TO CREATE
| `-- glz_custom_fields <<< THIS IS THE FOLDER THAT YOU NEED TO ADD
|-- ...........
`-- textpattern
|-- checksums.txt
|-- config-dist.php
|..................
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1114 2014-11-02 21:39:42
- ingleslenobel
- Member
- Registered: 2014-10-16
- Posts: 88
Re: glz_custom_fields
Thank you. My readme doesn’t mention any of this. I have the below. So I may have the wrong one. Navigating and finding current plugins is very hazardous.
“### Unlimited custom fields for Textpattern
This plugin sits under the Extensions tab in the back-end and gives
your custom fields new life. You can finally have custom fields that are
selects, multi-selects, checkboxes, radios and textareas – besides the
default input fields. You can predefine values for custom fields and you
can select a single default value (selects, multi-selects, checkboxes
and radios only). Rather then constantly typing in the same thing over
and over again, just select or check it and you’re set.
The plugin doesn’t require any hacking of TXP, it’s a straight install
with instant gratification.
### License
Copyright © 2012 Gerhard Lazu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/gpl-2.0.html>.”
uli wrote #285408:
Without a plugins directory the plugin isn’t properly installed. With TXP in a subfolder, naming can be tricky (you might have a textpattern folder inside a textpattern folder), hence I simply paste here what’s in the plugin’s read-me:
....p.
Offline
#1115 2014-12-19 14:00:15
- richtestani
- Plugin Author
- Registered: 2009-11-08
- Posts: 128
Re: glz_custom_fields
I modified this plugin to handle labels and values for checkboxes.
Was a simple feature that it really needed.
At line 874. within the foreach loop, under the comment, I placed the following:
$label_value = explode('=', $value);
$label = $label_value[0];
$value = (array_key_exists(1, $label_value)) ? $label_value[1] : $label;
This will update the $value if it needs to, otherwise the default $value will still be used.
In your Custom Fields Editor, use this format:
label=value
blue=001
x-large=xl
large/x-large=l-xl
top choice=5
worst choice=1
This could probably set for radio buttons too.
Rich
Offline
#1116 2015-01-12 14:31:48
Re: glz_custom_fields
Hi gerhard, all,
I just started using this plugin for yet another non-profit project.
I’ll start with a very basic question.
Do you call the fields in the same way as you do the normal custom fields os is my code below correct?
<txp:article_custom section="artworks" category='<txp:category1 />' limit="100">
<txp:article_id />
<txp:glz_custom_fields name="year" default="-"/>
<txp:title />
<txp:glz_custom_fields name="type" default="-"/>
<txp:glz_custom_fields name="dimensions" default="-"/>
</txp:article_custom>
> Edited to add that I have tried using both the vanilla tag and the glz prefix but no output seems to be parsed. I have created a folder called plugins in the root of the site and dropped the glz_custom_fields folder inside it.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#1117 2015-01-12 14:36:00
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: glz_custom_fields
colak wrote #287292:
Do you call the fields in the same way as you do the normal custom fields
Yes. So your code for a cf would be <txp:custom_field name="type" default="-"/>
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1118 2015-01-12 15:00:09
Re: glz_custom_fields
thanks uli… I think that I just made them work:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#1119 2015-10-02 17:35:28
Re: glz_custom_fields
I have a problem with accented letters: for example, vidéo becomes vido (the é is dropped). I already tried to replace all occurrences of htmlspecialchars with txpspecialchars but the problem is still here and I can’t find the reason. Where should I look?
Last edited by CeBe (2015-10-02 17:35:44)
Offline
#1120 2015-10-02 18:58:10
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: glz_custom_fields
Hi Claire, if possible with the website you’re working on, try disabling glz_cf temporarily, then go to the advanced preferences, the cfs are now displayed there, again, enter the correct term, save and reactivate glz. I tried the Franco-Allemand mixture “Vidéogröße”. It’s accepted and displayed on the admin side. Haven’t tried, though, whether it works and whether each possibility to use it is viable, I’ve been a good guy ;) and only worked with ASCII until now.
If problems arise, there’s also wet_babble bot_cf_titles to individualize custom field names (thanks, GugUser).
Edit: Just tried to edit the Vidéogröße field I entered without glz_cf, but now with glz_cf re-activated and – of course – glz_cf swallows all flourishes. So either edit field names as a last step or use the wet plugin from the start.
Last edited by uli (2015-10-03 14:26:28)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1121 2015-10-02 19:26:36
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: glz_custom_fields
I’ve found this here, might be more likely the thing you’re after, Claire:
// will leave only [A-Za-z0-9 ] in the string
function glz_clean_string($string) {
if ($string)
return preg_replace('/[^A-Za-z0-9\s\_\-]/', '', $string);
}
Edit: Yup, I just added ßöéà to the regex and I could save “Vidéogröße” and “Voilà” :)
Last edited by uli (2015-10-02 19:34:04)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1122 2015-10-02 20:24:51
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: glz_custom_fields
CeBe wrote #295341:
Where should I look?
I know, this is not an answer to your question, but I can confirm that I frequently use the glz custom fields for Spanish text parts like, for example, “González Suárez y Av. Oswaldo Guayasamín”, and never had any problems with it.
Letters like these are shown correctly: ñøÁèô.
Your problem is not a general problem. I know, this doesn’t help.
Maybe this:
Do you use Typekit with a disabled french language subsetting, or fonts without the required characters?
Offline
#1123 2015-10-02 20:27:58
Re: glz_custom_fields
uli wrote #295342:
try disabling glz_cf temporarily, then go to the advanced preferences, the cfs are now displayed there, again, enter the correct term, save and reactivate glz.
Woah!!! It works!
Note: this has to be done every time such a custom field is edited.
uli wrote #295345:
I’ve found this here, might be more likely the thing you’re after, Claire:
// will leave only [A-Za-z0-9 ] in the string...
Yup. Would be cleaner with a regexp to keep accents too.
A really big big thank you!
Offline
#1124 2015-10-02 20:28:16
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: glz_custom_fields
Other idea: I beginn my .htaccess file with AddDefaultCharset utf-8.
Offline
#1125 2015-10-02 20:38:03
Re: glz_custom_fields
GugUser wrote #295348:
I frequently use the glz custom fields for Spanish text parts
Ok, I asked my question too rapidly, I’m sorry .
The accents were not kept for the names of the custom fields in admin side. The content is correct.
Offline