Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#469 2018-10-27 17:15:27

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,346
Website GitHub Mastodon Twitter

Re: smd_if: Generic multiple if condition tests

Hi Destry,
Just to let you know that you can also do what you are trying to achieve without a plugin.

<txp:variable name="capt" value='<txp:images id='<txp:custom_field name="article_image" />' /></txp:images>' />
<txp:if_variable name="capt" value="">
<txp:else />
<figcaption>
<txp:image_info id='<txp:custom_field name="article_image" />' type="caption" escape="tidy,textile" />
</figcaption>
</txp:if_variable>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#470 2018-10-27 17:56:11

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: smd_if: Generic multiple if condition tests

As usual, there are multiple roads to the doghouse.

I really need to learn those variable and evaluate tags better. I think I’ll go with the evaluate trick this time around.

Thank you.

Offline

#471 2020-01-12 10:18:26

Sunfoot
Member
From: Felanitx
Registered: 2009-02-07
Posts: 16
Website

Re: smd_if: Generic multiple if condition tests

Hello

Does this plugin work on Textpattern 4.8 Beta?

Admin-side theme: hive 4.8.0-beta
Active plugins:
smd_if-1.0.0

I get the warning message that it is not registered.
No idea what is wrong.
My php version is 7.2.10

Felix

Offline

#472 2020-01-12 10:27:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,224
Website GitHub

Re: smd_if: Generic multiple if condition tests

Huh. Swear I registered this plugin’s tags. I’ll get it done today and release it, sorry.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#473 2020-01-12 10:38:21

Sunfoot
Member
From: Felanitx
Registered: 2009-02-07
Posts: 16
Website

Re: smd_if: Generic multiple if condition tests

Bloke wrote #321047:

Huh. Swear I registered this plugin’s tags. I’ll get it done today and release it, sorry.

I love you!

Felix

Offline

#474 2020-01-12 23:56:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,224
Website GitHub

Re: smd_if: Generic multiple if condition tests

There you go. Try smd_if v1.0.0 which has the tag registered and a few other minor fixes.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#475 Today 10:56:31

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,554
Website GitHub Twitter

Re: smd_if: Generic multiple if condition tests

Hi Stef

When on testing mode i got those errors:
Erreur de balise : <txp:smd_if field=“postvar:ccom” operator=“undefined”> <p>Coucou</p> </txp:smd_if> -> Warning: Undefined array key “ccom” lors du traitement du module “Aucun” dans le gabarit “livre”

I use pluggin version 1.0 and txp 4.8.8 and php 8.0,
When switching to php 7.4 those errors disapear.

Thanks.

Offline

#476 Today 10:58:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,224
Website GitHub

Re: smd_if: Generic multiple if condition tests

Thanks for the report. Are you able to please add this is an Issue on the repo so I don’t lose track?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#477 Today 13:17:39

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,554
Website GitHub Twitter

Re: smd_if: Generic multiple if condition tests

The issue added.

Thanks stef.

Offline

Board footer

Powered by FluxBB