Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-01-03 16:56:18

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

article tag more comprehensive logic

Not sure if these are possible without a plugin like smd_if, but I think it’s about time the article tag allowed better logic with operators…

  • partial matches: contains="partial-value1, partial-value2"
  • not: myCustomField="!value1,!value2"
  • or: myCustomField1="value1" myCustomField2="value2" operator="or"

Offline

#2 2012-01-03 18:36:51

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: article tag more comprehensive logic

Well, boolean search logic is an issue inside TXP core search :)
Well, boolean OR search logic is missing everywhere :)
Well, boolean NOT search logic is missing everywhere :)

Core full text search logic at least covers partial matches.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#3 2012-01-03 19:19:53

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: article tag more comprehensive logic

Values really shouldn’t have special attributes, as it affects what you can use as value (or adds some very confusing escaping) and in some cases could cause potential security issues if the values are passed from a client. If anything, keywords and operators should be used with the attributes and handled by tag parser globally instead of by tag functions. I.e. as XML stylish attributes;

<txp:foo not:bar="value" />
<txp:foo or:bar="value1" or:bar="value2" />

Should be noted that both break backwards compatibility. In my opinion this should at most happen in the next major release, where hopefully the tag parser features tag registering ability, supports mapping classes (both static and non-static), class methods as tags, among other things. Magic tags ftw.

As far as partial searches go, these might need some optimization and improvements to indexing and generated queries. Ability to use different data types would be a start.

These very confusing attribute structures, delimiters and what have should be left to roaming plugins like rah_replace, rah_function, smd_wrap etc. Core has the ability to introduced seamless, standardized attribute structure, and functionality which would ideally be handled at the parser level.

Last edited by Gocom (2012-01-03 19:25:23)

Offline

#4 2012-01-03 21:47:26

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: article tag more comprehensive logic

Yeah, I was just getting tired of using the article tag as a big dumb “present everything” tag then using smd_if to sort it all out.

I thought perhaps some of that advanced functionality mi ht be useful to others out of the box. But you certainly wouldn’t want it to break backwards compatibility.

Last edited by mrdale (2012-01-03 21:47:47)

Offline

#5 2012-01-03 22:46:19

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,611
Website

Re: article tag more comprehensive logic

Yes, filtering a too large set of results also buggers up pagination. While it’s not an answer to your query, would soo_article_filter be of any help with this scenario. IIRC it comes at the cost of an extra query though.

Last edited by jakob (2012-01-03 22:46:30)


TXP Builders – finely-crafted code, design and txp

Offline

#6 2012-01-04 21:27:37

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: article tag more comprehensive logic

I use TxP hack for it.
This hack goes beyond the concept TxP, but it allows to optimize sql queries and can not install the extra plugins.

Upd: plugin aks_article see attribute where

Last edited by makss (2016-03-25 05:59:13)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

Board footer

Powered by FluxBB