Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1093 2013-09-04 18:12:22

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: glz_custom_fields

Gerhard Lazu’s Github

There are two projects on Gerhard’s Github:

  • glz_custom_fields
  • glz_custom_fields_public

edit

As a way to preserve access to useful plugins that might be orphaned, I suggest getting up a Github account and forking a copy.

Last edited by maverick (2013-09-04 18:15:14)

Offline

#1094 2013-09-05 10:02:54

wordgasm
Member
Registered: 2006-05-17
Posts: 83
Website

Re: glz_custom_fields

Hello, is it possible to use HTML or Textile in the textarea?

Offline

#1095 2013-09-05 12:17:46

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

Re: glz_custom_fields

It’s possible to use the plugin txp:smd_wrap to parse Textile markup in a textarea but, as far as I am aware, there isn’t a way to parse HTML in the same way that it is in the Body and Excerpt fields on the write page.

I absolutely agree that it would be good to have multiple textareas where both Textile and HTML could be used together just as they can be in the TXP core fields. In particular, this would be a great way to organise output on grid system based sites. I imagine this may be the direction you are coming from too.

Last edited by joebaich (2013-09-05 12:20:21)

Offline

#1096 2013-09-05 12:57:15

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: glz_custom_fields

Or with the upm_textile plugin.

<txp:upm_textile><txp:custom_field name="Name" escape="" /></txp:upm_textile>

Offline

#1097 2013-09-06 00:30:05

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

Re: glz_custom_fields

You can add hak_tiny_mce to the custom textareas outlined here

Offline

#1098 2013-09-09 09:38:54

wordgasm
Member
Registered: 2006-05-17
Posts: 83
Website

Re: glz_custom_fields

Would it be possible to resize the width of text inputs and textareas?

Offline

#1099 2013-09-09 10:29:08

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

Re: glz_custom_fields

Yes, of course, via CSS, like that: .excerpt textarea { width: 50em; }

Use the browser’s developer tools to find out the desired element’s path selectors (probably class or id, might also include one of the parent’s classes/ids/elements) and add your ruleset to the relative admin stylsheet in use, e.g. textpattern > theme > hive > css > textpattern.css.

Last edited by uli (2013-09-09 12:57:40)


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

Offline

#1100 2013-09-09 11:08:39

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

Re: glz_custom_fields

wordgasm schrieb:

Would it be possible to resize the width of text inputs and textareas?

another way could be, to use this fine piece of code.
plugin based, but with some nice other features. you could manipulate the write screen via js and dont have to touch the core files..

Offline

#1101 2013-11-04 12:01:30

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

Re: glz_custom_fields

Quick question, I’m currently using version 1.3.0. Could someone tell me how to update the plugin? Simply install the newest version, or should I fist un-install the existing version? I don’t want to mess up my site as it is dependant on those customfields already working in version 1.3.0

thanks

Offline

#1102 2013-11-04 23:02:34

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

Re: glz_custom_fields

From the Read me file found in the download link glz custom fields page 1:

This version of the plugin is for Textpattern 4.4.x,
it will most probably not work properly on previous versions.
#### BACKUP YOUR DATABASE
This is not optional. The plugin won’t delete anything automatically,
but if something goes wrong, you might end up losing all your custom fields data.
#### PLUGINS FOLDER Place the `glz_custom_fields` folder from the archive into your website’s
plugins folder. You should end up with something similar to: |— HISTORY.txt |— README.txt |— index.php |— ……….. |— plugins | `— glz_custom_fields <<< THIS IS THE FOLDER THAT YOU NEED TO ADD |— ……….. `— textpattern |— checksums.txt |— config-dist.php |………………
#### INSTALL PLUGIN
Now delete your existing `glz_custom_fields` plugin, and install the
version included in this folder. That’s it!
## [Issues]::: [Tips] ::: [Github]

Offline

#1103 2013-11-25 01:41:11

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: glz_custom_fields

mrdale dijo:

This is my script to grab all categories that have parent “XXX” and make a multi-select custom field out of them

<?php
function my_parents_cats($custom_field, $custom_id, $custom_value) {
  $titles = array();
  $query = safe_rows('name, title', 'txp_category', "parent like 'XXX' AND type like 'article'");
  $titles[] = '&nbsp;';
  foreach ($query as $title) 
    $titles[$title['name']] = $title['title'];
  return glz_selectInput($custom_field, $custom_id, $titles, $custom_value, "1", true);
}
?>

This code was very useful for me, but I’d want to know how to use checkboxes instead of use multi-select dropdown list.
Anybody does know?
Thanks in advanced

Offline

#1104 2013-11-25 12:35:55

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

Re: glz_custom_fields

Fernando, in the above code, try removing
return glz_selectInput($custom_field, $custom_id, $titles, $custom_value, "1", true);
and replace with
return glz_checkbox($custom_field, $titles, $custom_value, "1", true);

This is in no way tested, just an attempt based on logic comparing two lines from glz’s my_images.php (No. 39 + 43) and Dale’s last line.


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

Offline

Board footer

Powered by FluxBB