Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-12-27 21:06:39

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Hey Variaas,

This looks really cool.
Probably needs it’s own thread…as not to confuse things here.

iblastoff,

Loving the plugin so far. Installed it on a live site that has a major content update in the works.
It really speeds things up…everyone is stoked!

Thanks Again!


Tom

Offline

#14 2007-12-28 02:10:19

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

iblastoff

Really nice work. Plus you’ve been busy. Its fun to see a new prolific plugin author.

Thanks

Mike

Offline

#15 2007-12-28 11:13:09

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

thanks all.

although to be quite honest all i’m really doing is hacking/mashing up other plugins and pulling useful parts from here and there. all the credit goes to the original authors stanislav, mary and bastian.

v0.3 is out and should fix an “Attach Article Image” bug that caused it not to work at all :P

Last edited by iblastoff (2007-12-28 11:14:02)

Offline

#16 2007-12-28 16:26:12

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

What about adding ability to upload img by url? Just past img src to the field and txp will automaticly download it with all further manipulations?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#17 2007-12-28 16:40:04

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

@the_ghost – that’s a good one. Steve, I wrote a function to do this for asv_tumblelog, so feel free to use that to import a url.

Offline

#18 2007-12-28 19:56:41

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Excellent work Steve, you’re on a tear!

I like the function, but had a simple thought for presentation… how about moving it to the sidebar with a collapsible “h3” to integrate more tightly with the rest of the UI.

Currently, the “alt-text” “caption” and “category” use a lot of horizontal space. If you put them in the sidebar they’ll be narrower and you could even give the caption a couple of lines. People could hide or show without losing the obviousness of it’s function.

I started on a hack for this which is pretty simple as you’ve used an iframe, but I wanted to see if you or anyone else thought this would be a good idea.

Once again, many thanks for some great work.

Offline

#19 2007-12-28 20:04:56

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

mrdale wrote

how about moving it to the sidebar with a collapsible “h3” to integrate more tightly with the rest of the UI.

I’ll second that. Works fine for me as-is, but moved to the sidebar would be ideal.

Offline

#20 2007-12-28 21:40:39

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

mrdale and renobird

I had inquired about the same relocation as well, but at that time Steve was going to leave it at the bottom. If there are enough requests, perhaps he’ll add it as a preference or even make it the default install :). Each of you probably already know this, but in case there is someone who doe not, and would like to move it to the sidebar in the meantime:

The quick fix to move it to the left sidebar is to edit the plugin.

  • Near the top find the part that begins with “function setup_picture_upload”.
  • Below that, look for the line that begins with “echo”.
  • At the end of that line there is a “document.getElementById(“article-main”)”.
  • Replace “article-main” with “article-col-1”.
  • Repeat each time you update the plugin
  • It needs a bit of styling to look right.

I was just beginning to research a collapsible h3 like mrdale suggested, but have never done one before. (I’m almost javascript illiterate at the moment). Also, Amit has an interesting take on integrating it into the UI using thick box. He has started a separate thread about it.

Mike

Last edited by maverick (2007-12-28 21:41:26)

Offline

#21 2007-12-28 22:25:11

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

personally i’m thrilled that someone has taken the thickbox approach instead. this javascript+iframe business is not always reliable (even though thickbox i’m pretty sure just calls an iframe as well. but for whatever reason, sometimes it seems both areas get out of sync and then you’re required to log into textpattern via the iframe! bah! doesn’t happen often at all but definitely annoying)

i started working on the h3 “Upload Image” toggledisplay idea and it works fine. though for some reason i can’t append it right underneath the “Textile Help” link. when i try (using the id ‘textile_help’) the whole thing just ends up INSIDE the textile help toggle. so i did what maverick just said (just appended it to #article-col-1) and all is ok.

just need to fix some styling issues and add the preferences to the backend so people can still choose to place it at the bottom…since its now packed into the sidebar, if people still want to see a thumbnail i’m probably going to have to add an ugly static width attribute on the img (probably about 150px) unless someone has a better idea..

Last edited by iblastoff (2007-12-28 23:04:31)

Offline

#22 2007-12-28 23:24:42

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Steve

Nice! I like it.

I am guessing, but regarding editing the width of the file input — I think the id and the class for styling it is id=“image-upload” and class=“edit” when you look at the source on the image tab. On the Write tab neither of those showed up when I searched the source of the rendered page. I am guessing they are “hid” because it is in the iframe? So the browser wouldn’t have a id or class to style (even if you added them to the style sheet in the plugin)? You would need to somehow act on the styling somewhere else – maybe in the textpattern style sheet? Or am I wrong?

Also, lacking in php skills, this is probably obvious to most others, but is it not possible to call the php function used on the image tab directly from the plugin, or to duplicate it in the plugin, rather than using the iFrame? Does it have to be placed via javascript and/or iFrame? Just curious and trying to learn.

Thanks

Mike

Offline

#23 2007-12-29 00:18:04

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

Steve

I see an “edit” and that your note about not being able to change the width of the file input is gone. I assume you found the spot?

If not, I think I figured out that this will work, : add #file {width: ##px; } to the textpattern.css. I’m sure there is a better way, just a way I found that works on the write tab without effecting the image tab. The drawback is that you have to edit the textpattern.css file. Not quite plug and play.

Edit – Duh! – add it to the css declarations in the plug in and it also works. That’s plug and play. Duh!

Also, as I’m digging around, I got wondering – would inserting the info as an <object> be better than an iFrame?

Mike

Last edited by maverick (2007-12-29 00:24:04)

Offline

#24 2007-12-29 00:25:05

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_image_uploader v0.6c (improved upload images from the write tab)

maverick: that css is the first thing i tried but it doesn’t seem to take effect in firefox. i ended up ‘fixing’ it by just adding a size attribute to the actual file input tag.

anyway heres lam_image_uploader v0.4

now has the ability to move the upload form either to the bottom (below the excerpt area) or to the left sidebar (although currently it just pins it to the very bottom and is ‘expanded’ by default. since its in an iframe i can’t think of the right logic to have it kept closed on initial load while also keeping it open when you upload an image, as that would reload the iframe and then close it again. ALSO if you have thumbnail display on, it just displays the thumbnail at a width of 150px no matter what if you choose to go this route..)

make sure to remove and reinstall the preferences once you install the plugin as it now has more

Last edited by iblastoff (2007-12-29 00:26:31)

Offline

Board footer

Powered by FluxBB