Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1171 2017-07-23 18:47:30
Re: glz_custom_fields
phiw13 wrote #306393:
sidenote: does uninstalling a plugin such as
smd_where_usedclear out the prefs for that plugin from the DB?
Probably not. I should look into doing that.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#1172 2017-07-23 22:35:36
Re: glz_custom_fields
Bloke wrote #306403:
Probably not. I should look into doing that.
Yeah, that would be neat :-) (I uninstalled then reinstalled to see if it fixed my problem, when that failed I dived directly in the DB).
TA.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#1173 2017-07-26 11:24:10
Re: glz_custom_fields
Bloke wrote #303945:
Try version 1.5.0-beta.1. Should fix any MySQL/4.6.2 issues. Please let me know otherwise.
Trying that version on a new install of 4.6.2, any precautions i should take? Thank you in advance!
A hole turned upside down is a dome, when there’s also gravity.
Offline
#1174 2017-07-26 11:50:50
Re: glz_custom_fields
jayrope wrote #306460:
Trying that version on a new install of 4.6.2, any precautions i should take? Thank you in advance!
Unless you roll in the changes made since that beta was released (at the very least this one), then you may have problems with key lengths. The prefs_id and ‘disabled’ fields issues probably won’t affect you, as they’re 4.7.0-dev things.
If it’s a new install, should be fine. If it’s an upgrade… backup, backup, backup.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#1175 2017-07-30 15:42:05
- david@druna.cz
- Member
- Registered: 2017-07-25
- Posts: 41
Re: glz_custom_fields
I recently installed the plugin and now I want to use the new custom field in php script. Currently I intend to do it via hidden fields of the form in the article. The form calls the script.
For standard custom fields we just name the custom field like so: <input type=“hidden” name=“zaloha” value=<txp:custom_field name=“Záloha” />>
But when I enter the name of the glz custom field it seems tha value is empty. How am I supposed to acces the glz custom field from code? (Btw. the field is a textarea multiline string.)
Last edited by david@druna.cz (2017-07-30 15:44:56)
Offline
#1176 2017-07-30 23:48:48
Re: glz_custom_fields
david@druna.cz wrote #306492:
For standard custom fields we just name the custom field like so: <input type=“hidden” name=“zaloha” value=<txp:custom_field name=“Záloha” />>
But when I enter the name of the glz custom field it seems tha value is empty. How am I supposed to acces the glz custom field from code? (Btw. the field is a textarea multiline string.)
I am not sure your custom field name can contain characters like á. Perhaps that is the issue?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#1177 2017-07-31 03:04:32
Re: glz_custom_fields
phiw13 wrote #306493:
I am not sure your custom field name can contain characters like
á. Perhaps that is the issue?
why cant custom fields have utf8 characters? big oversight if they are not allowed
…. texted postive
Offline
#1178 2017-07-31 03:47:17
Re: glz_custom_fields
bici wrote #306494:
why cant custom fields have utf8 characters? big oversight if they are not allowed
I don’t know… another weirdness with this plugin? When I tested, creating a custom field with the plugin, name: tést, the name was truncated to tst after saving. It does work for standard (the 10 provided but Textpattern) custom fields.
EDIT
Or maybe that part is something wrong on my install? I see the custom_fields table has latin1 set for name and value. Puzzled, as this TXP4.6 was definitely created with the charset set to UT8-mb4.
—
Anyway, I also wanted to note, I created a textarea custom field (test_textarea), and could verify that with the code provided by David, it does work.
<input type="hidden" name="foo" value="<txp:custom_field name='test_textarea' />">
Last edited by phiw13 (2017-07-31 09:15:15)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#1179 2017-07-31 16:39:32
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: glz_custom_fields
david@druna.cz wrote #306492:
I want to use the new custom field in php script.
Is that script stored in a Textpattern form? If not: try it from there. I’ve no experience with such sripts in TXP, maybe you’d need to wrap it in a pair of <txp:php> tags. EDIT: There are admin settings that allow/disallow the use of PHP in several places. Check whether they‘re set accordingly.
In case the accented letter is part of the problem and you want the client to see proper spelling: There’s a plugin, bot_cf_titles, that lets you replace custom field names on the surface while the actual field name can remain without accent for the proper functionality of TXP and plugins involved.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1180 2017-08-01 05:41:46
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: glz_custom_fields
I can not figure it out what’s the problem with glz_custom_fields, radio or checkbox after an upgrade from Textpattern 4.5.7 to 4.6.2 (it’s not the first time I did that ;-) ):
“Ooops! custom_2 has some problems. Go fix it.”
But I can’t fix anything.
If I change to input type all is fine.
Any idea? Thanks.
Offline
#1181 2017-08-01 13:29:19
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: glz_custom_fields
Simply to spur some thoughts:
Is the plugin the most recent one?
Are there any errors, maybe hidden by the current production state (backend/frontend)?
Does glz_cf throw that message if it’s the only active plugin?
Could it be caused by the name of the field?
Or by any contents/special characters in that/these field(s)? (Also: too much content in there?)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1182 2017-08-01 15:06:50
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: glz_custom_fields
Hi uli, thanks for your answer.
uli wrote #306508:
Is the plugin the most recent one?
Yes.
Are there any errors, maybe hidden by the current production state (backend/frontend)?
Notice "A non well formed numeric value encountered"
in /home/www/web111/html/la-lengua/textpattern/include/txp_prefs.php at line 819.
textpattern/include/txp_prefs.php:819 adminErrorHandler()
textpattern/include/txp_prefs.php:90 real_max_upload_size()
textpattern/include/txp_prefs.php:49 prefs_save()
textpattern/index.php:211 include()
Notice "A non well formed numeric value encountered"
in /home/www/web111/html/la-lengua/textpattern/include/txp_prefs.php at line 819.
textpattern/include/txp_prefs.php:819 adminErrorHandler()
textpattern/include/txp_prefs.php:90 real_max_upload_size()
textpattern/include/txp_prefs.php:49 prefs_save()
textpattern/index.php:211 include()
Does glz_cf throw that message if it’s the only active plugin?
Yes.
Could it be caused by the name of the field?
No, the names are “Ancho” and “Zoom”, the same like in other installations without problems.
Or by any contents/special characters in that/these field(s)? (Also: too much content in there?)
Are checkboxes.
Offline
#1183 2017-08-01 16:42:36
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: glz_custom_fields
Sorry, no ideas.
In order to speed things up: The function in txp_prefs is the following one, the line with case 'm': $val *= 1024;
function real_max_upload_size($user_max)
{
// The minimum of the candidates, is the real max. possible size
$candidates = array($user_max,
ini_get('post_max_size'),
ini_get('upload_max_filesize'), );
$real_max = null;
foreach ($candidates as $item) {
$val = trim($item);
$modifier = strtolower(substr($val, -1));
switch ($modifier) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
if ($val > 1) {
if (is_null($real_max)) {
$real_max = $val;
} elseif ($val < $real_max) {
$real_max = $val;
}
}
}
return $real_max;
}
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1184 2017-09-29 02:07:52
- david@druna.cz
- Member
- Registered: 2017-07-25
- Posts: 41
Re: glz_custom_fields
I have found out that glz_custom_fields is applying textile to my custom textarea field. Is there a way to stop this? Textile has been turned off for the said article. (Nonetheless I would like to stop the textile even if it was turned on for the article.)
Offline
#1185 2017-09-29 04:59:36
Re: glz_custom_fields
david@druna.cz wrote #307253:
I have found out that glz_custom_fields is applying textile to my custom textarea field. Is there a way to stop this? Textile has been turned off for the said article. (Nonetheless I would like to stop the textile even if it was turned on for the article.)
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”?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline