Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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..

!http://i3.tinypic.com/85dzhv9.gif!

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: 960
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: 960
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..)

!http://i6.tinypic.com/6s7i047.gif!

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

#25 2007-12-29 01:02:38

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

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

Thanks Steve.

Sorry to suggest what you had tried. I figured you were several steps ahead of me. I was using Safari, and it worked. I just checked Firefox, and it changed the length, but lost the button. The field was clickable. Weird. Obviously you found a nice solution.

Thanks again for the update.

Mike

Last edited by maverick (2007-12-29 16:58:48)

Offline

#26 2007-12-29 09:26:09

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

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

Awesome plugin, really.

One note: the name “lam_image_uploader” is about two letter longer to stay in the standard yellow tab…
maybe “lam_img_uploader” or “lam_image_loader” could work…

Not really important, I know.

Onre more thing: it would be nice to add the possibility to localize the few words of the plugin without modifying the code. I mean: “Upload image”, “Alternate text“and “Caption” ‘cause “Browse” and “Upload” buttons, naturally are already localized with the language choosen during the TXP installation.

Last edited by candyman (2007-12-29 09:34:02)

Offline

#27 2007-12-29 10:42:34

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)

hey candyman thanks for the info. i’ll have to take a look at the lang file to see what i can use from there directly.
fyi i’ll be changing the tab text to just “Image Uploader” so it’ll fit.

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

Offline

#28 2007-12-29 16:59:36

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

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

I tried installing the plugin in its extension tab but don’t get anything — I just see the installation button after I’ve already pressed it. In the Write tab I get this error message:

Notice: Undefined index: lam_image_uploader_move_sidebar in /home/www/ww6199/html/rete/textpattern/lib/txplib_misc.php(534) : eval()'d code on line 13

Offline

#29 2007-12-29 18:17:50

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)

andreas are you trying version v0.5? and assuming you’re running txp 4.0.5? try redownloading the plugin. you might have caught an odd version i had uploaded for a bit (it had some installation issues but is replaced now).

Last edited by iblastoff (2007-12-29 18:18:22)

Offline

#30 2007-12-29 18:23:45

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,202
Website

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

This is great!

One last thing. Perhaps you could change the caption field to a small textarea, since captions are often bound to get longer than one small field.

Otherwise, Bueno!

Offline

Board footer

Powered by FluxBB