Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#193 2013-01-14 17:33:44
Re: smd_thumbnail: manage multiple thumbnails of your images
Try the updated smd_thumbnail 0.30 with today’s date against it and see if that resolves the width/height issue.
I’m now wondering if the force_size
attribute can be deprecated because you can get the same functionality by using the width/height attributes and setting them to empty ''
if you want to use the dimensions stored in the database, or use '0'
to omit one or the other value from the img tag.
Hmmmmm. I’ll leave it for now: if anyone can see a good reason for keeping it they can holler. If not, I’ll axe it.
Last edited by Bloke (2013-01-14 17:34:05)
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
#194 2013-01-14 17:52:31
Re: smd_thumbnail: manage multiple thumbnails of your images
What’s the deal with the titles?
title="Image=439 × 421 Profile=100 × 0"
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#195 2013-01-14 19:24:38
Re: smd_thumbnail: manage multiple thumbnails of your images
MattD wrote:
What’s the deal with the titles?
Ah, that was because someone mentioned that the tooltips on the admin side weren’t much use as it was difficult to tell what was the image’s actual size and the image’s profile size. So if there’s no caption associated with the pic, the default caption is the image data. Due to me using the same function for admin and public sides I guess the title is also showing there too huh? Pants.
Not the best thought through feature ever. Got any ideas on how it might be made more useful on both admin and public sides? Suppose I could make it a configurable string so at least you have a choice when using the default <img> tag. Of course you can always construct your own by using the <txp:smd_thumbnail>
tag as a container and using the <txp:smd_thumbnail_info />
tag to display image profile data..
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
#196 2013-01-15 00:41:24
Re: smd_thumbnail: manage multiple thumbnails of your images
Thanks Stef – the latest beta version you posted does omit the width and height:
<txp:smd_thumbnail type="medium" id="15" class="left" width="0" height="0" />
Returns:
<img src="/images/medium/15.jpg" url="/images/medium/15.jpg" alt="" type="medium" name="jonathan.jpg" author="jstubbs" date="2013-01-14 10:11:19" class="left" title="Image=800 × 600 Profile=0 × 0">
The title attribute is definitely not good. For example on client sites where smd_thumbnail
is virtually a required plugin (its awesome Stef!) we can’t really expect that clients will always enter caption data. On responsive sites, clients already have to add width="0"
and height="0"
and in my experience caption and title fields don’t get any data.
If it were me, by default I’d want just the required attributes to display unless specific attributes are entered in the tag construct. From the above, date
, type
and author
could go. For title
, maybe set it to the image name?
Offline
#197 2013-01-15 21:52:39
Re: smd_thumbnail: manage multiple thumbnails of your images
jstubbs wrote:
On responsive sites, clients already have to add
width="0"
andheight="0"
OK, so let’s take stock here. The original intent of <txp:smd_thumbnail>
was to be a drop-in replacement for <txp:thumbnail>
hence it behaves the same way with regards width and height. Now we have responsive sites — something that didn’t really exist when the original core thumbnail tag was written — does it make sense for smd_thumbnail to deviate from the core with regards image sizing so you have to set fewer attributes for the majority of cases?
If so, how should it work? Omit width
and height
unless you explicitly say “put them in the tag”? Thus images will always appear at the size they are uploaded / created and will scale if CSS dictates?
I appreciate I’ll probably never be able to make every user happy with a default <img>
tag (which is why I introduced container support so you could make your own if the default doesn’t suit) but I’d like to get to a stage where the default covers the majority of use cases in a logical manner. Ideas?
If it were me, by default I’d want just the required attributes to display unless specific attributes are entered in the tag
Eeek, that’s what it’s supposed to do. Introducing the container support fouled up my default <img>
tag. I’ve fixed it now so the only attributes allowed in the tag are alt
, title
, class
plus width
and height
. Subject to what comes out of the discussion of the above point regarding image sizes, the width and height may disappear by default.
Last edited by Bloke (2013-01-15 21:53:32)
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
#198 2013-01-16 01:09:48
Re: smd_thumbnail: manage multiple thumbnails of your images
I can see that users might want both scenarios when it comes to width
and height
– either no output at all for responsive sites or the actual width/height. Since its pretty easy to turn off width/height with width="0"
and height="0"
maybe it is better to leave it as-is.
Date/type/author – these should not be added to the tag unless explicitly placed in the tag IMO. I’m not sure if you took these attributes out in the latest beta version?
Offline
#199 2013-01-16 09:25:59
Re: smd_thumbnail: manage multiple thumbnails of your images
jstubbs wrote:
maybe it is better to leave it as-is.
OK, please try again and see if it’s any better. I’ve ditched the made-up title. If there’s no caption there’s no title.
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
#200 2013-03-08 09:40:45
Re: smd_thumbnail: manage multiple thumbnails of your images
Hi Stef ;)
You’re looking for. Now you’ve got it:
#@language fr-fr smd_thumb_actions => Actions smd_thumb_all_sizes => Toutes les tailles smd_thumb_all_thumbs => Créer smd_thumb_batch_legend => Créer/Recréer des vignettes smd_thumb_batch_preamble => Pour les profils actifs : smd_thumb_btn_pnl => Profils smd_thumb_btn_tools => Outils smd_thumb_btn_tools_prefs => Outils/Préf. smd_thumb_bySel => Sélectionnées smd_thumb_byCat => Par catégorie smd_thumb_byUsr => Par auteur smd_thumb_byAll => Tous smd_thumb_create => Création smd_thumb_create_group_confirm => Créer les vignettes pour TOUS les profils existant ? Les précédentes vignettes seront écrasées. smd_thumb_delete => Suppression smd_thumb_delete_confirm => Voulez-vous vraiment supprimer le profil {name} ? Les vignettes de ce type seront TOUTES supprimées. smd_thumb_image => Image= smd_thumb_new => Nouveau profil smd_thumb_prefs => Préférences smd_thumb_profile => Profil= smd_thumb_profile_deleted => Le profil "{name}" a été supprimé. smd_thumb_profile_exists => Le profil "{name}" existe déjà. smd_thumb_profile_heading => Profils de vignettes smd_thumb_profile_preftool_heading => Outils et préférences du vignettage smd_thumb_profile_tool_heading => Outils de vignettage smd_thumb_quality => Qualité (%) smd_thumb_sharpen => Rendre net smd_thumb_tables_not_installed => Tables non installées : essayez de réinstaller le plugin. smd_thumb_thumbnail_heading => Vignettes smd_thumb_txp_auto_replace => Recréer les vignettes au téléchargement des images : smd_thumb_txp_create => Créer smd_thumb_txp_create_from => Créer les vignettes à partir de : smd_thumb_txp_create_from_full => l'image originale smd_thumb_txp_create_from_thumb => la vignette smd_thumb_txp_default_sync => smd_thumb_txp_delete => Supprimer smd_thumb_upload => Remplacer les vignettes sélectionnées
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#201 2013-03-08 09:43:11
Re: smd_thumbnail: manage multiple thumbnails of your images
Pat64 wrote:
You’re looking for. Now you’ve got it:
Brilliant, thanks. Beta download updated with the new Textpack strings built in.
Last edited by Bloke (2013-03-08 09:47:16)
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
#202 2013-03-08 09:49:40
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_thumbnail: manage multiple thumbnails of your images
Thanks Pat (and Stef !)
Offline
#203 2013-03-08 09:53:04
Re: smd_thumbnail: manage multiple thumbnails of your images
@Stef: that’s always a pleasure, man. Thanks lot for your(s) plugin(s) ;)
Last edited by Pat64 (2013-03-08 09:53:19)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#204 2013-03-08 12:09:44
Re: smd_thumbnail: manage multiple thumbnails of your images
I’m investigating if I can use retina.js in combination of smd_thumbnail … !?
I’m using the plug-in already to make and insert a 480 × 300px ‘thumbnail’ in the body article.
The code (smd_macro):
<div id="slider" class="flexslider">
<txp:images id="{img_id}" wraptag="ul" break="li" class="slides">
<txp:smd_thumbnail type="{style}" />
</txp:images>
</div>
As far as I know I need a 960 × 600 as a high resolution image. So besides a type ‘main’ I need something like ‘main2’ for the retina images.
The problem is that the folder of ‘main2’ has another path. And retina.js is looking in ‘main’. This is true, not?
Are there people who have done this before? I need some help here.
BTW … there are many cons and pros to use or use not high resolution images already … would you think it’s really necessary if the images (jpg) are only 480 × 300px?
Last edited by RedFox (2013-03-08 12:52:49)
Offline