Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
lam_image_uploader v0.6c (improved upload images from the write tab)
lam_image_uploader
download here: lam_image_uploader v0.6c
Allows you to upload images via the Write tab. Based on stm_image_uploader but with a few improvements including:
- automatically appending image id to article
- or: show a text link to manually attach id to article
- or: show a text link to manually append multiple ids to article
- ability to display thumbnail (important: in order for thumbnail to show up you need to have specified a size for thumbnails in image tab)
- assign image category on upload
- assign caption on upload
- move the upload form to the left sidebar instead of below the excerpt(important: your thumbnails will be resized by the browser to a width of 150px. this is ugly but currently a temporary solution so as to not wreck your write screen if your thumbnail sizes are relatively large)
- installable/removable preferences for all of the above
the alt input field stays because you need that to validate anyway.
Changelog
0.6c – issue where you sometimes have to ‘log in’ again to see the upload form should be fixed now
0.6b – got rid of some homebrew functions and now relies on more reliant cross-browser library jquery. improved some minor styling issues as well
0.6 – changed caption input to textarea (thanks mrdale)
0.5b – whoops went a little too far with the lang file. should fix some installation issues on non-english txp installs
0.5 – updated to use localised lang file (let me know if i missed anything)
0.4 – added ability to move upload form to left sidebar
0.3 – fixed a silly typo causing “Attach Article Image” link not to work.
0.2 – added “Append Article Image” ability (ala upm_img_popper) to allow for multiple article image id insertion (must upload an image each time though of course)
0.1 – initial release
Screenshots
(edit: i have no idea what this image was and why it was removed. i’m sure the other screenshots should be more than self explanatory though)
preferences (admin -> extensions -> lam_image_uploader)
Installation
Once plugin is installed, head over to admin -> extensions and install the preferences first. They will be stored in your database. You can also remove the preferences at any time by returning to the same page. Then feel free to play around with the settings.
TODO/BUGS
- Styling could definitely still be improved upon. If anyone wants to toy around with it, by all means. at the moment, everything just sorta sits on top of each other.
- make viewable thumbnail’s dimensions configurable via preferences (currently hardcoded to display your thumbnail at 160px if you choose to display the upload form in the left sidebar. although this really is just browser resizing and will look ugly unless you’re running safari or until firefox 3 officially comes out with better image rendering. if anyone has a better idea on how to control the size i’m all ears)
- if you choose to have the upload form in the left sidebar and you have really long categories, it’ll probably mess up the layout. i could either truncate the category names or supply a fixed width via css, none of which are good cross-browser solutions. (IE of course messes up the css method and truncates the names anyway while FF doesn’t).
Credits
Stanislav Müller for the original stm_image_uploader plugin.
original thread for stm_image_uploader
mary and bastian for unknowingly allowing me to peek at their various plugins to see how plugin preferences were installed/uninstalled via the backend.
Tested
- FF 2.0.1.1, Safari 3.04 beta, Opera 9.24, IE6, IE7
Last edited by iblastoff (2009-06-01 22:33:03)
Offline
#2 2007-12-27 11:16:45
- Joey
- Member
- From: Netherlands
- Registered: 2005-01-19
- Posts: 257
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
Great plugin, thanks!
Regards,
Joey
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
Niiiiiice. Works very well, many thanks for your hard work.
A few tiny things:
- When used in conjunction with glx_admin_image the thumbnails don’t show up. This is just a FYI, as I think it’s more to do with the fact you have to explicitly hit “Save” in the Images tab before the thumbs are generated when that plugin is installed. I’m sure the thumb generation works fine if glx_admin_image is disabled. People who use glx_admin_image and your plugin are likely mutually exclusive groups anyway I should think
- I’d second an option to use the left side bar if the fields could somehow be squashed to fit without too much detriment to usability. As maverick said, zem_event takes up a lot of space in the central column
- If you can harness jQuery for the javascript insertion (look at the
.html()
or.append()
calls for starters) you might save yourself a tonne of DOM calls!
This is a vastly improved workflow for quickly authoring articles. I’m off to play.
You da man!
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
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
Bloke wrote:
Niiiiiice. Works very well, many thanks for your hard work.
A few tiny things:
- When used in conjunction with glx_admin_image the thumbnails don’t show up. This is just a FYI, as I think it’s more to do with the fact you have to explicitly hit “Save” in the Images tab before the thumbs are generated when that plugin is installed. I’m sure the thumb generation works fine if glx_admin_image is disabled. People who use glx_admin_image and your plugin are likely mutually exclusive groups anyway I should think
- I’d second an option to use the left side bar if the fields could somehow be squashed to fit without too much detriment to usability. As maverick said, zem_event takes up a lot of space in the central column
- If you can harness jQuery for the javascript insertion (look at the
.html()
or.append()
calls for starters) you might save yourself a tonne of DOM calls!
This is a vastly improved workflow for quickly authoring articles. I’m off to play.
You da man!
thanks bloke! to address your tiny things:
- i also use glx_admin_image and the thumbnails seem to show up just fine for me. as long as your images tab is set up to automatically generate a thumbnail on upload it should display it. (as all the plugin does is append a ‘t’ to the image name/id and display it. if it isn’t found then it probably means thumbnails aren’t being automatically generated? not sure)
- i think that would be a good idea as well but i’m not sure how to manage it if people still want their thumbnail to show up. since thumbnail sizes will vary for people i could see it easily wrecking the write screen pretty fast. bastians bas_img_selector seems to crop the image to fit the sidebar and shows it fullsize on hover. although it works i personally don’t like that setup..im all for suggestions!
- my knowledge of jquery (and javascript in general) is nonexistent save for toying around with random lightbox-style scripts and such. i’ll definitely look into it though. as i know the current javascript i threw in there is probably a mess!
Last edited by iblastoff (2007-12-27 12:38:17)
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
iblastoff wrote:
i also use glx_admin_image… as long as your images tab is set up to automatically generate a thumbnail on upload it should display it.
Ah, maybe that’s it then. I’ll check out the options. My bad, sorry.
… since thumbnail sizes will vary for people i could see it easily wrecking the write screen pretty fast
Yeah. One thing that might work is a(nother) option to set the displayed thumbsize width x height. If not set, you get whatever’s thrown at you, but if set you could add the given width
and/or height
attributes to the thumbnail you display? Sure the browser’ll probably do a lousy job of resizing, but it’s better than a smashed Write screen. FWIW, the fullsize-on-hover facility was one thing that turned me off bas_img_selector.
And the js is just fine as it is; it works. Going jQuery may just save you some lines of code and cross-browser headaches.
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
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
Steve,
Great work man…seriously.
This is MUCH appreciated!
A couple quick things:
1. Is there a way to allow for multiple images to be attached to the articles?
(uploaded one-at-a-time of course) I’ve got a site where almost every article has between 3-6 images.
2. Just a heads up: If you don’t specify an image but still hit upload, the error message “no file was specified” creates vert and horz scrollbars. Not a big deal at all, but just makes things look a little messy.
Thanks again.
I’m still toying with this…I’ll report back anything else.
Cheers!
—
Tom
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
renobird wrote:
Steve,
Great work man…seriously.
This is MUCH appreciated!A couple quick things:
1. Is there a way to allow for multiple images to be attached to the articles?
(uploaded one-at-a-time of course) I’ve got a site where almost every article has between 3-6 images.2. Just a heads up: If you don’t specify an image but still hit upload, the error message “no file was specified” creates vert and horz scrollbars. Not a big deal at all, but just makes things look a little messy.
Thanks again.
I’m still toying with this…I’ll report back anything else.Cheers!
—
Tom
- that could be possible. i know another plugin does this so i’ll take a look at how its done (i think it was upm_img_popper if i’m not mistaken). you’ll probably see this incorporated within the hour or two!
- just curious what browser were you using? either way i think the issue should be fixed now. you can redownload the plugin to see if it does.
Last edited by iblastoff (2007-12-27 15:59:04)
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
iblastoff wrote
just curious what browser were you using? either way i think the issue should be fixed now. you can redownload the plugin to see if it does.
FF 2.0.0.11
Thanks man, I’ll redownload now.
You’re right upm_img_popper does allow multiple images…that’s what I’ve been using until now.
Cheers!
—
Tom
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
hey renobird, v0.2 is out
now you have an “Append Article Image” text link that should let you append multiple id’s for each upload. (can be set to turn on via the plugin preferences. probaby want to disable the regular “Attach Article Image” link)
ps. if anyone can help with styling the form after someone uploads an image that would be great! (ie. where the thumbnail shows up, where the attach/append image links show up, how the copy-paste txp:image id input looks, etc) i personally hate styling forms as i can never get them to look decent across all browsers.
Last edited by iblastoff (2007-12-27 16:48:42)
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
Steve,
Damn…that was quick! I’ll download in a few and check it out.
Nice way to close out the year by releasing one of the years best plugins. (imo)
If I had to vote…I think it would be a 3-way-tie between:
1. lam_image_uploader
2. glz_custom_fields
3. sed_section_fields
There’s been some other really good stuff…but those really stand out.
Sorry for the digression.
- )
—
Tom
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
Moved to seperate thread
Last edited by variaas (2007-12-27 22:07:34)
Offline
Re: lam_image_uploader v0.6c (improved upload images from the write tab)
Moved to seperate thread
Last edited by variaas (2007-12-27 22:07:24)
Offline