Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#316 2009-04-26 18:12:55

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

Re: glz_custom_fields

grundgesetz a écrit:

That is what makes EE ingenious. I would really love that in txp.

Yes ! I use ExpressionEngine for a few sites and it’s awesome to be allowed to build my own article area fields

Offline

#317 2009-04-26 21:33:35

grundgesetz
Plugin Author
From: Germany
Registered: 2009-04-17
Posts: 24

Re: glz_custom_fields

Sorry mrdale. hadn´t read your thread ;) (btw: not much to see yet, stef. but promising)
just wrote what i thought.

b2t: will have a look into the plugin as soon as 1.3

Offline

#318 2009-04-27 06:39:07

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

Re: glz_custom_fields

mlarino wrote:

<txp:glz_custom_fields_search_form searchby=“Type of Food, Prize range:checkbox, category, section” section=“Restaurants” />
It will show a slect box to choose “types of Food”
It wll show checkboxes with “Price ranges”
It will show checkboxes with all the “Categories”
It will only search in section “Restaurants”?

If Types of Food is of type select, yes.
Yes to everything except the last question. section and category attributes are used to set a default value if no value has been checked. If that cant be done, maybe I should use Location as a custom_field instead of category, right?

I use Categories for the Location of the restaurants (NY, Chicago, Florida, etc…) so would that create checkboxes for the 62 locations I have in categories? A selectbox would be ideal.

Sorry, you can only have checkboxes. If you want this functionality, a custom_field is what you need.

Can this be styled with CSS? Right now just displays the selectboxes vertically, and a simple “Search” button. Would like to be able to style it completely. for example: have an horizontal list and use an image for the “search” button.

Of course you can style the search form any way you like. This is why I’ve used the button element for the submit over input.

I have overlooked an id for the form, just added glz_custom_fields_search, it will become available as of the next release.

Offline

#319 2009-04-27 06:47:56

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

Re: glz_custom_fields

jelle wrote:

How about dependencies between custom fields? Say custom field #1 is a checkbox and #2 is a textfield. I’d like to be able to make #2 depend on the value of #1 to apear in the write screen. So when #1 is checked, #2 is shown. When #1 is unchecked, #2 is hidden (and cleared)

Yes, that sounds like a very good idea, but on the list of important features, this comes pretty low. If you want to have a stab at it, this is a good starting point. Sorry Jelle, maybe when we sort more of the issues with TXP integration and join it with sed_section_fields.

Offline

#320 2009-04-27 12:49:25

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

Re: glz_custom_fields

mlarino wrote:

I usually use this method to style select boxes and forms but if the first option is blank, it just doest work. I think that instead of beeing blank, that is where you can place the name of the Custom_field, instead of having the label above the selectbox.

Styling form elements such as selects, radio & checkbox inputs is not recommended. It’s fine for basic styles (border/background/color), but changing their appearance as shown in your link Manuel is not a good idea. Why would you want to do it in the first place?

The reason why the first option is blank is so that people can reset a custom field value. In the link that you’ve used as an example this situation is not accounted for. This seems to be a limitation of the JS you’re using. Even though I discourage this practice, if you must use it, please look for an alternative JS form styling script or have a go tweaking the one that you’re currently using so that it works with blank values as well.

Offline

#321 2009-04-27 12:54:05

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

Re: glz_custom_fields

azw wrote:

That’s a good question about blank select options. I’ve seen in other instances that they don’t validate with W3C’s validator. What’s a good way around that problem?

They do validate in both XHTML 1.0 Transitional & Strict. A &nbsp; needs to be added if you’re particularly picky. I’ve just updated the code accordingly : ).

Offline

#322 2009-04-27 12:57:55

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

Re: glz_custom_fields

mlarino wrote:

What I am doing right now is changing this part of the code in the plugin

return "<select id=\"".glz_idify($id)."\" name=\"$name\" class=\"list\"$multi>".
      ($blank_first ? "<option value=\"\">CUSTOME_SET_NAME</option>" : '').
      ( $out ? join('', $out) : '').
      "</select>";

If you absolutely must change it, it’s line 593:

case "select":
  return array(
    glz_selectInput($custom, $custom_id, $arr_custom_field_values, $custom_value, 1),
    'glz_custom_select_field'
  );

to

case "select":
  return array(
    glz_selectInput($custom, $custom_id, $arr_custom_field_values, $custom_value),
    'glz_custom_select_field'
  );

Offline

#323 2009-04-27 13:02:31

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

Re: glz_custom_fields

thermofunk wrote:

How can I link to a search result? It is not necessary to show the url in the browser every time I make a search, I just need to know the correct sintaxis to create the link…

You can’t currently link to a search result. Because it’s using POST rather than GET, you must go through the form. This is on the TODO list, it will be available in the next version of glz_custom_fields.

Thanks for bringing this up!

By the way, I’m having problems with rss_admin_show_adv_opts and your version of TXP. Since I installed this version I also see the following message in the bottom of the Write Tab: Warning: array_map() [function.array-map]: Argument #2 should be an array in /var/www/vhosts/neuquentur.gov.ar/httpdocs/textpattern/lib/txplib_misc.php(570) : eval()’d code on line 576

Make sure you use the absolutely latest version of my patched TXP 4.0.8.Make sure that publish.php contains these changes. If it’s still an issue, drop me an e-mail.

Offline

#324 2009-04-27 13:04:33

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

Re: glz_custom_fields

midmood wrote:

Hi everyone, in the admin > Extensions tab I have about five or six couple of line of error like the following: Notice: Undefined index: custom_set in /web/htdocs/www.leparole.net/home/violetab/textpattern/lib/txplib_misc.php(580) : eval()’d code on line 810

Make sure you have the right version of TXP 4.0.8 and glz_custom_fields v1.2. If it’s still an issue, disable all plugins that might be active. If this doesn’t help, get in touch : ).

Offline

#325 2009-04-27 13:17:50

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

Re: glz_custom_fields

jpdupont wrote:

With this great news + new improvements in admin interface … and of course Gerhard plugin, is it possible to get

  • new custom fields > 256 chars (text/textarea) ?
  • custom fields below the body or excerpt fields (not in the left sidebar) ?

This unfortunately would require extensive reworking of the plugin, can’t promise anything other than I’ll look into it after v1.3 : ).

Offline

#326 2009-04-28 18:06:33

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

Re: glz_custom_fields

Hi,

I’m arranging a pretty extended search form (many, many options).
This form is made by say 8 checkbox lists, each made of 6 to 10 boxes.
As you can imagine, i’m running out of space in the sidebar.

To save space, and have all the option in a limited box, I’d like to reproduce the behaviuor of the txp’s admin area, where you can toggle the visibility of the single list of options/functions.
As an example you can see the write tab, where you can click to show/hide “Textile Help”, “Advanced Options”, “Recent Articles”.

How can I achieve this goal? do you have any hint/chunk of code?
Please consider that I’m not a php programmer and I’d be very nervous in modifyng the internal plugin code… please, spoon-feed me :-D

thank you anyway
Simone (Italy)

EDIT: Obviously… i keeop trying solving the problem by myself, and I think the right way to solve my problem is sort of a combination/adaptment of this two how-tos:
http://textpattern.org/tips/362/hiding-and-customizing-the-comments-form-and-system
http://www.netlobo.com/div_hiding.html

But really, I can’t imagine how to “inject” this to my situation.

Last edited by midmood (2009-04-28 18:16:40)

Offline

#327 2009-05-04 17:22:25

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: glz_custom_fields

Hi!
I am having problems with Search, is not restricting the search to a section.
This is what I am using:

<txp:glz_custom_fields_search_form results_page="#" searchby="Zona-Madrid:select, section, category" section="Belleza-y-Salud" />

where “Zona-Madrid” is the custom field with a select box of all the parts of the city, and section “Belleza-y-Salud” is the section with the articles about beauty and health.

But when I search for anything with that glz_custom_fields_search tag it gives me results not only in “Belleza-y-Salud” but also from the rest of the Sections.

Am I writing that tag wrong??
Thanks!!

Last edited by mlarino (2009-05-04 17:23:17)

Offline

#328 2009-05-06 15:49:14

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: glz_custom_fields

Hi Gerhard!

I went to your site and did the PayPal donation thingy yesterday, but haven’t heard or received anything yet. I just want to make sure that I haven’t missed anything essential.

Everything ok?
I expect you’ve probably just been busy…

Offline

#329 2009-05-07 21:34:28

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

Re: glz_custom_fields

helsinkifrostbites wrote:

Hi Gerhard! I went to your site and did the PayPal donation thingy yesterday, but haven’t heard or received anything yet. I just want to make sure that I haven’t missed anything essential. Everything ok? I expect you’ve probably just been busy…

Hey Harri, I’ve just sent you the plugin, sorry for the delay.

I’m currently traveling, will be back in the UK mid next week, will be picking things up then. Cheers!

Last edited by gerhard (2009-05-07 21:35:22)

Offline

#330 2009-05-11 11:29:31

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: glz_custom_fields

Great stuff!

Offline

Board footer

Powered by FluxBB