Search for Podcasts
Trumix.com
Our New Site
Internet Radio
Podcasts
Create a Playlist


Podcast Directory:
Browse Podcasts
Add your Podcast
Remove a Podcast
Search for Podcasts
Podcast Directory
by Country
by Language
by Buzz
by Popularity
by Category
by Tags
by Region
by City
on a Google Map



Podcast Help:
What is Podcasting
Creating an XML
Podcast Hosting
Podcast Software
Firefox Plugin
Podcast Hardware




About Us:
Podcast Advertising
Contact Us
Copyright Issues
Help Wanted




Internet Radio:
Find
State
Country
Language
Music
Sports
Regions
Popularity

Discount Gold Offer

Stiletto New Price

Free Graphics


FlickrStickr module ported to use Curl Episode | D'Arcy Norman Dot Net

PodcastDirectory / Society and Culture / Ethnic
PodcastDirectory / Regions / UN / Unknown



D'Arcy Norman Dot Net

Primary Format :
Ethnic

Also Listed as:

User Tags:

User Votes:

RSS Feed
Website

Visit Trumix.com for the most recent listings of:

FlickrStickr module ported to use Curl


FlickrStickr module ported to use Curl

Play Now -->

DATE : Mon, 22 May 2006 19:54:46 -0700
Entered in Database : 2006-05-23 02:54:46
length : 12453
Link to the Show / Show Notes

The FlickrStickr module for Drupal adds the handy Flock-like Flickr Photo Browser, making it easy peasy to add photos from Flickr to content in Drupal. But, the module uses the PHP fopen() command, which is disabled on Dreamhost's servers for security reasons.

So, with some really quick hackery (more like copy-and-pastery, following this example) I ported the module to use curl instead, and it works great. It doesn't seem to be able to insert images into the TinyMCE editor, so you have to toggle back to text mode to insert an image (oh, the irony!)

Basically, the "port" involved changing this:

   $fp= fopen("http://www.flickr.com/services/...reallylongurltruncatedhere...", "r");
   while (!feof($fp)) {
      $buffer= fgets($fp, 4096);
      echo $buffer;
   }

to this:

   $curler = curl_init();
   $urlToCurl = "http://www.flickr.com/services/...reallylongurltruncatedhere...");
   curl_setopt($curler, CURLOPT_URL, $urlToCurl);
   curl_exec($curler);
   curl_close($curler);

There were 2 locations that needed changing. Just search for "fopen" and you'll find them. Use the same pattern of changes for both, and test before deploying.

AttachmentSize
flickrstickr.zip12.16 KB