Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#361 2021-01-30 12:42:08

etc
Developer
Registered: 2010-11-11
Posts: 4,512
Website GitHub

Re: etc_query: all things Textpattern

A small PHP 8 compatible update.

Offline

#362 2021-01-30 17:07:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,724
Website GitHub Twitter

Re: etc_query: all things Textpattern

etc wrote #328420:

A small PHP 8 compatible update.

Does it also work on php 7.x?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#363 2021-01-30 17:13:20

etc
Developer
Registered: 2010-11-11
Posts: 4,512
Website GitHub

Re: etc_query: all things Textpattern

colak wrote #328425:

Does it also work on php 7.x?

It should work on any php 5.3.10+. Its own home is on php 5.4.8.

Offline

#364 2021-01-30 17:49:58

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,724
Website GitHub Twitter

Re: etc_query: all things Textpattern

Thanks so much Oleg,
I’ll install it and report if there are any issues.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#365 2021-05-16 19:20:01

etc
Developer
Registered: 2010-11-11
Posts: 4,512
Website GitHub

Re: etc_query: all things Textpattern

Version 1.4 is released. Main news:

  • added ini markup, to import ini-formatted arrays;
  • added sort attribute, to order (flat) multi-dimensional arrays by one or several fields.

Offline

#366 2021-05-19 16:26:43

etc
Developer
Registered: 2010-11-11
Posts: 4,512
Website GitHub

Re: etc_query: all things Textpattern

Version 1.5 is available. Main news:

  • empowered sort attribute for ordering multi-dimensional (sub-)arrays by several fields.
  • chainable markup attribute, to enable customizable mixed markups.

Example:

<txp:variable name="winners">
name=Alice
age=11
place=2
--
name=Bob
age=9
place=2
--
name=Cindy
age=10
place=1
</txp:variable>

<txp:etc_query data='<txp:variable name="winners" />'
    markup="list:--, ini"
    sort="[place|age<nat]"
    wraptag="ol" break="li"
>
    {name?} ({age?} years old)
</txp:etc_query>

outputs

  1. Cindy (10 years old)
  2. Bob (9 years old)
  3. Alice (11 years old)

Offline

#367 2021-06-15 14:44:44

etc
Developer
Registered: 2010-11-11
Posts: 4,512
Website GitHub

Re: etc_query: all things Textpattern

Version 1.5.1 is CSV-import-able, thanks to Stef for a possible use case (wrap it into etc_cache if needed):

<txp:etc_query markup="csv" url=".../export?format=csv" wraptag="table">
{$doWrap($|tr|td)}
</txp:etc_query>

Offline

Board footer

Powered by FluxBB