Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2008-01-16 17:02:04

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: glz_custom_fields

Logoleptic.

Thanks for the bug report (and fix) relating to upm_file_popper.
Worked like a charm.

Cheers!

Tom

Offline

#92 2008-01-16 18:13:33

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: glz_custom_fields

renobird wrote:

Logoleptic.

Thanks for the bug report (and fix) relating to upm_file_popper.
Worked like a charm.

I’m glad you found it helpful. :-)

Offline

#93 2008-01-21 06:25:08

shi
Member
Registered: 2005-12-09
Posts: 34

Re: glz_custom_fields

Hello everyone,

I’ve read in this thread that it’s possible to use attributes of <txp:article_custom /> with this plugin, but I have a problem to make it work. I want to use different section. Am I doing something wrong?

<txp:glz_custom_fields_article section=“some-section” form=“some-form” />

The second thing I wanted to ask is: Can I forbid this plugin to sort values of a custom field by name?
I have a custom field with radio buttons: Mon, Tue, Wed, Thu, Fri, Sat, Sun and I don’t want them sorted by alphabet order, but the plugin sorts them out automaticly.

Offline

#94 2008-01-21 11:09:32

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

Re: glz_custom_fields

shi wrote:

I’ve read in this thread that it’s possible to use attributes of <txp:article_custom /> with this plugin, but I have a problem to make it work. I want to use different section. Am I doing something wrong?

It’s not clear what you are trying to accomplish. Maybe you have read that you can use <txp:custom_field /> instead?. For your question simply use <txp:article_custom section=“some-section” form=“some-form” />

The second thing I wanted to ask is: Can I forbid this plugin to sort values of a custom field by name?
I have a custom field with radio buttons: Mon, Tue, Wed, Thu, Fri, Sat, Sun and I don’t want them sorted by alphabet order, but the plugin sorts them out automaticly.

Unfortunately no. This question has already been answered before. I think the only solution is to rename your fields as “1-mon”, “2-tue” and so on.

Last edited by redbot (2008-01-23 15:03:39)

Offline

#95 2008-01-22 14:01:31

shi
Member
Registered: 2005-12-09
Posts: 34

Re: glz_custom_fields

redbot wrote:

It’s not clear what you are trying to accomplish. Maybe you have read that you can use instead?. For your question simply use

Thanks for response, sorry if I was confusing… What I’m trying to do, is to use glz_custom_fields on a multilingual website. I want to output same articles (with custom fields) on a different section/language, so I guess I need to use 2 different code snippets. The code you provided doesn’t help because I need to target results trough dropdown selection list.

All my articles with custom fields are written in section “products”. I have used: <txp:glz_custom_fields_article form=“some-form” /> and that worked fine on that section.
But, is it possible to get same results (output) when I’m looking the website from different section/language?

The logical way to me, seemed to add the attribute section=“products” to the above code, but I don’t get any results. Maybe I misunderstood that glz_custom_fields can use that attribute.

Any help on this?

Unfortunately no. This question has already been answered before. I think the only solution is to rename your fields as “1-mon”, “2-thu” and so on.

I think I’m gonna use 7 different custom fields with 1 radio button for each :)

Offline

#96 2008-01-22 17:06:54

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

Re: glz_custom_fields

shi,
sorry, today I must be dumber than ever because I still have some problems to understand what you mean…
Anyway keep in mind that the <txp:glz_custom_fields_article /> tag accepts the same attributes of the <txp:article /> tag so it can’t accept a “section” attribute.
Also consider that the <txp:glz_custom_fields_article /> tag is meant to show the results of a search performed by the <txp:glz_custom_fields_search_form /> tag (in which you can set a “results_page” attribute to specify which section you want your results to appear).
I have not enough informations to suggest a solution to your problem. Are you using the Multi-Lingual Publishing Pack (in this case I can’t help cause I never used it)?
Is the “products” section used by both languages? Maybe you could create two “products” sections (one for each language).
As for your second question why create 7 custom fields with 1 radio button for each when you can use one custom field with 7 radio buttons?

Offline

#97 2008-01-23 13:33:23

shi
Member
Registered: 2005-12-09
Posts: 34

Re: glz_custom_fields

hehe, maybe I’m the one who’s not that good at explaining in English :)

Anyway, I’ve found some solution for my problem. Yeeey… Actually, I have used the plugin hack you posted earlier.

$section = (!$section) ? ‘’ : “ and Section = ‘”.doSlash($section).”’”;
replace with
$section = ‘’;

It helped me to output results from glz query on any result_page, but the result_page listed articles from all sections by default, so I had to use <txp_if_custom_field name=“my_custom_field”> in article form to limit the results, to show only articles with my_custom_field in it.

Anyway keep in mind that the <txp:glz_custom_fields_article /> tag accepts the same attributes of the <txp:article /> tag so it can’t accept a “section” attribute.

Too bad. Thanks for clarifying that.

Also consider that the <txp:glz_custom_fields_article /> tag is meant to show the results of a search performed by the <txp:glz_custom_fields_search_form /> tag (in which you can set a “results_page” attribute to specify which section you want your results to appear).

That was the key of my problem. Articles have to be written in the same section as the result_page section in order to apear in it. If I need to use the same results on the new_section, I would have to make new entries with the section set to new_section. Fortunately, your hack worked well for this.

As for your second question why create 7 custom fields with 1 radio button for each when you can use one custom field with 7 radio buttons?

If I use 7 radio buttons checkboxes in 1 custom field, as I mentioned before, plugin would sort values aphabetically. Both in admin interface (textpattern/write), and on a website, and I want to avoid that… And if I use 7 different custom fields, I can set their output by changing the article form. I guess it’s possible to hack the plugin itself not to sort values by name, but I’m not that good at PHP.

Thanks alot again. Cheers.

———

edit: I’m so retarded… Whole this time I’m writing about radio buttons, but actually thinking of checkboxes…

Last edited by shi (2008-01-28 09:33:06)

Offline

#98 2008-01-23 15:24:23

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

Re: glz_custom_fields

shi wrote

Thanks alot again. Cheers.

no problem ;)

If I use 7 radio buttons in 1 custom field, as I mentioned before, plugin would sort values aphabetically. Both in admin interface (textpattern/write), and on a website, and I want to avoid that… And if I use 7 different custom fields, I can set their output by changing the article form. I guess it’s possible to hack the plugin itself not to sort values by name, but I’m not that good at PHP

well, as usual I don’t understand. Anyway if you are happy with this solution I’m happy too. Cheers!

Offline

#99 2008-01-30 16:05:41

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: glz_custom_fields

To fix for 4.0.6, edit the plugin and replace the contents with the following.

Edit:

Link to pastebin fix was removed by ruud. If you need the fix and cannot wait for the next release, email me.

Last edited by Manfre (2008-02-01 15:25:11)

Offline

#100 2008-01-30 16:11:36

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: glz_custom_fields

Thanks Manfre, that works – as if you didn’t know it :)

Offline

#101 2008-01-30 16:24:04

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

Re: glz_custom_fields

Manfre, I don’t know whether you realized, but you’ve posted the entire plugin on pastebin, anyone can get it for free… Could you please remove it?

I will incorporate your changes in v 1.1 and release it to the ones that paid for it this weekend.

I know I haven’t been around lately, but work is more than crazy, I don’t have time for anything else!

Sorry for everyone that has been waiting for that 1.1 update, it will DEFINITELY happen this weekend.

Cheers guys, Gerhard.

Offline

#102 2008-01-30 19:53:28

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: glz_custom_fields

See FAQ
Textpattern plugins should be distributed under a GPL-compatible license. You can still ask money for it, btw, because that’s perfectly okay.
Which license are you using for your plugin?

edit: Note that this post is not intended in a negative way (before this turns into a flame war). See also my post below. I’m mainly interested in knowing which license is used.

Last edited by ruud (2008-01-30 20:41:18)

Offline

#103 2008-01-30 20:18:02

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: glz_custom_fields

Sorry for everyone that has been waiting for that 1.1 update, it will DEFINITELY happen this weekend.

Will this new version be able to work together with sed_section_fields?

Offline

#104 2008-01-30 20:21:12

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: glz_custom_fields

Hey Jukka, tone it down a tad mate.

Offline

#105 2008-01-30 20:27:11

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: glz_custom_fields

Jukka wrote (and then removed his post):

And because you have released your plugin, you also must provide it as free

No, that’s not true. If he’s using a GPL license (modified BSD is possible as well, as are several other licenses) he only has to provide the sources of the plugin to the people he sells it to. With plugins that’s a no-brainer, really, because if you have the plugin, you also have the source code.

However, given the fact that a GPL compatible license is needed to distribute plugins for use with TXP (as stated in the FAQ), people who have received the plugin are free to re-distribute as happend with zem_redirect. With zem_redirect that only happened when the original author no longer offered it for download. If it’s a nice plugin, reward the author for his work.

And so must you provide it, if I want it.

Also not true. He can choose to distribute the plugin to whoever he wants.

Last edited by ruud (2008-01-30 20:38:52)

Offline

Board footer

Powered by FluxBB