Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#829 2011-03-14 22:09:50

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

Re: glz_custom_fields

dreamer wrote:

align the boxes next to the name

Have a look at this post and also at the reply of alanfluff.


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

Offline

#830 2011-03-14 22:11:13

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: glz_custom_fields

dreamer wrote:

EDIT: I tried setting it to 65000 (65535 didn’t seem to work) but this has no effect on allowing me to tick off more colors.

You can only set it to (max) 65535 in MySQL 5.0.3 or higher, before that the limit is 255.

Last edited by els (2011-03-14 22:11:47)

Offline

#831 2011-03-15 05:52:07

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: glz_custom_fields

uli wrote:

align the boxes next to the name

Have a look at this post and also at the reply of alanfluff.

Unfortunately, that doesn’t seem to do anything at all.

Last edited by dreamer (2011-03-15 05:52:27)

Offline

#832 2011-03-15 06:07:51

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

Re: glz_custom_fields

Just try something like:

custom_field_group .glz_custom_checkbox_field span input{width:30px;}

change the width value until it suits, or try width: auto; again

Offline

#833 2011-03-15 10:18:22

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

Re: glz_custom_fields

dreamer, what MySQL version are you running?

I’ve released a hot fix for v1.2.4 which addresses the styling issue, details are on the Google Group, will e-mail everyone shortly.

Last edited by gerhard (2011-03-15 10:18:44)

Offline

#834 2011-03-16 14:43:41

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

Re: glz_custom_fields

hi

first of all thank your for that plug-in. got it running on plenty projects..

and today i saw the datepicker function and i want to implement it into another one :)
but i have one question:
in the extensions tab: Date format: wouldnt it be possible to put the the values in by myself? im askin because of the separators.
(ok ok, i could hack those via jquery or something) just askin if this wouldnt be possible as well.
like you have a text field and put this in manually..
like dd-mm-yy, dd.mm.yyyy, mm***dd***yyyy (just playing with the constalation of the separators..)

or another thought:
make it a textfield and lets put in the value like in <txp:posted *format=""* /> strftime()
would that be possible, or am i nuts..? cause that would also make my next question needless..

cause i also want those weekdays.. cant they also be put into the custom field..?

just askin for a feature ill need once in a lifetime, but it would be geil..
tell me what you think..

Last edited by jens31 (2011-03-16 14:45:11)

Offline

#835 2011-03-19 03:43:10

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: glz_custom_fields

Hi all.
Here is a little hack for the plugin:

// evals a PHP script and displays output right under the custom field label
 function glz_custom_script($script, $custom, $custom_id, $custom_value) {
// hack starts
   global $prefs;
    // test if $script is an absolute path (i.e. /home/path/to/script/).
    $abs_path = strcmp(substr($script, 0, 1),'/') === 0 ? true : false;
    // if it's not an absolute path, then it's a relative path (i.e. just the script name, 
    if (!$abs_path) {
      // then, recreate the full path by appending the value of custom_scripts_path (i.e. /
      $script = rtrim($prefs['custom_scripts_path'],'/') . '/' . $script;
    }
// hack ends
    if ( is_file($script) ) {
      include_once($script);
      $custom_function = basename($script, ".php");
   ...

Look for the correct line (the one defining glz_custom_script function) and edit the first line so the code lookslike the above snippet.

This mod will let you use both relative or full path when specifyng the filesystem path to a glz_custom_field custom script. So you could put just the custom script name, like “my_image.php” instead of the full path (“/home/path/to/my_image.php”), making it easier to deploy or share a DB with other dev.

Gerhard, do you think it could be possible to pass the custom field’s name to the custom script function? I mean, as now, that you pass the $custom_id and/or $custom_value. Having the custom field name would open the possibility to write more reusable custom scripts .


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#836 2011-03-25 15:31:28

element
Member
Registered: 2009-11-18
Posts: 99

Re: glz_custom_fields

Question: I’m using glz_custom_field (obviously) and I need to use if_custom_field for a field > 10. What is the solution?

Offline

#837 2011-03-25 16:22:20

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

Re: glz_custom_fields

If you’re using the latest version of Textpattern, txp:if_custom_field should work fine.

Offline

#838 2011-03-25 17:45:11

element
Member
Registered: 2009-11-18
Posts: 99

Re: glz_custom_fields

Using TXP 4.2.0, and it doesn’t work.

Offline

#839 2011-03-25 20:07:22

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

Re: glz_custom_fields

I have a new feature request for the plugin and would love to know if it might be helpful to others or easy to implement:

Add a custom field option that allows an article to be associated with other articles in the site. I’m thinking of a pull down menu (or multi-select menu) that lists article titles from a specified section (or sections). Then, in the article form, the custom field would output as permlinked title(s) to the corresponding article(s). This would be helpful to me because it would avoid typos/user errors and, as a designer, I would have control over where the links show up in the layout of the article (versus just writing links with textile in the body or excerpt)

Maybe I am the only one interested it in this… thought I’d throw it out there to see if anyone else likes the idea.

I initially thought about it in this thread.

Offline

#840 2011-03-25 20:20:51

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: glz_custom_fields

photonomad wrote:

Add a custom field option that allows an article to be associated with other articles in the site. I’m thinking of a pull down menu (or multi-select menu)…

Hi,
it should already be easily doable with a custom script.
Choose a CF and set “type” to “custom script” then modify the sample script which comes with the plugin (usually in the “script” folder).
You may want to read the instructions since I don’t remember well how it works now.

Offline

Board footer

Powered by FluxBB