Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#157 2021-04-01 17:45:32

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: smd_random_banner: Random banner image for advertising

Thanks so much for your quick replies!

In case anyone else comes across this replacing line 336 of smd_random_banner.php with:

$objOut = (($thumb) ? thumbnail($imgOptions) : thumbnail($imgOptions + array('thumbnail' => false)));

Worked like a charm (at least for now…)

I couldn’t get the ProcessTags… to work, but that’s probably just because I didn’t know what I was doing there.

Offline

#158 2021-04-01 21:08:49

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

Re: smd_random_banner: Random banner image for advertising

visualpeople wrote #329635:

I couldn’t get the ProcessTags… to work, but that’s probably just because I didn’t know what I was doing there.

You must convert $imgOptions to string:

processTags('image', join_atts($imgOptions));

Offline

#159 2021-04-01 21:30:13

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: smd_random_banner: Random banner image for advertising

Even better! Thanks so much.

Offline

#160 2021-04-02 10:31:13

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

Re: smd_random_banner: Random banner image for advertising

It will be possible (and better) to directly pass arrays to processTags() in 4.8.6:

processTags('image', $imgOptions);

Offline

Board footer

Powered by FluxBB