Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#331 2009-05-12 00:31:52

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

Re: glz_custom_fields

Hi! has anyone figured out a way to use

<txp:if_search_results>

with custome_filds_search?

I need to do something like:


<txp:if_search_results>
  <p>These articles match your search request: </p>
<txp:else />
  <p>Sorry, we were not able to find a page matching your search request <strong><txp:search_term /></strong>.</p>
</txp:if_search_results>

Thanks!

Offline

#332 2009-05-21 10:25:30

jordi
Member
From: Barcelona
Registered: 2005-09-14
Posts: 94
Website

Re: glz_custom_fields

Hi,

I am building a book site that will need perhaps 100 custom fields, so I’ve installed v. 1.2 of the plugin with Gerhard’s own version of TXP 4.0.8 and everything seems to go well: I can create and edit custom fields in the Extensions tab, and then I see them appear on the Write tab as desired. And there’s where I begin to get lost.

For instance, I have a custom field called “Format” of the type radio buttom with two values: “p-book” and “e-book”. The idea is to check first if the custom field “Format” has the option p-book selected, and if so to output a block of code that gets values from several CFs related to p-books (but not to e-books). For this I use a form that looks like:

<txp:glz_if_custom_field name="Format" value="p-book">
<div id="pbookinfo">
<dl>
<dt>ISBN: </dt><dd><txp:glz_custom_field name="ISBN p-book" /></dd>
<dt>Author: </dt><dd><txp:glz_custom_field name="Author" /></dd>
<dt>Pages: </dt><dd><txp:glz_custom_field name="Pages" /></dd>
<dt>Subject: </dt><dd><txp:category /></dd>
<dt>Price: </dt><dd><txp:glz_custom_field name="P-book price" /></dd></dl>
</div>
</txp:glz_if_custom_field>

But it does not work like this, does it? Do I need to use a custom field for “pbook” and another for “ebook” with just one value each? And, should I use the standard TXPtags for custom fields or glz’s? (the first post in this thread says that “glz_custom_field and glz_if_custom_field” work well, but I’m getting an error that “this tag does not exist”).

I suppose I must be missing the obvious, but right now… “there’s too much confusion” and I’ll appreciate any hints.

Offline

#333 2009-05-21 10:35:24

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

Re: glz_custom_fields

jordi wrote:

Do I need to use a custom field for “pbook” and another for “ebook” with just one value each? And, should I use the standard TXPtags for custom fields or glz’s? (the first post in this thread says that “glz_custom_field and glz_if_custom_field” work well, but I’m getting an error that “this tag does not exist”).

Hi Jordi,

first of all, glz_custom_field & glz_if_custom_field have been deprecated in v1.2. This is mentioned in the first e-mail that you’ve received the plugin with. My patched version of TXP ensures custom_field and if_custom_field work as expected.

Yes, your use of if_custom_field is correct, just drop the glz_. Let me know how it goes!

Offline

#334 2009-05-21 10:48:30

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

Re: glz_custom_fields

speeke wrote:

  1. Is this the correct URL for your version of TXP
  2. How does your version differ from the original
  3. Do all author plugins work with your version of TXP
  4. Where is the download link to glz_custom_fields v1.2
  5. Is there a try before you buy option
  6. Will your glz_custom_fields plugin always require a different version of TXP to the original

Hi speeke,

1. No, this is the right URL (click on the download button – it’s a JS modal)
2. Here is a full diff. A lot of them are tab/whitespace mods, maybe 1/4 are relevant changes.
3. Yes, my TXP changes are only related to the use of custom_fields
4. & 5. It’s a paid-for version, please PM if you want us to have a chat about this.
6. With the mods that Robert kindly made available for 4.0.9, I’m hoping not.

A LOT of work went into 4.0.9, there’s so much I need to catch up on! glz_custom_fields v1.3 should be there though : ).

Last edited by gerhard (2009-05-21 10:59:24)

Offline

#335 2009-05-21 10:54:35

jordi
Member
From: Barcelona
Registered: 2005-09-14
Posts: 94
Website

Re: glz_custom_fields

OK, thank you Gerhard, I had been searching this thread but had forgotten all about the email.

In short: now it works. There was another mistake in my code: I was using the attribute “value” for the custom field tag when it should be “val”.

Thanks again for your answer and for this killer plugin :)

Offline

#336 2009-05-21 11:00:25

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

Re: glz_custom_fields

jordi wrote:

There was another mistake in my code: I was using the attribute “value” for the custom field tag when it should be “val”.

Hah, I’ve missed that actually – but you’re right. Glad all is fine now!

Offline

#337 2009-05-22 14:04:20

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

Re: glz_custom_fields

Is there a way to paginate the result of a glz_search?
I see I can limit the number of results output, but “older” and “newer” links (or the ob1_pagination plugin) don’t work. the secondpage is blanc.

Thank you

Offline

#338 2009-05-27 12:11:57

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

Re: glz_custom_fields

Any idea on my last question?

yet a “not possible” answer would be appreciated, so I can start creating a different page layout, compliant with the huge amount of item I get in some cases.

Thanks :-)

Offline

#339 2009-06-01 22:50:39

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

Re: glz_custom_fields

midmood wrote:

Is there a way to paginate the result of a glz_search?
I see I can limit the number of results output, but “older” and “newer” links (or the ob1_pagination plugin) don’t work. the secondpage is blanc.

Hi Simone,

you would need to alter ob1_pagination_plugin to handle the $_POST variables employed by glz_custom_fields, otherwise pagination won’t work.

I’ve already started working on v1.2.1 that will use $_GET instead of $_POST, that should make it easier to navigate through results. I’ll see if I can put together a pagination tag, no promises.

Offline

#340 2009-06-01 22:56:26

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

Re: glz_custom_fields

speeke wrote:

Could you please direct me to the download link for glz_custom_fields v1.2? I can’t seem to find it anywhere.
And lastly, do you know of an eta on the TXP 4.0.9 &/or your glz_custom_fields v1.3 release?

Hi speeke,

as I was saying in my previous comment, there is no download link for glz_custom_fields. It’s a paid for plugin, donating £10 will get you on the mailing list and you will receive your copy of glz_custom_fields together with initial instructions. Please refer to the first post for more info.

I don’t know when TXP 4.0.9 will be released, but I’ve already started working on v1.3, I’m hoping to have it finished in time. v1.2.1 is going to be out first though, I’ll take it one step at a time.

Offline

#341 2009-06-03 21:59:25

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: glz_custom_fields

Not sure if this is documented anywhere (I couldn’t find it) or maybe this is just common knowledge, but stay away from single quotes in any value fields. I have a client who found out the hard way that not only will the database not accept a single quote in a list of values, it will DELETE all of the other values you have listed. Further tests seem to indicate that this is true for values under Select, Multi-Select, Checkbox and Radio.

Offline

#342 2009-06-04 07:23:04

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

Re: glz_custom_fields

visualpeople wrote:

Not sure if this is documented anywhere (I couldn’t find it) or maybe this is just common knowledge, but stay away from single quotes in any value fields. I have a client who found out the hard way that not only will the database not accept a single quote in a list of values, it will DELETE all of the other values you have listed. Further tests seem to indicate that this is true for values under Select, Multi-Select, Checkbox and Radio.

Hi mate, which version of glz_custom_fields is your client using? Values with single quotes (and other non-safe characters) were an issue in v1.1.x, but they have been addressed in v1.2.

Offline

#343 2009-06-04 08:05:55

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: glz_custom_fields

gerhard wrote:

Hi mate, which version of glz_custom_fields is your client using? Values with single quotes (and other non-safe characters) were an issue in v1.1.x, but they have been addressed in v1.2.

That’s it — still using 1.1.3, for other reasons I can’t update this client to your TXP 4.0.8 yet. Nuts, now I might have to figure out how to make that work.

Thanks,
-Ryan

Offline

#344 2009-06-04 08:27:32

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

Re: glz_custom_fields

Why couldn’t you update to my version of TXP 4.0.8?

If it helps, glz_custom_fields v1.3 will work with the official TXP 4.0.9, no patching required.

Offline

#345 2009-06-04 21:21:03

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: glz_custom_fields

gerhard wrote:

Why couldn’t you update to my version of TXP 4.0.8?

It’s not your version as much as I just have some custom things on there that I would need to re-do for a 4.0.8 install and the customer doesn’t really want to pay me to do that right now. Thanks so much for your help, though.

Offline

Board footer

Powered by FluxBB