The Following 5 Users Say Thank You to jonquark For This Useful Post: | ||
|
2010-03-06
, 18:53
|
Posts: 159 |
Thanked: 27 times |
Joined on Sep 2009
@ Toronto
|
#2
|
|
2010-03-07
, 08:03
|
Posts: 77 |
Thanked: 181 times |
Joined on Nov 2009
@ Winchester, UK
|
#3
|
|
2010-03-10
, 18:02
|
|
Posts: 696 |
Thanked: 1,012 times |
Joined on Mar 2006
@ Asturies, Spain
|
#4
|
The Following User Says Thank You to yerga For This Useful Post: | ||
|
2010-03-10
, 20:21
|
Posts: 77 |
Thanked: 181 times |
Joined on Nov 2009
@ Winchester, UK
|
#5
|
Given Wordpress automatically creates smaller versions of uploaded photos, I'd rather the blog post included a smaller version which was a link to the full resolution version. (Wordpress currently does not create thumbnails for files uploaded from MaStory as MaStory doesn't report the mimetype for the image).
After a bit of investigation, I decided this wasn't possible without changes to Wordpress as well as MaStory.
So I've:
The way the patch works for MaStory, is that a select box is added to the bottom-right corner of the "HTML tags" window of the upload image dialog. From that select box, you choose: full size, thumbnail, medium or large. Full size gives you the current behaviour. If you choose a different size, instead of the plain img tag, something like this is inserted:
<a href="file:///home/user/MyDocs/DCIM/example.jpg"><img src="file(medium):///home/user/MyDocs/DCIM/example.jpg" /></a>
When the upload happens, assuming that the plugin is installed on the Wordpress blog, the file:// url is replaced by the full image and the file(medium):// tag is replaced by the medium scaled image.
There are a few things I want to discuss about this approach (hopefully Daniel Yerga will read this thread but other opinions from users/developers of MaStory are welcomed):
1) Are we happy extending MaStory in ways that only work if a plugin is installed in Wordpress (or some far future version of WP is used). (If the plugin isn't installed and the user tries to use this functionality, the image included in the post will be the full size image and it will link to the same image).
2) Is the bottom right corner of the "HTML tags" bit of the upload image the "right" place for the UI?
3) Most of the image options reset for each new image. I'll like this setting to persist indefinitely, presumably by adding an option to mastory.conf. Do people agree?
4) Is file(<size>):// urls the right way of denoting the resized images?
5) Anyone have other thoughts?