Uploading image from harddrive

Categorized As:

We can insert images from Flickr (only on pattern/tips creation pages? Why not on forum post pages, pms, etc.? I can't find setting options for Flickr module beyond API key), or from a URL, but how can we set things so users can upload an image from their computer without "create content > image"? Say, for example, I wanted to insert a screenshot into this-here forum post?

Flickr integration... it is on "everything"... isn't it?
[flickr-photo:id=424193298,size=s]

Image uplaods: I think this is:
1. Turn on image uploads and
2. set comments to be allowed to upload images.

Submitted by emmajane on 27 July 2007 - 8:21pm.

Where do I turn on image uploads? And then, once turned on (or maybe it already is?), where's the magic button to browse hard drive?

Submitted by Kim Werker on 28 July 2007 - 5:50pm.

Comments will be images hosted off-site using the TinyMCE button. I declare this issue "resolved."bunny and humphrey

Submitted by emmajane on 8 August 2007 - 7:09pm.

What about the Flickr thing? Your image doesn't link back to its Flickr page.

Submitted by Kim Werker on 11 August 2007 - 8:09pm.

I haven't written the filter yet to link back to flickr. I was asking someone else about it and they suggested:

http://drupal.org/node/52543 

Submitted by emmajane on 20 August 2007 - 8:49pm.

Darnit! It's version 4.7 only. It hasn't been ported to version 5 yet. Ok. It looks like I'll be hand rolling a solution for the linking of the images.

Submitted by emmajane on 21 August 2007 - 7:10am.

Ok. I'm looking at porting flickrstickr to v5 because it's just too frickin' cool for words!!! Hello drag and drop images when TinyMCE is enabled?! Yum!

Submitted by emmajane on 21 August 2007 - 9:00am.

On a bright note, does that mean you can also make it work for Photobucket, etc.? So I can plan, when do you think you'll be ready to test it out (this is not intended to rush you! I know it'll take time)? I'd like to roll out a larger beta by the 31st -- think that's doable?

ETA: D'oh! I posted this comment before noticing you'd added another one. Drag 'n drop is awesome. Woo hoo! (As long as we also support other hosting platforms that require linking back.)

ETA again: Actually, I'm really cool strongly urging people to use Flickr. So if we can support Flickr fully, and then only support images hosted where a link-back is *not* required, then that might work, at least as a start. But *tons* of crocheters use Photobucket... 

Submitted by Kim Werker on 21 August 2007 - 9:35am.

The module uses Flickr's API to make a connection. Brace yourself and then watch this video on how it works: http://www.lullabot.com/videocast/drupal-4.7-flickrstickr-module

I think for the beta launch we start with flickr-only support and then I look into something more complicated. As best I can tell Photobucket has /not/ released a developer API to build off of. But it's possible that something can be gleaned from the RSS stuff that google takes advantage of in this script: http://googleajaxsearchapi.blogspot.com/2007/05/ajax-feed-api-slide-show...

Submitted by emmajane on 21 August 2007 - 7:57pm.

Ok. I seem to have the start of this module ported over to v5. Unfortunately it doesn't appear to quite work the way I think it ought to... (and the switch is sort of burried in the options on the edit page; and it doesn't appear on the comments page) but it's started and I think it's darn cool to boot.

Now when you click to "Post a Pattern":

  1. scroll down to the bottom and find the link for "Flickr Image Insert."
  2. Click this link and the toolbar will appear at the TOP of your page.
  3. Scroll back to where you want to add images.
  4. Where it says, "Flickr Username" type in your username (or someone else's). AND/OR type in a Flickr tag.
  5. Look for the "Search" button. Its placement will vary based on the width of your browser window.
  6. Wait for the images to appear in the gray box.
  7. Drag and drop the image into your content.
  8. Proceed as normal to submit/save the page.

I think it's a good start, but it definitely needs some UI TLC. (that's user interface tender loving care...)

Submitted by emmajane on 22 August 2007 - 5:00am.

Whoa. That is *cool*. Definitely in need of some UI TLC.

Can the "Insert Flickr Image" link/button be moved? Like, can we have it appear above or below an actual text box (like, Body)?

I didn't want to go through and submit a test -- does the thumbnail that is inserted into the text box end up being shown full-size once the pattern/tip is submitted? If so, what size? Can we control that? 

Are we still going to have people upload the *main* image to the server, so we can have it automatically resized to fit at the top of the pattern/tip and to generate the thumbnail? I think we should, especially because this will still allow non-Flickr users to include at least this essential image in their patterns and tips.

How involved is messing with the UI? Also, Does it only load CC-licensed images, or are we going to be inundated with copyright infringements? Is there a way to make it so a user can *only* use their own Flickr images?

Too many questions? :)

Submitted by Kim Werker on 22 August 2007 - 10:49am.

Watch the video. It will answer most of your questions.

One of the things that doesn't make sense is that you *should* be able to load images of different sizes. I don't know why that isn't working. I was hoping it was just an issue with Linux. I guess not though. :(

I'm sure the link/button can be moved, but I don't know how yet.

There isn't a way to force it to load only your own images at this point (because the flickr account username is not related to the cme user name). I'm sure I can hack this to have something in the profile that's called up by this module...I'll work on that next.

And yes there will still be an uploaded image for the main pattern image. I believe I've already implemented this, no? 

Submitted by emmajane on 22 August 2007 - 12:58pm.

Ok. The video is cool. I wonder if the size issue is related to tinyMCE? In the video, using non-rich-text had the app insert the link and img code at the cursor.

I hadn't tried clicking to dock the images; that works, although it's too wide to fit correctly into the width of the content area. Can you make it so it's only about 540px wide, and so the images either scroll left-right or wrap to a second line?

Also, oddly, when I went to play with this again, the box to enter my Flickr ID was gone; I could only enter a tag. At first I though it had magically stored my username, but when I entered a tag it pulled up images from all users. :( 

Submitted by Kim Werker on 22 August 2007 - 2:05pm.

Question about the photo upload (I checked it out -- wicked! I changed it to "Main Photo" and added help text) -- is this photo also going to be used for the thumbnail? I just want to make sure the icon field that's in there is for the old patterns, not new ones?

Submitted by Kim Werker on 22 August 2007 - 2:15pm.

Yes, I believe the main images already set up to work that way (either can be entered which allows for old and new content)... but the icon field should only show up for admins. The uploads need to be tested to make sure they work properly (i.e. someone needs to add more patterns); but I believe it's all working approximately correctly.

(still working on the flickrstickr stuff. .. i was going crossed eyed and decided to work on some other stuff instead.) 

Submitted by emmajane on 22 August 2007 - 5:12pm.

Yes, you've been on an impressive de-bugging bender. I'm about fried for the day, but hope to work on this much more this weekend. I can smell wide beta, and it makes me smile. :)

Submitted by Kim Werker on 22 August 2007 - 5:33pm.

Images from flickr that are entered with TinyMCE are now automatically linked back. This uses a content filter and is done pre-display. The URLs are not editable and the user must have a valid flickr account entered in their profile (if they don't, their flickr images are stripped out of the content pre-display... but still editable so that when they put their flickr account information in, everything starts working automatically). This means that if a user deletes their CME account for some strange reason their flickr images are also "lost."

I still haven't heard anything about the patch I submitted for flickrstickr. I'm sure there will be a point when we can implement it (it's *very* cool), but I have other things to worry about and didn't feel like waiting for this one.

In theory the module that I wrote can be extended for other image hosting solutions that have an API like flickr's (I'm pretty sure that Google images does)...

Submitted by emmajane on 31 August 2007 - 4:35pm.

You SO rock. I haven't played with this yet, but I will.

One question: If a user deletes their Cme account, is their content deleted along with it? If it's *not* deleted, we probably shouldn't strip images from their patterns -- that will create a host of complaints (rightful ones) and trouble...

Submitted by Kim Werker on 3 September 2007 - 2:36pm.

A further note: I can come up with a custom error msg for dead links. Something like, "If you're looking for a pattern, it could be that the designer removed it from Crochet Me."

Submitted by Kim Werker on 3 September 2007 - 2:37pm.

User login

Get Our eNewsletter

Lots of tips and techniques to help you learn even more about crochet ... and it's FREE!
Enter your email address: