Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#769 2011-01-27 19:18:32
Re: glz_custom_fields
Dimitri wrote:
@pieman, is that what you talking about?, just look at the picture
Maybe it is. I just can’t quite figure what I’m looking at there. Reading your other thread though, it sounds like we’re hankering for the same kind of thing.
Offline
#770 2011-01-27 21:00:30
Re: glz_custom_fields
Hey Gerhard – I’ve just completed the survey, I got really busy leading up to xmas and totally forgot.
I did have many ideas, some of which have gone – but I will add them here.
1 – What pieman said
2 – Option for Custom Field to be required before article can be saved/published
Thanks
Offline
#771 2011-01-28 00:22:48
- radneck
- Plugin Author
- Registered: 2005-07-03
- Posts: 109
Re: glz_custom_fields
pieman wrote:
Are you taking feature requests? From the stuff in your email, I wonder if this may be possible?
A bit of custom script magic would do that for you. Just brush up on your JavaScript (maybe use jQuery) and cook up a PHP compatible serialize function in JavaScript to push all the fields into one string to store in the custom field. The only issue you might run into is the 255 char (I think) size limit on custom script type custom fields.
Offline
#772 2011-02-01 04:01:59
Re: glz_custom_fields
I just upgraded a site from 4.2.0 to 4.3.0 and now I’m seeing a duplicate Excerpt field, as reported here previously, and expanded on here. Looks like a compatibility problem with MLP. I can confirm that disabling glz_custom_fields dismisses the duplicate Excerpt field, but it also banishes all my awesome custom fields.
Any suggestions or guidance toward a workaround or solution would be great!
Offline
#773 2011-02-02 14:17:44
Re: glz_custom_fields
@Dimitri, @pieman: both your requests make a lot of sense, I couldn’t imagine the new version of glz_custom_fields without this sort of functionality.
@tye: yes, requiring custom fields to be filled out before creating/updating an article is a very reasonable request.
Currently, custom_fields, even with my plugin, feel like second class citizens in the TXP land. If you think about it, articles are just virtual entities which are made up of multiple parts such as title, body text and and addons in the form of images, files & custom fields. The next version will turn this concept on its head, otherwise its not worth the effort. I will leave the article title and body as they are, but everything else will change:
Based on the article section, the custom fields displayed will vary
bot_write_tab_customize has this functionality already, I just want to make it part of this plugin since you should control a custom field’s visibility alongside all the other setting.
Each custom field will have it’s own table
This lifts the limit on how many custom fields an article can have. It also allows custom fields to store as much (or as little) data as required. Furthermore, no more ugly delimiter business. If you have 100 values for custom field “foo” in article “bar”, this should not be a problem.
Share custom field types
I wanted this for a long time. If someone creates an interesting custom field type (let’s say all cities in the UK), this should be shared. It might be a bit of a dream and long term goal, but it would be amazing in my opinion. Some custom field types are very specific to a particular website, but then you have some common ones (like the ones above) which anyone could benefit from. It’s somewhat similar to the script custom field type.
Proper search functionality
This is only half baked in the current version. It was impossible to see it through because it’s so coupled to TXP’s internals. More txp tags are required which would allow the filtering of articles based on the custom fields. Currently txp:article
is being used, but this is far from ideal.
There are more ideas floating around, but until I start putting them in code they will be just that, ideas.
Offline
#774 2011-02-02 14:19:23
Re: glz_custom_fields
johnstephens wrote:
I just upgraded a site from 4.2.0 to 4.3.0 and now I’m seeing a duplicate Excerpt field
John, I will look into this as soon as I get a second to get back to the code.
Thanks for submitting this to the issues page on github, that’s the best approach for getting me to look into it. It’s like this: if you take the time to create a new issue, it means that it’s worth my time too ; ).
Last edited by gerhard (2011-02-02 14:21:50)
Offline
#775 2011-02-03 07:50:33
Re: glz_custom_fields
OK – using Special Custom fields, I am trying to re-use the my_images.php script which gerhard supplied with the plugin.
The only difference is that I am trying to access a third party plugin table from pap_xpoll
I keep getting the following error, which is failing on a is_callable function:
Ooops! polls() cannot be called. Ensure/path/polls.php can be executed.
I am using the exact code as supplied, but have changed the database, fields etc
function list_xpolls($custom_field, $custom_id, $custom_value) {
$polls = array();
$query = safe_rows("pollid, title", "xpolls", "1=1");
foreach ($query as $poll)
$polls[$poll['pollid']] = $poll['title'];
return glz_selectInput($custom_field, $custom_id, $polls, $custom_value, "");
}
What could be make my script ‘not_callable’ – do I need to include something extra in the script for a third party plugin table?
Offline
#776 2011-02-03 10:03:29
Offline
#777 2011-02-03 11:37:42
Re: glz_custom_fields
Thanks Gerhard – can you tell I’m trying to learn php :)
Offline
#778 2011-02-03 11:40:10
Offline
#779 2011-02-03 15:32:25
Re: glz_custom_fields
You’re a mensch, Gerhard. Until I find out a better way, I’ll try to hide the duplicate field using CSS so as not to confuse the clients when I begin showing them the ropes next week.
Offline
#780 2011-02-04 17:46:51
Re: glz_custom_fields
johnstephens wrote:
I just upgraded a site from 4.2.0 to 4.3.0 and now I’m seeing a duplicate Excerpt field.
I posted a temporary workaround for this issue here
Offline