Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#925 2011-09-08 16:42:53
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: glz_custom_fields
Ok, put it in textpattern.js – seems to be working :-)
Newbie question again… :-/
Where would I put the script to hide the extra Body textarea?
Many thanks,
Ben.
Last edited by ploinkr (2011-09-08 17:05:04)
Offline
#926 2011-09-08 17:21:54
Re: glz_custom_fields
@Ploinkr: I have bot_wtc, and I used that to insert the script.
Offline
#927 2011-09-08 19:38:48
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: glz_custom_fields
Thank you John – I didn’t know about that plugin, will check it out :-)
Offline
#928 2011-09-09 04:50:25
Re: glz_custom_fields
I’ve reported a bug:
on multi-select, if last option is checked, then first (empty) option gets checked on reload (and some related thoughts on single selects, multi-selects and having a first empty option)
A quick summary of the bug: if user selects the last option in the multi-select, and saves the article, then, on page reload, this first empty option is also selected. Problem is, if the user saves the article again, without noticing this, both the empty option and the last option get saved into the database.
This affects v1.2.4 and v1.3.0, and find it a bit rare that it went under the radar till now.
Can anyone confirm you can replicate this bug on your installs?
I’ve provided a possible fix.
Offline
#929 2011-09-09 13:47:40
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: glz_custom_fields
maniqui wrote:
Can anyone confirm you can replicate this bug on your installs?
Yup, confirmed (1.3.0). And discovered that a multiselect doesn’t accept 0
as a value ;) (No complaint, Gerhard, happens probably only on a bugchase)
(Edited to add version)
Last edited by uli (2011-09-09 13:52:03)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#930 2011-09-09 16:08:38
Re: glz_custom_fields
Hi Uli. Thanks for confirming the bug.
And discovered that a multiselect doesn’t accept 0 as a value.
Not sure if I understood. As value for which parameter?
Offline
#931 2011-09-09 19:54:43
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: glz_custom_fields
maniqui wrote:
Not sure if I understood. As value for which parameter?
In the “value” field on Extensions > Custom Fields. You can’t build a multi-select that has merely one “0” on any of its lines. Either the value isn’t saved (the list field is emptied) or you get a “You have an error in your SQL syntax”.
In the meantime I saw you can neither create a radio-selector nor a checkbox-selector that has exactly one 0 as a value for one of the buttons. And it’s far more likely sombody needs one of those selectors containing a 0 value than a multi-select with a 0. So I think this needs fixing in the upcoming version.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#932 2011-09-29 13:06:18
- pafruu
- Member
- From: New Brunswick, Canada
- Registered: 2010-01-14
- Posts: 65
Re: glz_custom_fields
Am I missing something here?
I used you’re awesome plugin, which I believe is the greatest plugin ever, but for some reason I cannot post any <txp:article /> or <txp:article_custom> anywhere on the site.
What am I doing wrong?
I try, and I try, and I try…. and sometimes I achieve
Offline
#933 2011-09-29 13:15:45
Re: glz_custom_fields
Hi Patrick,
I’m no expert and excuse this suggestion if you’ve tried it already, but if you disable the plugin does <txp:article />
begin working again? Guess you may also need to <txp:hide>comment out</txp:hide>
some code if you’ve calls to the plugin for this test.
If you’re still having problems, then at least you can count out this plugin.
Good luck, cheers, -Alan
Last edited by alanfluff (2011-09-29 13:16:46)
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
#934 2011-09-29 13:28:19
- pafruu
- Member
- From: New Brunswick, Canada
- Registered: 2010-01-14
- Posts: 65
Re: glz_custom_fields
well, I havent thought of that, i deactivated it and it still didnt work so at least I know the plugin is not causing it.
thanks, I will try to find the answer elsewhere :)
I try, and I try, and I try…. and sometimes I achieve
Offline
#935 2011-09-29 16:42:26
Re: glz_custom_fields
Here’s an idea that’s beyond my capabilities.
A custom field that uses a custom script to geocode an address (existing custom fields) in the current article and outputs those geocodes to itself in the form of a text field.
The obvious benefit is that an article can have googlemaps geocode it’s location only once, therefore making any map functions faster and more reliable that geocoding on the fly.
I found this resource on using php to geocode and insert the values into a table, but I’m not smart enough to bend it to the following purpose…
- Grab the address fields from CFs in the existing article
- Concatenate those fields into a single string
- Feed that string to the google geocoder
- Obtain XML or csv values
- Drop the non-pertinent parts
- present those values as an editable string if the field is empty.
so… looks straightforward, but it’s way outside of my capabilities. Anyone bored? {he laughs}
Offline
#936 2011-10-05 23:41:21
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: glz_custom_fields
Hi Gerhard,
I think it’d be great to have the actual custom fields’ numbers displayed in the Custom Fields tab for when you need to look up field’s numbers ( sort="custom_n"
). I know it’s visible when I edit a field, but it can need many clicks to get the correct one. E.g. at the moment I needed it to reconstruct bot_wtc rules from an SQL export file. (Yes, cool job.)
Probably needs you seconds to implement, and could be a time saver for many of us. Horizontal space seems to be sufficient.
Then I just realized there’s a stumbling block in v1.3.0:
Up to (and including) v1.2.4 the INSTALL.txt file told to put scripts in a folder called “scripts”. From v1.2.5 on it was named “plugins”. If on an update you continue putting scripts into the scripts folder, knowing you simply have to adapt paths in the plugin prefs, you’ll nonetheless end with a custom_fields tab that’s not working cause both paths to glz_custom_fields.js
and glz_custom_fields.css
have “plugins” coded in the plugin.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline