Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1036 2012-10-23 23:15:09

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_custom_fields

Everyone, can you try out the latest 1.4.0-beta1 please? I’ve tested it on TXP 4.5.1 and it works fine. Plugin preferences styling isn’t great and the datePicker doesn’t work, but everything else does. Will check on 4.5.2 shortly.

Regarding the datePicker, I was thinking about updating it to a more modern one. These are the 2 choices: jdpicker and zebra_datepicker (I am leaning towards the second one).

Last edited by gerhard (2012-10-23 23:20:28)

Offline

#1037 2012-10-24 00:09:33

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: glz_custom_fields

Thanks gerhard – I’ve been testing on 4.5.1 and not found any problems… I will be uploaded to a 4.5.2 today, so will let you know if I find anything

Offline

#1038 2012-10-24 00:20:27

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: glz_custom_fields

I’ve tested this a little bit on 4.5.2 installs and it seems to be fine. I have not tested in depth though.

Offline

#1039 2012-10-24 01:10:18

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_custom_fields

Most promising, thanks ; ).

Offline

#1040 2012-10-24 07:57:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,424
Website GitHub

Re: glz_custom_fields

gerhard wrote:

Will check on 4.5.2 shortly.

Great news Gerhard, thanks for fixing up the plugin for 4.5.x.

FYI, the changes in 4.5.2 were relatively minor and none should affect this plugin, so I don’t see any reason it won’t continue to work on 4.5.2.


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

#1041 2012-10-24 09:22:06

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: glz_custom_fields

I just did a blitz-test on a fresh installed 4.5.2 admin-side, and:

Plugin preferences styling isn’t great

But it’s not that bad and preferences are perfectly usable.

and the datePicker doesn’t work

It does.
I only note funny things when changing the date format and editing an old article but I think it is not your responsibility.

Great work, well done!

Offline

#1042 2012-10-24 21:27:00

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: glz_custom_fields

aside from datepicker, glz_custom_fields now seems to work fine with bleeding edge builds 4.6 4457

Thanks mrLazu

Offline

#1043 2012-10-24 22:13:50

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,252
Website Mastodon

Re: glz_custom_fields

mrdale wrote:

bleeding edge builds 4.6 4457

whoa.

so soon we’ll have multiple custom fields baked into the Main Cupcake


…. texted postive

Offline

#1044 2012-10-26 02:34:18

fiddle
Member
Registered: 2007-10-03
Posts: 87

Re: glz_custom_fields

The only thing Im seeing is that with radio buttons, I dint have the reset field like I use too..?

Offline

#1045 2012-11-01 13:39:09

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: glz_custom_fields

hello,
for some reason after upgrading to 4.5.2 I can no longer find the custom fields tab under extensions
trying to access the url returns the ‘restricted area’ warning.
any ideas..?

reinstalling the last version of the plugin fixed the prroblem

thank you

Last edited by feragnoli (2012-11-01 20:32:30)


what was that again…?

Offline

#1046 2012-11-27 13:40:50

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: glz_custom_fields

I use the plugin’s custom script feature to display select box with list of articles

<?php
function list_articles($custom_field, $custom_id, $custom_value) {
    $articles = array();
    $query = safe_rows('ID, Title', 'textpattern','1=1');
    foreach ($query as $article)
        $articles[$article['ID']] = $article['Title'];
    return glz_selectInput($custom_field, $custom_id, $articles, $custom_value, "");
}
?>

So that lists all the articles, but my plan is to have it show only articles from section that is selected. I would use javascript to hide/show articles from the select list, triggered by the section select value.

Problem is I would need to pass each articles section as class for the wrapping <option> tag. So I think I would need to modify glz_selectInput function slightly to be able to pass the section as variable, and the set it as class for the option tag.

function glz_selectInput($name = '', $id = '', $arr_values = '', $custom_value = '', $default_value = '', $multi = '') {
  if ( is_array($arr_values) ) {
    global $prefs;
    $out = array();
    // if there is no custom_value coming from the article, let's use our default one
    if ( empty($custom_value) )
      $custom_value = $default_value;
    foreach ($arr_values as $key => $value) {
      $selected = glz_selected_checked('selected', $key, $custom_value, $default_value);
      $out[] = "<option value=\"$key\"{$selected}>$value</option>";
    }
    // we'll need the extra attributes as well as a name that will produce an array
    if ($multi) {
      $multi = ' multiple="multiple" size="'.$prefs['multiselect_size'].'"';
      $name .= "[]";
    }
    return "<select id=\"".glz_idify($id)."\" name=\"$name\" class=\"list\"$multi>".
      ($default_value ? '' : "<option value=\"\"$selected>&nbsp;</option>").
      ( $out ? join('', $out) : '').
      "</select>";
  }
  else
    return glz_custom_fields_gTxt('field_problems', array('{custom_set_name}' => $name));

I do not have chops to do it myself, so I was wondering if someone more skilled would be kind enough to teach how to pass the variable through the function or let me know if this would be more complicated than I thought.

Offline

#1047 2013-02-20 09:56:28

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 604

Re: glz_custom_fields

I’m trying to install the 1.4.0-beta1 in a clean install of Textpattern 4.5.4 (r4919) and keep getting the following error

I’m sorry. I’m afraid I can’t do that. I think plugin plugin_install is no safe operation at this time.

—edit—
Rereading the posts here, is the plugin only compatible with Textpattern 4.6 builds?

Last edited by Algaris (2013-02-20 09:58:10)

Offline

#1048 2013-02-20 10:05:38

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

Re: glz_custom_fields

I’ve just (yesterday) used the 1.4.0-beta1 with Textpattern 4.5.4 without problem, so no.

Besides, Textpattern 4.6 will have it’s own native custom fields built into the core – glz_custom_fields will not be needed in the future (it’s effectively unsupported and orphaned now anyway – Gerhard updated it to work with 4.5 as a stopgap measure).

Offline

#1049 2013-02-20 10:24:25

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 604

Re: glz_custom_fields

That means something else is going on here. I’m wondering if my installation didn’t go through correctly as I’m now getting errors for other plugins I’ve just installed:

Internal error “Data too long for column ‘version’ at row 1”.
Internal error “Table ‘txp_db.bot_wtc’ doesn’t exist”.

I’ve also started getting the following error when going to the Write page.

I’m sorry. I’m afraid I can’t do that. I think article create is no safe operation at this time.

I think it’s time to do a fresh install and try again. Thanks for your help and the information Phil.

Offline

#1050 2013-02-20 13:25:21

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: glz_custom_fields

Algaris wrote:

Internal error “Table ‘txp_db.bot_wtc’ doesn’t exist”.

I think I’ve heard that recently here: there’s an additional step in the bot_wtc installation, IIRC you’ve to visit the bot_wtc extension panel and install the lacking table from there.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB