Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#325 2016-05-18 14:38:15
Re: smd_thumbnail: manage multiple thumbnails of your images
jakob wrote #299140:
a series of thumbnail sizes from small to large with specific dimensions or widths or shared aspect ratios.
Which is all marvellous stuff. Question is, how should the plugin cater for this? We need a way to specify image sets (even if it’s just a way to group existing profiles). A way to specify which images get stored under what conditions. We need a UI to support all that. And maybe a tag to help construct srcsets from a group? Anyone care to float some ideas on what this might look like and how it would hang together?
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
#326 2016-06-21 08:33:35
Re: smd_thumbnail: manage multiple thumbnails of your images
Oi Oi – did any batch upload plugin ever hook into your plugin Stef?
Offline
#327 2016-06-21 09:14:14
Re: smd_thumbnail: manage multiple thumbnails of your images
tye wrote #299890:
did any batch upload plugin ever hook into your plugin Stef?
Not that I know of. Someone else may know more.
EDIT: But if you have a multi-upload plugin such as abl_droploader, as long as it calls the standard Txp image creation functions (I’m not sure if it does, but most should) then smd_thumbnail will get called for every image that’s created and will then make the corresponding active thumb profiles.
Last edited by Bloke (2016-06-21 09:15:28)
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
#328 2016-06-22 00:11:25
Re: smd_thumbnail: manage multiple thumbnails of your images
Thanks Stef – I’m doing an upgrade to a site so will do some testing and let you know… if not, I’ll see if I can hook the 2 together – if so be prepared for some questions :)
Offline
#329 2016-09-10 21:44:40
Re: smd_thumbnail: manage multiple thumbnails of your images
New version 0.32 released for Txp 4.6.0+
Fixes a bunch of annoying bugs and quirks and improves the layout of the profile table, including making it collapse better on small screens. Sort of!
Please continue to report issues either here or directly on the bug tracker.
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
#330 2016-10-18 18:21:25
Re: smd_thumbnail: manage multiple thumbnails of your images
Just tried running 3.2 on 6.1. It seems to be working but I am getting this on the individual image screen.
Notice “Array to string conversion”
in /home/…/textpattern/lib/txplib_forms.php at line 273.textpattern/lib/txplib_forms.php:273 adminErrorHandler()
textpattern/lib/txplib_forms.php:307 fInput()
textpattern/include/txp_image.php:676 hInput()
textpattern/include/txp_image.php:65 image_edit()
textpattern/index.php:211 include()Notice “Array to string conversion”
in /home/…/textpattern/lib/txplib_forms.php at line 273.textpattern/lib/txplib_forms.php:273 adminErrorHandler()
textpattern/lib/txplib_forms.php:307 fInput()
textpattern/include/txp_image.php:735 hInput()
textpattern/include/txp_image.php:65 image_edit()
textpattern/index.php:211 include()
Offline
#331 2016-10-19 09:16:13
Re: smd_thumbnail: manage multiple thumbnails of your images
@michaelkpate: I don’t know if this is the plugin or not. Could you please try using the search box on the Image list panel, select some fields and perform any search, then try editing an image again. I think that might cure it.
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
#332 2016-10-19 14:14:44
Re: smd_thumbnail: manage multiple thumbnails of your images
I did a bit of experimenting. From the Images Tab
If I click on the ID#, I bring up the individual image screen without the error messages.
If I click on the Name, I bring up the individual image screen without the error messages.
If I click on the Thumbnail, I bring up the individual image screen with the error messages.
I disabled the plugin and went back to Images. I noticed that the Thumbnail no longer appears and therefore can not be clicked on. I enabled the plugin and saw the same thing.
I uploaded a new image and the same behavior occurred.
It doesn’t seem like this has a major impact but it does seem to be plugin-related.
Offline
#333 2016-10-19 14:20:03
Re: smd_thumbnail: manage multiple thumbnails of your images
michaelkpate wrote #302318:
If I click on the Thumbnail, I bring up the individual image screen with the error messages.
Aha! Thank you. Confirmed. I’ll get that fixed. In the meantime… uhhh avoid clicking the thumbnail to edit :-)
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
#334 2016-10-20 13:48:50
Re: smd_thumbnail: manage multiple thumbnails of your images
Bloke wrote #302319:
Aha! Thank you. Confirmed. I’ll get that fixed. In the meantime… uhhh avoid clicking the thumbnail to edit :-)
Another Update: I changed the default Thumbnail Profile to a different size. The error disappeared. I tried changing it to other sizes and it still doesn’t return.
Offline
#335 2016-10-27 02:21:59
Re: smd_thumbnail: manage multiple thumbnails of your images
Okay, so I am trying to get the public side to work now.
This is the error message I am getting:
Tag error: <txp:smd_thumbnail type="hero" class="single-post-img" /> -> Textpattern Notice: Unknown image while parsing form default on page articles
I know the image is set correctly because this works.
<txp:article_image class="single-post-img" />
No matter which profile I use I get the same error.
Edit: I solved it by following this advice.
<txp:images>
<txp:smd_thumbnail type="hero" class="single-post-img" />
</txp:images>
Offline
#336 2017-01-30 06:12:40
Re: smd_thumbnail: manage multiple thumbnails of your images
Not sure if this is me doing something wrong, or if the plugin has some slight issue TXP 4.7 / debug
That notice is repeated twice (for each <txp:smd_thumbail/>
call in the srcset
attribute
Tag error: <txp:smd_thumbnail type='hero-S' form='hero2-img-srcset' /> -> Notice: Undefined variable: alt while parsing form pw_hero-images_2 on page archive
textpattern/lib/txplib_misc.php(1802) : eval()'d code:1681 smd_thumb_img()
smd_thumbnail()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:558 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:502 processTags()
textpattern/lib/txplib_misc.php:4293 parse()
textpattern/publish/taghandlers.php:3541 parse_form()
images()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:558 Textpattern\Tag\Registry->process()
Inside the body of an article, I insert <txp:images id="xx" form="p-hero-image" />
.
The form (p-hero-image
) – it is basically the code posted by Maniqui:
xml
<figure itemprop="associatedMedia image" itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="url" content="<txp:image_url link='0' />">
<meta itemprop="width" content="<txp:image_info type='w' />">
<meta itemprop="height" content="<txp:image_info type='h' />">
<img alt="<txp:image_info type='alt' />" src="<txp:smd_thumbnail type='hero-M' display='url' />" srcset="<txp:smd_thumbnail type='hero-S' form='hero2-img-srcset' />, <txp:smd_thumbnail type='hero-M' form='hero2-img-srcset' />, <txp:image_url link='0' /> <txp:image_info type='w' />w" sizes="(min-width: 1524px) 1500px,(min-width: 768px) 800px,calc(100vw - 3em)">
<figcaption itemprop="caption">
<txp:image_info type="caption" />
</figcaption>
</figure>
The form called inside the <txp:smd_thumbail/>
xml
<txp:smd_thumbnail_info item="url" /> <txp:smd_thumbnail_info item="w" />w
Everything works right (I get the desired output), but for that Tag error / notice. My delicate sense of aesthetics is violently thrown off balance by this big error blocks at the top of the page :-(
EDIT
If I change my form slightly, modifying to calls in the scrset
attribute,
xml
srcset="<txp:smd_thumbnail type='hero-S'><txp:smd_thumbnail_info item="url" /> <txp:smd_thumbnail_info item="w" />w</txp:smd_thumbnail>, <txp:smd_thumbnail type='hero-M'><txp:smd_thumbnail_info item="url" /> <txp:smd_thumbnail_info item="w" />w</txp:smd_thumbnail>
I still get the error / notice:
Tag error: <txp:smd_thumbnail type='hero-S'> -> Notice: Undefined variable: alt while parsing form…
Last edited by phiw13 (2017-01-30 07:22:45)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Online