Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#229 2008-09-30 16:11:21

azw
Member
Registered: 2007-01-29
Posts: 279

Re: glz_custom_fields

I suppose you’re right about what it’ll say in the select box. That’s ugly. And it would appear not just in the administrative side but also the search bar, wouldn’t it?

No, I’ve not yet figured out a solution for the 200 Error. That’s an awful problem because it makes us look terribly incompetent. I haven’t any experience tweaking plug-ins, so I’m hoping that Gerhard will come out with the new version soon.

There must be a way to automate setting the price range. I can imagine that it would be possible to create a field for the price range, but only input the exact price. Then you could run a script that would calculate the range and write it to the DB whenever you update any products/items in your catalog or add a new item.

Or it could be done when you access the data on the site. So on any page that accesses price data, there could be a routine that verifies the price range data to be sure it exists and is correct.

I don’t like that either of those methods would use more resources than necessary. I suppose the ultimate solution would be a plug-in that allowed us to create calculated custom fields. Whenever one of the source fields (your price field, in this case) was changed, the plug-in would calculate the associated calculated field. I could use that plug-in!

Last edited by azw (2008-09-30 16:15:05)

Offline

#230 2008-09-30 16:42:07

coopersita
Member
Registered: 2005-09-28
Posts: 68
Website

Re: glz_custom_fields

I wish that instead of redirecting to a page, it would simply insert a text instead. So no_results would be something like no_results=“Sorry, no products matched your criteria.”

As for the price range, I can live with having to enter the price twice (for price and for range)…

Thanks for the help, azw

Offline

#231 2008-11-11 22:09:10

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: glz_custom_fields

coopersita wrote:

no_results would be something like no_results=“Sorry, no products matched your criteria.”

yeah…I’d like that too

Offline

#232 2008-12-07 17:19:41

Timid&friendly
Member
From: The Netherlands
Registered: 2006-05-28
Posts: 252
Website

Re: glz_custom_fields

Hi guyz and galz,

This glz_custom_fields plugin seems to be what i have been looking for but want to make sure before i buy it.

I am building an Image Gallery.
What i want to do is create a custom field with a pulldown-select button that shows me ALL the available images categories. Obviously i want this custom field to automatically retrieve all the possible image categories and get updated if extra categories are added.

I see TRIGGER WORDS have been added e.g. |Image Categories| (select with all existing image categories)

But not quite sure what they are and how they work? Do I enter such a trigger word(s) |Image Categories| somewhere in the plugin and it will pull all the available image categories.? Please excuse my ignorance.

Last edited by Timid&friendly (2008-12-07 17:20:55)


I think, therefore I AM, … … er … I think :-?

Offline

#233 2008-12-07 17:47:19

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: glz_custom_fields

Trigger Words are a planned feature for version 1.3. We’re currently at 1.1.3 and this plugin hasn’t seen any update for a while.

I wonder if Gerhard is still working on it?

Offline

#234 2008-12-08 06:08:56

azw
Member
Registered: 2007-01-29
Posts: 279

Re: glz_custom_fields

Yeah, at this point you’ll have to add the image category select options manually. But having that select is very helpful.

There are several issues with the plugin. It has some problems with it’s built-in search function. In particular, if someone does a search and it doesn’t find anything, it takes you to a different section, a miserable solution.

But overall, I’d recommend it. It adds valuable functionality and if Gerhard continues to upgrade it, it’ll eventually be utterly fantastic.

Last edited by azw (2008-12-08 06:12:33)

Offline

#235 2009-01-02 20:40:25

jmart
Member
Registered: 2008-08-25
Posts: 68

Re: glz_custom_fields

The documentation says that the <txp:glz_custom_field /> tag uses the same attributes from the <txp:custom_field /> tag.

So I tried using the escape attribute but it doesn’t work. Here is how the tag looked; <txp:glz_custom_field name=“fieldname” escape=“html” />

EDIT: Never mind. I found a solution to the problem. There was some confusion and miscommunication.

Last edited by jmart (2009-01-02 21:11:39)

Offline

#236 2009-01-03 02:28:55

azw
Member
Registered: 2007-01-29
Posts: 279

Re: glz_custom_fields

Hi, Jmart. Can you tell us what your solution was? It might help others.

Offline

#237 2009-01-11 17:57:58

abacabb
New Member
Registered: 2008-12-10
Posts: 7

Re: glz_custom_fields

Hey guys, I’m having a weird issue with glz_if_custom_field on my 4.0.6 build..

It appears when I use it in a code block, it will partially work, but it won’t exclude everything inside the tag, just the part that pertains to the actual call to glz_custom_field.

For example, I’m writing a form that will contain all the markup for any addresses that I have displayed on my site. I want to exclude a block of code if the extended-address field is not filled in. So my form markup looks like this:

                  <txp:glz_if_custom_field name="street-address">
				<div class="adr">
					<span class="street-address"><txp:glz_custom_field name="street-address" /></span><br/>
					<txp:glz_if_custom_field name="extended-address">
						<span class="extended-address"><txp:glz_custom_field name="extended-address" /></span><br />
					</txp:glz_if_custom_field>
					<span class="locality"><txp:glz_custom_field name="city" /></span>, 
					<span class="region"><txp:glz_custom_field name="state" /></span> 
					<span class="postal-code"><txp:glz_custom_field name="zipcode" /></span>
				</div>
			</txp:glz_if_custom_field>

If I don’t have any value for extended-address, that <br/> tag (and anything else I would add after it) inside the conditional is still showing up. Anybody run into anything similar before, or is it an error on my end?

Thanks!

Offline

#238 2009-01-12 02:40:06

azw
Member
Registered: 2007-01-29
Posts: 279

Re: glz_custom_fields

Yes, it’s on your end, but it’s easily fixed.

You can’t use nested conditions that use the same type of conditional with 4.0.6. Fortunately, that is possible with the latest version, 4.0.7. We owe the developers a lot for that one!

Unlimited nested template tags, and tags as attributes to other tags have made it into the Textpattern core as part of the new tag parser.

So you should upgrade to the newest version so you can put if_custom_field name=“extended-address” inside the if_custom_field name=“street-address”.

Also, you may be able to use the standard code

<txp:if_custom_field name="street-address">

in place of the glz:

<txp:glz_if_custom_field name="street-address">

I think that unless you’re using a special feature of glz_custom_fields, you would probably be better off using the standard custom_fields. (I don’t know what happens if you have more than 10 custom fields.)

Offline

#239 2009-02-01 02:32:57

garbo
Member
From: Montreal, Canada
Registered: 2007-01-02
Posts: 28
Website

Re: glz_custom_fields

I’m having some major issues with this plug-in and TXP 4.0.8. Anyone else having trouble suddenly after the upgrade?

It seems like a many custom fields just don’t show up in the rendered web page at all. There are even some custom fields that don’t appear in the Write tab window for some but not all articles.

Should I downgrade to TXP 4.0.7 in the meantime? Is that even possible?

Offline

#240 2009-02-01 03:04:20

garbo
Member
From: Montreal, Canada
Registered: 2007-01-02
Posts: 28
Website

Re: glz_custom_fields

I think I may have found the solution. I didn’t read through the entire topic, but it seems that there is a patch that constantly needs to be installed with every TXP update.

First, go here:
http://gist.github.com/49131

There is some PHP code on that page. Either download it or copy the code to your clipboard.

Launch your FTP client and log into the Textpattern directory of your website. Locate the publish.php file. Use your FTP client to edit the file or transfer it to your computer and open it in a text editing program like Notepad or TextEdit.

Find the chunk of code that has the getCustomFields() function. It’s near the end and is bordered by horizontal rules that are commented into the code.

Replace the entire function between the rules with the code you just copied from the web link above. Save the file, either as an edited file within your FTP client or onto your computer (make sure it’s still named publish.php). Transfer the newly edited file back into your textpattern directly to replace the old one.

Check to make sure everything’s running perfectly.

I think it has to do with getting Textpattern to look up custom fields beyond the originally allotted ten.

Just answered my own question (unless this was already stated elsewhere earlier, in which case, oops). Now at least I’m able to explain this to myself and any other non-engineering type.

Offline

Board footer

Powered by FluxBB