Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#961 2021-07-18 09:58:22

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: smd_gallery: super-flexible gallery generator

hi!

after upgrade to 4.8.7 i get error:

<b>Deprecated</b>:  Methods with the same name as their class will not be constructors in a future version of PHP; smd_MLP has a deprecated constructor in <b>/data02/virt34253/domeenid/www.arrakis.ee/htdocs/textpattern/plugins/smd_lib/smd_lib.php</b> on line <b>5</b><br />

PHP 7.4.2

Offline

#962 2021-07-18 10:39:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: smd_gallery: super-flexible gallery generator

Try the latest version of smd_lib.


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

#963 2021-07-18 11:03:31

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: smd_gallery: super-flexible gallery generator

Bloke wrote #331054:

Try the latest version of smd_lib.

that helped, thank you!

Offline

#964 2023-12-24 05:25:10

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: smd_gallery: super-flexible gallery generator

Happy holidays, peeps!

After some procrastination, I finally updated the last of my websites to TXP 4.8.8.

This has caused some article_image links to break.

Individual articles do render single article_images. An article_custom list sometimes does not.

The most likely reason is that I have multiple article images on occasional articles for a slideshow, separated by @.

 6027 @ 6028 @ 6029 @ 6030 @ 6031 

When I look at a particular article, it still renders as a js slideshow, thanks to some clever delim=“@“ type suggestions by Bloke as part of the smd_gallery plugin. That is working in 4.8.8 as it has forever, with the slideshow doing its thing.

<txp:smd_gallery category="landing" 
    delim="@" paramdelim="|" collate="1" limit="4" sort="random"
     combo='sc_img| { url: "{url}", description: "{caption}" }'>
        images: [ {sc_img} ],
</txp:smd_gallery>

That’s great that this still works a decade later, going from 4.2 to 4.8.8.

However . . .

There’s another circumstance with an article_custom list. This has the title and excerpt but now has a broken image link.

<txp:article_custom limit="1" section="gear" sort="rand()" form="gear_list" />

The article image part of the gear_list form that is not rendering:

<div class="align-center"><txp:permlink><txp:article_image width="450px" height="208px" thumbnail="1" /></txp:permlink></div>

This used to produce a single image, the lowest ID number, no matter how many article images there were for an article. Now I get a broken link.

It looks like 4.8.8 chokes on the multiple article images.

I’m wondering how I can add limit=“1” to the article image to just get it to render the first image and ignore the @.

When I think about it, there are 100s of instances of articles with multiple article_images.

Any help gratefully accepted.

Last edited by detail (2023-12-24 05:28:23)

Offline

#965 2023-12-24 08:33:54

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: smd_gallery: super-flexible gallery generator

Did it again, sorry :-) The idea was to allow for URLs (like https://example.com/my_image.png) in article image, but this has broken hacks. Will see how to patch it in 4.9.

Meanwhile, you can try the following:

<txp:image id='<txp:custom_field name="article_image" breakby="@" limit="1" />'
    width="450px" height="208px" thumbnail="1" />

If needed, you can add sort="rand" to <txp:custom_field /> attributes. Hope that helps.

Offline

#966 2023-12-27 08:22:20

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: smd_gallery: super-flexible gallery generator

etc wrote #336219:
<txp:image id='<txp:custom_field name="article_image" breakby="@" limit="1" />' 
width="450px" height="208px" thumbnail="1" />

Hey thanks for the prompt response with this obscure question on a remote corner of txp.

I’ve been visiting family and travelling, so will test this tomorrow.

Let you know how it goes, but that looks plausible!

Cheers

GJ in New Zealand

Offline

#967 2023-12-28 05:28:59

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: smd_gallery: super-flexible gallery generator

etc wrote #336219:

Hope that helps.

Sure does.

A Christmas treat.

Thanks, etc.

Amazing that my 1500+ page/6000+ image website is still chugging along 13 years later with only minor tweaks required.

Says something about the logical architecture of TXP. And the considerable efforts of The Team to maintain things.

Last edited by detail (2023-12-28 05:29:24)

Offline

Board footer

Powered by FluxBB