Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#913 2011-08-25 03:34:52

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

Re: glz_custom_fields

Sure John, saving works. With css you only hide it from eyes. With jquery remove method, it will be removed out of the DOM.

Offline

#914 2011-08-25 03:38:21

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: glz_custom_fields

Thanks Teemu! Great work-around!

Offline

#915 2011-08-25 03:58:28

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: glz_custom_fields

BTW, Teemu— you can also track this issue on Github, and report additional details if you wish.

Offline

#916 2011-09-01 19:33:48

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

Re: glz_custom_fields

Hi, just wondering: I’m using the Date Picker for certain fields; can that be used to sort articles by the date entered (and not just numerically?) Doesn’t seem to work so far… Thanks!

Offline

#917 2011-09-07 18:32:16

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

Re: glz_custom_fields

Anyone…? Gerhard? Would me most grateful…
Thanks,
B.

Offline

#918 2011-09-07 18:42:31

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

Re: glz_custom_fields

Try this way:
Plugins > glz_cf > Options <click> Date Picker > Date format > yyyy-mm-dd

That’s the only way I see offhand.


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

Offline

#919 2011-09-07 19:18:26

ploinkr
Member
From: Montreal
Registered: 2007-12-06
Posts: 83

Re: glz_custom_fields

Thanks so much Uli, going to try that (seems obvious now!)

- yep, working – thanks a lot! :-)

Last edited by ploinkr (2011-09-07 22:16:17)

Offline

#920 2011-09-07 19:34:32

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

Re: glz_custom_fields

I am faced with the same requirement to sort by the glz_cf Date picker date and can use the yyyy-mm-dd format to select the date but I also want to display the date in the article in the dd-mm-yyyy format. The only way I can see of doing that is to have two date fields, one in each format. Is there a better way?

Last edited by joebaich (2011-09-07 19:48:03)

Offline

#921 2011-09-07 21:04:26

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

Re: glz_custom_fields

joebaich wrote:

Is there a better way?

Hmmm …

aam_split_cf and sed_packed_custom_fields come to mind.


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

Offline

#922 2011-09-07 21:59:51

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,937
Website GitHub

Re: glz_custom_fields

I am faced with the same requirement to sort by the glz_cf Date picker date and can use the yyyy-mm-dd format to select the date but I also want to display the date in the article in the dd-mm-yyyy format.

Easier still: use the “yyyy-mm-dd” format for sorting and a php snippet to display it in another format. Something like:

<txp:php>
  $orig_date = custom_field(array('name'=>'custom-field-name'));
  echo date("d-m-Y", strtotime($orig_date));
</txp:php>

Further information about php date formats here.


TXP Builders – finely-crafted code, design and txp

Online

#923 2011-09-07 22:10:43

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

Re: glz_custom_fields

jakob wrote:

Easier still: use the “yyyy-mm-dd” format for sorting and a php snippet to display it in another format.

Ausgezeichnet, Jakob! Works like a charm.

Offline

#924 2011-09-08 10:31:48

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: glz_custom_fields

Jakob Nice snippet. Filed for future use in my open Textpattern library

Maybe also good to add as example to the custom field documentation. Or another place where we collect txp:php snippets!?


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB