Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#991 2012-06-12 22:46:30

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

Re: glz_custom_fields

You find the necessary settings on Admin > Plugins > glz_cf > Options. But please note that you can’t sort your articles any longer by custom field if you use the German date format.


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

Offline

#992 2012-06-12 22:52:03

totoff
Member
From: Cologne, Germany
Registered: 2011-04-04
Posts: 145
Website

Re: glz_custom_fields

hi uli,

thanks for your reply. but no, all i get there is a dropdown list with four options:

  • dd/mm/yyyy
  • mm/dd/yyyy
  • yyyy-mm-dd
  • dd mm yy

no option to have dd.mm.yyyy (separated by dots) :-(

Offline

#993 2012-06-12 23:09:50

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

Re: glz_custom_fields

Oh, too hasty. The dots, ok.
Anticipating censorious end users, you can edit the plugin on/around line 1714, where it says:

$arr_date_format = array("dd/mm/yyyy", "mm/dd/yyyy", "yyyy-mm-dd", "dd mm yy");


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

Offline

#994 2012-06-22 14:46:00

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: glz_custom_fields

Group:

I have used this plug in since day 1 — and it is core to almost all my projects — Gerhard did a huge solid to TXP when he converted his Custom Field Hack to this plug in. But now I need to push it a little or find another alternative integrated with TXP which I hope someone can assit me with.

I am starting a project (real estate based) where I need to give the end user the ability to make multiple selections based on different criteria which in turn will return a list of appropriate articles. My ideal would be to use in similiar fashion the plug in back end — but on the front. I saw a similiar post by CeBe but not sure if a solution was found.

Bloke I would be open to using any of your mastery to get the job done.

As an example: The site visitor would be able to select state; house color; price range; garage; etc. (20 + options) — and then the results would be returned.

Any asistance would be greatly appreciated.

UPDATE:

I found this in the forum that may help my pursuit:

http://forum.textpattern.com/viewtopic.php?id=37409&p=2

But I am curious of other options and also is there a way to run a broad search — then once the results are returned — run another search to narrow down the options —-

Thanks

progre55

Last edited by progre55 (2012-06-22 15:03:08)

Offline

#995 2012-06-22 15:11:03

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

Re: glz_custom_fields

@progre55

Since you are doing a commercial site, maybe offer to pay for Bloke’s services in bringing your plugin to fruition? I did just that when I needed some calendar work from him on a client’s site and he did a great job.

Offline

#996 2012-06-22 15:13:08

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: glz_custom_fields

philwareham:

Thanks for the suggestion — Bloke rocks and I know he would do a great job.

Bloke let me know if your schedule permits and if you would be willing to throw some magic together. I do not think it would be too complicated — but let me know your thoughts —-

In taking a look — I think your http://stefdawson.com/sw/plugins/smd_multi_choice

May be part of the solution —- but let me know if you would be willing to pull it together for some compensation —-

UPDATE: I found this post which I think should help point me in the right direction: http://forum.textpattern.com/viewtopic.php?id=36485

progre55

Last edited by progre55 (2012-06-27 19:10:05)

Offline

#997 2012-06-28 01:51:16

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: glz_custom_fields

Is it possible to have a dropdown select that is automatically populated with articles from a given section?

And is it possible to reference fields from an article selected in this way?

The use case is as follows – we have articles in a section venues that hold the name, address, lat/long & other details relating to a venue. When we enter an event in section events, we want to choose the venue from a dropdown. We also want to access a number of venue article fields when displaying the event page.

Thank you.

Offline

#998 2012-06-28 21:48:56

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

Re: glz_custom_fields

nardo wrote:

Is it possible to have a dropdown select that is automatically populated with articles from a given section?

yes

And is it possible to reference fields from an article selected in this way?

Yes

I would just nest a second article_custom call from within the events article form. It’s sole purpose is to list the venue fields. So when you are putting in a new “event” article you’d use a glz scripted select to tell it to associate with the selected venue article. Just like using an article image really.

This sucker should create a select that lists all non-sticky articles in the venue section and return the url-title. Throw it in your glz_custom_fields folder

Edit: Actually returns the url-title not article ID, but just replace instances of url_title with whatever database field (see below) you’d like the field to return. Also note, the first script will produce a select and the second will produce a multi-select. Read comments to see how

Possible Article Fields

  • ID
  • Posted
  • Expires
  • AuthorID
  • LastMod
  • LastModID
  • Title
  • Title_html
  • Body
  • Body_html
  • Excerpt
  • Excerpt_html
  • Image
  • Category1
  • Category2
  • Annotate
  • AnnotateInvite
  • comments_count
  • Status
  • textile_body
  • textile_excerpt
  • Section
  • override_form
  • Keywords
  • url_title
  • custom_1-20
  • uid
  • feed_time

Select that lists article titles and returns article url titles from the “venues” section

<?php
function my_venues($custom_field, $custom_id, $custom_value) {
  $titles = array();
  $query = safe_rows('url_title, title', 'textpattern', "section like 'venues' AND status !=5");
  $titles[] = '&nbsp;';
  foreach ($query as $title) 
    $titles[$title['url_title']] = $title['title'];

  // for a multi-select allowing multiple values change "2" to "1" and add ", true" without quotes after it.
  return glz_selectInput($custom_field, $custom_id, $titles, $custom_value, "2"); 
  }

?>

faux unlimited categories multi-select (restricted to children of a “my_parent_cat”)

<?php
function my_wine_cats($custom_field, $custom_id, $custom_value) {
  $titles = array();
  $query = safe_rows('name, title', 'txp_category', "parent like 'my_parent_cat' AND type like 'article' order by title asc");
  $titles[] = '&nbsp;';
  foreach ($query as $title) 
    $titles[$title['title']] = $title['title'];

  // for a select allowing only a single value change "1" to "2" and remove ", true" without quotes after it.
  return glz_selectInput($custom_field, $custom_id, $titles, $custom_value, "1", true);
}

?>

Last edited by mrdale (2012-06-29 15:23:07)

Offline

#999 2012-06-28 21:58:42

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: glz_custom_fields

Thanks for that mrdale, we’ll give it a bash

Offline

#1000 2012-08-01 13:03:08

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: glz_custom_fields

Does anyone know how fix GLZ_CF for working with Textpattern 4.5?

Offline

#1001 2012-08-05 03:49:57

robbiia
New Member
From: New York
Registered: 2012-08-05
Posts: 8
Website

Re: glz_custom_fields

Nope. Didn’t seem to “fully work” when I tested – before I screwed something up on my Mamp – install of beta 4.5
If my memory serves me well (which it rarely does) – there was some issue with the fields at the top not being visible or something. It looked like some cels went wonky. You have to look at it for yourself though cause I ain’t reinstalling.

I was like. Check —-> it don’t work yet.
NEXT!!!!

but maybe i test further in future.

Offline

#1002 2012-09-04 19:25:05

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: glz_custom_fields

After upgrading a site to 4.5, I tested to see what types of glz_custom_fields work or fail:

Text Input = works
Checkbox = fails
Radio = works
Select = works
Multi-Select = fails
Text Area = works
Date Picker = fails (little calendar icon appears to right of image, so it may just be a styling issue for the calendar pop-up)
Time Picker = fails (not little icon appears for the picker)
Custom script = didn’t test

If you click Save or Publish when when a cf checkbox is checked or a selection is made in a cf multi-select area, the following error will pop up and you won’t be able to save the article:
“Sorry, the form could not be submitted Please try again later.”

The only appearance/styling issue I found on the glz_custom_fields extension/settings page occurs when using the Hive theme. There is an overlap of the “Add new custom field” title bar covering the top half of the Name input field.

The “Configure glz_custom_fields” link that appears to the right of the “Type” field on the plugin’s extension page when multi-select, or any of the “Special” types is selected is broken.

Last edited by photonomad (2012-09-04 20:50:30)

Offline

#1003 2012-09-05 07:56:57

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

Re: glz_custom_fields

Gerhard is currently fixing glz_custom_fields for use in Textpattern 4.5, so just be patient – it will happen.

Offline

#1004 2012-09-05 10:15:22

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: glz_custom_fields

philwareham wrote:

Gerhard is currently fixing glz_custom_fields for use in Textpattern 4.5, so just be patient – it will happen.

I’m not sure I got such a warm fuzzy feeling as that from Gerhard’s recent emails. He said that he was ‘dragging his heels’ mostly because PHP didn’t ‘light his fire’ any more (I paraphrase, having deleted the emails and am unable to recall his precise terminology). The replies to his survey indicated that more than 90% of his plug-in users wanted GLZCF capabilities incorporated into Textpattern and he announced that he would enter negotiations with the TXP Devs about that. That is the right answer to the wrong question isn’t it? As I understand it, that incorporation is an aspiration for TXP 4.6 and not before. In these circumstances, don’t we just want him to fix his plug-in to work with the current TXP version one more time and then he can be done with it.

I’m sure popular plug-ins do become albatrosses around the necks of TXP plug-in developers when they move on. I understand completely where Gerhard is coming from, so I still love him to bits

Last edited by joebaich (2012-09-05 11:27:06)

Offline

#1005 2012-09-05 10:29:42

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: glz_custom_fields

On a fresh new 4.5, I install the last glz_custom_fields. Don’t work because the table custom_fields is not created. I created it with phpmyadmin and in my particular case (I need a custom script), it work.

I’m creating 4 new sites actually with 4.4.1 because I need rss_unlimited_categories … and glz_custom_fields. Sad … So 4.5 is a fine/wonderful release but plugins prevent migration

Offline

Board footer

Powered by FluxBB