Textpattern Forum

You are not logged in. Register | Login | Help

#41 2012-08-01 22:01:06

etc
Plugin Author
Registered: 2010-11-11
Posts: 1,179
Website

Re: etc_query: all the things

You are welcome, but it’s midnight in Paris, I’m falling offline :)

Offline

#42 2012-08-02 07:55:33

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,034
Website

Re: etc_query: all the things

Hi, with txp 4.5 beta I am getting an error message now with the code used here (Actually my code is a bit different but the essentials are the same.)

Tag error:  <txp:etc_query data='<txp:variable name="imgnav" />'   query="a[@data-id='{?pic}']"> ->  Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given while parsing form “None” on page “pic”

Error both on v.0.9 and 0.98


TXPQ Examples and discussion of Textpattern CMS quality.

Offline

#43 2012-08-02 08:14:31

etc
Plugin Author
Registered: 2010-11-11
Posts: 1,179
Website

Re: etc_query: all the things

Hi Peter, are you sure to have the minimal required php version (5.3.8 – 5.3.10)?

Offline

#44 2012-08-02 08:21:11

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,034
Website

Re: etc_query: all the things

I have 5.3.5 on my local host. MAMP version.


TXPQ Examples and discussion of Textpattern CMS quality.

Offline

#45 2012-08-02 08:27:39

etc
Plugin Author
Registered: 2010-11-11
Posts: 1,179
Website

Re: etc_query: all the things

I have no MAMP to test at hand, sorry. You need at least 5.3.8 (5.3.10 on WAMP), is it possible to upgrade? etc_query uses very little of txp functions, it works on 4.5 for me.

Offline

#46 2012-08-02 09:45:26

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,034
Website

Re: etc_query: all the things

I’m confused re MAMP/WAMP versions. I thought that 5.3.5 came after 5.3.10 and that 5.3.10 came before not after 5.3.8 (because I thought 10 = 1 in these versions).

Anyway, I upgraded MAMP, now using PHP 5.4.4, and etc.query works fine and my problem is solved :-) Thanks!


TXPQ Examples and discussion of Textpattern CMS quality.

Offline

#47 2012-08-02 13:56:15

etc
Plugin Author
Registered: 2010-11-11
Posts: 1,179
Website

Re: etc_query: all the things

Version 0.98: respects php scripting settings and user levels. Enhanced range generation.

{Edited to move the plugin code to the first post – Uli}

Last edited by uli (2012-08-07 19:36:54)

Offline

#48 2012-08-02 14:00:20

progre55
Member
Registered: 2006-05-02
Posts: 642

Re: etc_query: all the things

etc:

Thanks again for your help. I am hoping you can assist one more time. The above works great, but now I am looking to include not only drop down selections, but also a multi select option for the end user. I use glz_custom_fields for the back end.

With drop downs, the url returns this: .../search?Color=Blue&Model=Honda&Price=25000

When I add a multi select field called “Features”, I get the following url: .../search?Color=Blue&Model=Honda&Price=25000&Features=XMRadio&Features=Moon+Roof

For the multi select, I am using this in the search form:

dropdowns ... drop downs ... drop downs ...

<INPUT NAME="Features" TYPE="CHECKBOX" <txp:if_variable name="Features" value="XMRadio">selected</txp:if_variable>value="XMRadio"> XMRadio<BR>2
<INPUT NAME="Features" TYPE="CHECKBOX" <txp:if_variable name="Features" value="Moon Roof">selected</txp:if_variable>value="Moon Roof">Moon Roof<BR>

The problem is that the the multi select returns nothing if I just select that and nothing else. If I use a drop down in combination with a multi select it also returns nothing. If I just use drop downs without the multi select everything works fine.

I am using the following form for the search results:

<txp:etc_query globals="variable" data="{?Model}{?Color}{?Price}{?Features}?">
  <txp:article_custom
    {$?({?Model}|Model='<txp:variable name="Model" />'|)}
    {$?({?Color}|Color='<txp:variable name="Color" />'|)}
    {$?({?Price}|Price='<txp:variable name="Price" />'|)}
    {$?({?Features}|Features='<txp:variable name="Features" />'|)}
  />
<txp:else />
  <txp:article />
</txp:etc_query>

I tried multiple variations, but it seems to ignore the multi select field.

Any suggestions would be great.

Thanks.

progre55

Last edited by uli (2012-08-07 19:33:33)

Offline

#49 2012-08-02 14:16:28

etc
Plugin Author
Registered: 2010-11-11
Posts: 1,179
Website

Re: etc_query: all the things

Could you please show me the output of <txp:variable name="Features" /> for .../search?Color=Blue&Model=Honda&Price=25000&Features=XMRadio&Features=Moon+Roof?

Offline

#50 2012-08-02 14:29:43

progre55
Member
Registered: 2006-05-02
Posts: 642

Re: etc_query: all the things

Can do, but where do I place this to show you — do I put it in my Search Form or my Search Results Form —-

Offline

Board footer

Powered by FluxBB