Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#91 2011-01-12 13:27:36
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_thumbnail: manage multiple thumbnails of your images
:-)))))))))))))))))))))
Last edited by jpdupont (2011-01-12 13:28:12)
Offline
Re: smd_thumbnail: manage multiple thumbnails of your images
Having a small issue with existing images – when a user changes an already existing image. There are two smd_thumbnail profiles and both are active, set to keep TXP thumbnails in sync with default profile on creation.
When the user edits the photo, the thumbs appear correctly in the individual image tab, but on the public side the result is a 404 – not sure why. If I recreate the thumbnails the image is displayed correctly on the public side. Odd!
Offline
Re: smd_thumbnail: manage multiple thumbnails of your images
jstubbs wrote:
When the user edits the photo, the thumbs appear correctly in the individual image tab, but on the public side the result is a 404
Very confusing. I can’t replicate the 404 behaviour here. I’ve tried replacing an individual thumbnail, the default thumbnail, the entire image, and just altering some text (e.g. the caption) on an image. Each time I refresh the public side I see the correct thumbs (I’m using <txp:smd_thumbnail /> and <txp:article_image thumbnail="1" />) except when I replace the individual thumbnail of the default profile. If I do that then the TXP thumb remains at the old thumbnail. This is a bug, but it doesn’t result in a 404, just a stale thumbnail being displayed.
Hmmmm. I wonder why you’re getting a 404. It could be related to the odd behaviour when replacing a thumbnail. I’ll look into fixing that. In the meantime if you can show me some code to allow me to replicate your setup on my server (perhaps it’s the way your conditionals are set up which is breaking the logic, assuming this is the same code you posted earlier on this thread?) or you can tell me exactly how the user is editing the photo (reupload of main image, changing alt/caption, just uploading a new thumb, etc) then it might help me track this down. Ta!
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_thumbnail: manage multiple thumbnails of your images
Hey Stef. Not sure of the exact method the client is using, but here is the code used for the individual pages. You can see the result in the URL I sent you by email.
<txp:if_article_image>
<txp:images break="">
<li><a class="thumb" name="<txp:image_info type="name" />" href="<txp:image_url />" title="<txp:image_info type="name" />"><img src="<txp:image_url thumbnail="1" />" alt="<txp:image_info type="alt" />" /></a>
<div class="caption">
<div class="image-desc"><txp:image_info type="caption" /></div>
</div>
</li>
</txp:images>
</txp:if_article_image>
Not sure what’s going on here. I did try several alternatives, but no cigar.
Offline
#95 2011-01-21 07:23:30
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_thumbnail: manage multiple thumbnails of your images
… I’ll try and have a working version out next week. Poke me if it doesn’t appear. …
Hello Stef !
With the big good news for TXP5, not the time to release the new working version ?
Jean-Pol
Offline
Re: smd_thumbnail: manage multiple thumbnails of your images
jpdupont wrote:
With the big good news for TXP5, not the time to release the new working version ?
On the contrary actually. I had a working version last Sunday which I mailed out to a few people. Had one response back so far (it works, yay!) but I was waiting for the others in case I missed something.
Tell you what, drop me an e-mail and I’ll send you back a copy of what I have so far and you can see if it works for you.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#97 2011-01-21 15:01:11
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_thumbnail: manage multiple thumbnails of your images
Thanks, e-mail sent !
Offline
Re: smd_thumbnail: manage multiple thumbnails of your images
Hey Stef – this is a great plugin, I’m loving it :)
I have a few questions though (as always) :)
1 – Is is possible to combine smd_thumbnail with Multiple Image Upload so all the thumbs are created on upload? :)
2 – If that is not possible, my client is uploading up to 50 images per article, the total images on the site could well exceed 5000!!
a) Would using “Create All” cause a monumental break down of my server?
b) How about a “Create Missing Thumbnails”?
c) Help – any other image ideas on this?
On a plus note, after a quick read of your docs, my limited use of the new images tags and some custom field love – I managed to make a new colorbox gallery in around 5mins – perfect :)
Offline
Re: smd_thumbnail: manage multiple thumbnails of your images
tye wrote:
Hey Stef – this is a great plugin, I’m loving it :)
Thanks. ‘tis useful.
Is is possible to combine smd_thumbnail with Multiple Image Upload so all the thumbs are created on upload?
Sadly not yet. I’d need to talk with the authors of those plugins (or just spend some time understanding the code) so we could come to some agreement. Perhaps I could put a callback in my plugin so authors of multi-image uploaders can call the thumbnail creation process (somehow, not sure how yet). Alternatively the authors of those plugins could maybe add a callback so smd_thumbnail could hook into the upload process such that each time an ‘insert’ is done, it calls smd_thumbnail to create the thumbs for the active profiles.
Not sure which is best. At the moment the plugin is only triggered on the Images tab and on the Image Edit tab when you interact with the controls.
the total images on the site could well exceed 5000!! Would using “Create All” cause a monumental break down of my server?
Not at all. It does it by AJAX so it only processes one request at time, in real-time as you watch the counter go up. If you’re in any way concerned though, you can always do it by category or a page at a time using TXP’s ‘Select All’ and then Create by selection. Or you could disable some profiles so you’re only creating maybe one thumb profile at a time.
How about a “Create Missing Thumbnails”?
Maybe an option in future. At the moment it does recreate them if they already exist so I suppose I could add an option to silently skip images that are already there. Leave it with me.
On a plus note, after a quick read of your docs, my limited use of the new images tags and some custom field love – I managed to make a new colorbox gallery in around 5mins – perfect :)
That’s the spirit! Glad it worked out for you.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#100 2011-02-08 11:31:08
Re: smd_thumbnail: manage multiple thumbnails of your images
Thanks Stef – I knew the Multiple image upload was a stab in the dark – but you gotta ask :)
“Create by selection” – I don’t see that using v0.14 – where is it?
That would negate the need for “Create Missing Thumbnails” I think
Offline
#101 2011-02-08 11:35:39
Re: smd_thumbnail: manage multiple thumbnails of your images
tye wrote:
“Create by selection” – I don’t see that using v0.14 – where is it?
D’oh! It’s in v0.20 which I thought I’d released but haven’t. Give me a few minutes…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#102 2011-02-08 11:45:20
Re: smd_thumbnail: manage multiple thumbnails of your images
Belatedly released v0.20. Features:
- Tools / prefs separated from profile list
- Permitted batch creation via 1) selected images 2) category 3) author (thanks jpdupont)
- Added smd_thumb_auto_replace option and altered default behaviour (thanks maniqui)
- Fixed TXP thumbnail creation on thumbnail replace and made prefs global — and only available to site admins (all thanks jstubbs). NOTE: your existing prefs will be lost on upgrade so please visit the tools/prefs to reset them. Sorry, but there’s no other way to be sure the settings are set to their true ‘global’ nature
- Fixed New Profile button wrapping (thanks jpdupont)
Hope this version helps more people out. Let me know how you get on. jpdupont and others who have betas, please upgrade to this version as I may have fixed a few other niggly little things since you had your copies.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#103 2011-02-08 11:58:13
Re: smd_thumbnail: manage multiple thumbnails of your images
Stef – have you got 4 pairs of hands?
Thanks mate – that totally solves my problem :)
This plugin just got even better :)
Offline
#104 2011-03-01 01:29:03
Re: smd_thumbnail: manage multiple thumbnails of your images
Is there a way to output just the thumbnail url? For now I’m doing
<txp:site_url/>images/slide-show/<txp:image_info type="id"/><txp:image_info type="ext"/>
Where slide-show is the thumbnail profile.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#105 2011-03-02 11:41:43
Re: smd_thumbnail: manage multiple thumbnails of your images
thanks so much for this plugin! it’s excellent, excellent.
Offline