Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
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

#1058 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

#1059 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

#1060 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

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

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

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

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

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
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

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

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

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

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

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

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

#1065 2013-02-20 14:39:54

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

Re: glz_custom_fields

Ah, I see, thank you I completely missed that, I’ve got it working now. Just not having a lot of luck with glz_custom_fields. I’m trying to workout if it’s a plugin problem or something with my install. Just in case I started a new thread so as not to de-rail this one too much:

http://forum.textpattern.com/viewtopic.php?id=39382

Offline

#1066 2013-02-20 18:38:48

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

Re: glz_custom_fields

philwareham wrote:

Textpattern 4.6 will have it’s own native custom fields built into the core

wow! thanks


…. texted postive

Offline

#1067 2013-02-20 19:20:18

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

Re: glz_custom_fields

Just checked the first post for the linking to the current version: is this pull/2 here really the beta1 that’s mentioned today?


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

Offline

#1068 2013-02-26 17:13:23

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: glz_custom_fields

hi

i do have a problem over here.
this is somehow interfering with rss_unlimited_custom_fields. if the glz plugin is active and i set an attribute to a custom field and use the rss_uc field, the custom_field is not saved. with the fancy ajax in txp 4.5.4 it looks like its saved, but if you reload the article you see that the field is not saved. if i disable glz the custom fields are all saved properly. unluckily this is not an option :P

i also posted this in the rss_uc forum
http://forum.textpattern.com/viewtopic.php?id=14168&p=79

Last edited by jens31 (2013-02-26 17:14:32)

Offline

Board footer

Powered by FluxBB