Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#373 2019-09-10 14:59:14

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

Re: smd_thumbnail: manage multiple thumbnails of your images

v0.5.1 is released

Changes, both courtesy of jakob:

  • Permit wraptag when outputting display="url".
  • Add quiet attribute to suppress missing image warnings.

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

#374 2019-10-23 07:01:08

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

(v 0.5.2 )
There seems to be some issue in the help file, tags sub panel, where there are unparsed <br /> littering the page.

For example:

add_stamp="boolean"<br />Adds the image file […]

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#375 2019-10-23 08:26:49

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

Re: smd_thumbnail: manage multiple thumbnails of your images

phiw13 wrote #319834:

issue in the help file, tags sub panel, where there are unparsed <br /> littering the page.

Drat, well spotted. Fixed in v0.5.3.

Thank you for the report.


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

#376 2021-02-14 11:10:39

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

smd_thumbnail (v0.6.1) doesn’t render from the original uploaded image anymore … !?

I don’t know why because some days ago the plug-in did it’s trick and as far I can see nothing has changed.

The diagnose file:

Textpattern version: 4.8.4 (2f3f94640923979749b3306700d012ea)
Last update: 2020-12-14 10:58:18/2020-11-29 15:45:21
Site URL: esmehofman.nl
Admin URL: esmehofman.nl/textpattern
Document root: /domains/esmehofman.nl/DEFAULT
$path_to_site: /domains/esmehofman.nl/DEFAULT
Textpattern path: /domains/esmehofman.nl/DEFAULT/textpattern
Article URL pattern: section_title
Production status: live
Temporary directory path: /.vsvar/tmp
PHP version: 7.4.7
GD Graphics Library: 2.2.5; Supported formats: GIF, JPEG, PNG, WebP.
Server timezone: Europe/Amsterdam
Server local time: 2021-02-14 12:10:19
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 1
Time zone (GMT offset in seconds): Europe/Amsterdam (3600)
MySQL: 5.5.5-10.2.25-MariaDB-10.2.25+maria~stretch-log (mariadb.org binary distribution) 
Database server time: 2021-02-14 12:10:19
Database server time offset: 0 s
Database server timezone: SYSTEM
Database session timezone: SYSTEM
Locale: nl_NL.UTF-8
Site / Admin language: nl / nl
Web server: Apache
Apache version: Apache
PHP server API: apache2handler
RFC 2616 headers: 
Server OS: Linux 5.4.22
Admin-side theme: hive 4.8.0
Active plugins: 
	adi_notes-1.4
	com_connect-4.6.0
	rah_change_passwords-1.0.1
	rah_function-0.7.1
	rah_replace-0.4.2
	smd_thumbnail-0.6.1
	stm_article_order-0.3.3 (modified)
	tom_image_grid-0.4.2

Pre-flight check: 
------------------------

Some Textpattern files have been modified: 
	/domains/esmehofman.nl/DEFAULT/textpattern/admin-themes/classic/classic.php, 
	/domains/esmehofman.nl/DEFAULT/textpattern/admin-themes/hive/hive.php, 
	/domains/esmehofman.nl/DEFAULT/textpattern/admin-themes/hive/assets/js/autosize.js, 
	/domains/esmehofman.nl/DEFAULT/textpattern/admin-themes/hive/assets/js/main.js, 
	/domains/esmehofman.nl/DEFAULT/textpattern/admin-themes/hiveneutral/hiveneutral.php, 
	/domains/esmehofman.nl/DEFAULT/textpattern/admin-themes/hiveneutral/assets/js/autosize.js, 
	/domains/esmehofman.nl/DEFAULT/textpattern/admin-themes/hiveneutral/assets/js/main.js
------------------------

.htaccess file contents: 
------------------------
# BEGIN Textpattern

#DirectoryIndex index.php index.html

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Enable the `FollowSymLinks` option below if it isn't already.
    #Options +FollowSymlinks

    #RewriteBase /relative/web/path/

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*) index.php

    RewriteCond %{HTTP:Authorization}  !^$
    RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

<IfModule mod_mime.c>
    AddType image/svg+xml  svg svgz
    AddEncoding gzip       svgz
</IfModule>

# For additional Apache-compatible web server configuration settings to enhance
# site performance and security, we recommend:
# https://github.com/h5bp/server-configs-apache/blob/master/dist/.htaccess

# END Textpattern

------------------------

[edit]

- Mirror site on same server with smd_thumbnail 0.5.0 and Txp 4.8.0 works fine. (www.esmehofman.nl/new)
- New install Txp 4.8.4 and downgrading smd_thumbnail to 0.5.3 on root (www.esmehofman.nl) gives no thumbnails … :(

Last edited by RedFox (2021-02-15 14:08:13)

Offline

#377 2021-02-22 02:41:28

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Odd warning when uploading images:

  • With the most recent changes to the Core image management (webp support).
  • Or is it PHP 8 that I need to blame? I had not yet uploaded images since setting that up.
Setup:
  • four profiles
  • one profile is the “default” thumbnail (checkbox checked),
  • Keep thumbnails in sync with default profile on: creation is checked

Upload an image, the following warning appears – in a popup, not the usual inline report:

Warning "chmod(): No such file or directory"
in /Users/[username]/Sites/test-site/textpattern/plugins/smd_thumbnail/smd_thumbnail.php at line 422.
adminErrorHandler()
textpattern/plugins/smd_thumbnail/smd_thumbnail.php:422 chmod()
textpattern/plugins/smd_thumbnail/smd_thumbnail.php:478 smd_thumb->write_image()
textpattern/plugins/smd_thumbnail/smd_thumbnail.php:314 smd_thumb_make()
textpattern/lib/txplib_misc.php:1578 smd_thumb_generate()
textpattern/lib/txplib_admin.php:599 callback_event()
textpattern/include/txp_image.php:815 image_data()
textpattern/include/txp_image.php:64 image_insert()
textpattern/index.php:228 include()

Images are uploaded correctly, thumnails created as instructed. And images and all associated thumbnails are deleted correctly when using the multi-edit widget on the list panel.

Both TXP 4.8.5-dev and 4.9.0-dev

(took me quite a while to figure why this happened, until I re-read the help file and un-checked the “keep in sync” option – and I am not sure which of the two possibilities are to blame)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#378 2021-02-24 02:52:18

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,196
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

phiw13 wrote #329011:

Odd warning when uploading images:

Seems to be a PHP 8 issue (8.0.1). Dreamhost now offers PHP 8.01, I have flipped that for the “live” playground. The issue can be reproduced there as well.

STR:

  • set one profile as the default (thumb)
  • in Setup, check “Keep thumbnails in sync with default profile on: Creation”

TXP 4.8.5. used in testing. Before switching to PHP 8.0 I tested with PHP 7.4 and had no issues.

–^–^–

NOTE – with TXP 4.8.5-dev, the Thumbnail profiles panel automatically closes when uploading images (one or more).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#379 2021-02-24 09:07:05

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

Re: smd_thumbnail: manage multiple thumbnails of your images

Thanks for the report. I’ll check this today in case it’s something we’ve done recently in core that’s affected it (but I expect it’s the plugin).


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

#380 2021-06-26 10:43:43

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Is this code for responsive images correct?

I have created this output form:

<figure>
<img src="<txp:smd_thumbnail type='ls-1024' display='url' id='<txp:yield name="id" />' />"
srcset="<txp:smd_thumbnail type='ls-0640' id='<txp:yield name="id" />' display='url' /> 640w,
<txp:smd_thumbnail type='ls-0768' id='<txp:yield name="id" />' display='url' /> 768w,
<txp:smd_thumbnail type='ls-1024' id='<txp:yield name="id" />' display='url' /> 1024w"
alt="<txp:image_info escape="" id="<txp:yield name="id" />" type="alt" />"
/>
<txp:image_info escape="" id="<txp:yield name="id" />" wraptag="figcaption" />
</figure>

And I use this shortcode in my articles to display the image and caption:

<txp::media_image id="47"/>

It works fine, but my solution is quite different from the samples by Bloke and maniqui…

Am I doing something ungodly, or is this OK?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#381 2021-06-26 10:49:06

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

Re: smd_thumbnail: manage multiple thumbnails of your images

Nothing wrong with it but if you want to neaten it up and remove the need for all the id="<txp:yield name="id" />" stuff, you could just drag the one image out via a <txp:images> tag instead. Untested but:

<txp:images id='<txp:yield name="id" />' wraptag="figure" limit="1">
   <img src="<smd::thumbnail type='ls-1024' display='url' />"
      srcset="<smd::thumbnail type='ls-0640' display='url' /> 640w,
      <smd::thumbnail type='ls-0768' display='url' /> 768w,
      <smd::thumbnail type='ls-1024' display='url' /> 1024w"
      alt="<image::info escape="" type="alt" />"
   />
   <image::info escape="" wraptag="figcaption" />
</txp:images>

Last edited by Bloke (2021-06-26 11:01:46)


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

#382 2021-06-26 10:55:15

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Bloke wrote #330717:

Nothing wrong with it but if you want to neaten it up and remove the need for all the id="<txp:yield name="id" />" stuff, you could just drag the one image out via a <txp:images> tag instead. Untested but:

<txp:images id='<txp:yield name="id" />' wraptag="figure">...

Oh, that is brilliant! So much cleaner.

I tested it and it works perfectly.

Thank you very much, Bloke!


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#383 2021-12-07 02:56:35

hidalgo
Member
From: Australia
Registered: 2008-02-05
Posts: 77
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I’m currently using Textpattern 4.8.8-dev and noticed that the thumbnail profile Quality () setting is ignored, and generates images at the default 75 quality only.

I’ve tested rolling back to 4.8.7 and the quality setting works correctly.

Offline

#384 2021-12-07 09:19:52

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

Re: smd_thumbnail: manage multiple thumbnails of your images

hidalgo wrote #332099:

I’m currently using Textpattern 4.8.8-dev and noticed that the thumbnail profile Quality () setting is ignored, and generates images at the default 75 quality only.

Intriguing. Thanks for the report. Will investigate.


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

Board footer

Powered by FluxBB