Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2007-12-03 16:12:56

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

Re: stm_image_uploader: directly upload images from Write tab

Anyone out there still working on this?

I was using it for a while, but fell out-of-love with it due to a few missing features.
Would love to rekindle the relationship.

)


Tom

Offline

#26 2007-12-23 10:04:24

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

Re: stm_image_uploader: directly upload images from Write tab

renobird wrote:

Robin746 Wrote

1. automatically fill in the Article image field with the uploaded image ID

2. display a thumbnail of the image beside the form, so it is clear to the writer which one was uploaded

Anyone got either of these things working?
These would REALLY make this plugin amazing.

Anyone out there with the skills have time to take a quick look?


Tom

i don’t think this will be too hard. just started learning some javascript today and i played around with the plugin.

so far this is what i have:

1. once user uploads an image, an “Insert Article Image” text link appears. the user can click on it, and the id of the image is automatically placed into the ‘article image’ text field. this is similar to what up_img_popper does. i’ll see what i can do to make this automatic instead of having to click.

2. i haven’t tried displaying a thumbnail of the image yet but i don’t think this will be too hard to add.

3. i have absolutely little to none javascript knowledge and have not written a single line of js in my life minus toying around with a few jquery/packaged lightbox type scripts. i can’t believe no one else has attempted this…come on guys :P

Last edited by iblastoff (2007-12-23 10:35:36)

Offline

#27 2007-12-23 10:32:27

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

Re: stm_image_uploader: directly upload images from Write tab

after a bit of toying around i now also have the thumbnail showing up…albeit everything isn’t too pretty as i havent added any styling yet.

basically the screenshot is what shows up after you have uploaded an image. you can see the “Insert Article Image” text link there. once clicked, via javascript it inserts the id into the “Article Image” text field. it also displays the thumbnail of the image you just uploaded.

the only issue is since that whole image upload area is in an embedded iframe, if you have a relatively large thumbnail then scrollbars will appear vertically and horizontally to accomodate it. i had to increase the iframes height just to accomodate that little thumbnail in the picture below. as i haven’t toyed with frames in ages i have no idea if it can auto-expand like a div can (i assume not?)

next step is to figure out how the hell i would go about assigning a category to an image…

Last edited by iblastoff (2007-12-23 14:36:07)

Offline

#28 2007-12-23 14:34:39

robin746
Member
From: Ireland
Registered: 2007-09-22
Posts: 113
Website

Re: stm_image_uploader: directly upload images from Write tab

That’s looking very useful. Keep us appraised of your progress!


robin

Offline

#29 2007-12-23 15:11:13

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: stm_image_uploader: directly upload images from Write tab

Wow! This is great, thanks!
A little question: adding “insert article image” doesen’t make “txp:image_id” no more necessary?

Offline

#30 2007-12-23 15:14:37

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

Re: stm_image_uploader: directly upload images from Write tab

redbot wrote:

Wow! This is great, thanks!
A little question: adding “insert article image” doesen’t make “txp:image_id” no more necessary?

yah that can be removed. though i guess it depends on peoples needs if they choose to copy and paste directly into article instead? not sure if i should take it out or not.

Offline

#31 2007-12-23 15:22:42

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: stm_image_uploader: directly upload images from Write tab

Leave it :)

Offline

#32 2007-12-23 15:43:13

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: stm_image_uploader: directly upload images from Write tab

yah that can be removed. though i guess it depends on peoples needs if they choose to copy and paste directly into article instead? not sure if i should take it out or not.

Leave it :)

Well, after all I could remove it by myself.
I’m using hak_tinymce all the way so I didn’t realize one could need to insert the id direcly in an article while using textile

Offline

#33 2007-12-23 16:54:53

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

Re: stm_image_uploader: directly upload images from Write tab

alright so now i have the article image id automatically inserted into the ‘article image’ field upon upload. would people rather have the “Attach Article Image” text link instead? i’d like to have a preferences type page in the backend so people can customise but i think thats a little beyond me at this point..

edit..upon viewing some other plugins, having specific plugin preferences doesn’t seem to be too difficult…

so far i’d like to include these options in the backend:

show thumbnail? (yes/no)
show copy & paste text? (eg. <txp:image id =”#” />) ? (yes/no)
show “Attach Article Image” link? (yes/no)
Automatically append article image id? (yes/no)

Last edited by iblastoff (2007-12-23 17:13:22)

Offline

#34 2007-12-23 17:17:26

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: stm_image_uploader: directly upload images from Write tab

Blastoff Steve

just wanted to encourage you with your plugin writing — I think it’s great to see some new writers gracing the forum.


Steve

Offline

#35 2007-12-23 17:49:31

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

Re: stm_image_uploader: directly upload images from Write tab

thanks net-carver steve :) don’t expect any wonderplugins ala yourself/mary/bloke/robert sable/wet/ruud/bastian/gerhard/manfre/gocom/ etc etc (sorry if i left you out) etc etc though. the best i can do is toy around endlessly until something works!

alright so the preferences have been added (thanks to spying on how upm_img_popper does it):

still need to add uninstall capability but shan’t be too far a goal…

Last edited by iblastoff (2007-12-23 17:50:11)

Offline

#36 2007-12-23 18:03:44

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: stm_image_uploader: directly upload images from Write tab

still need to add uninstall capability but shan’t be too far a goal…

You’re the man Steve. May I ask what it would uninstall? Plugin itself, or image, or maybe the category that contains the image?

ala yourself/mary/bloke/robert sable/wet/ruud/bastian/gerhard/manfre/gocom/

Thanks Steve :)

Cheers!

Offline

Board footer

Powered by FluxBB