Posts Tagged drupal

Web development environment – “On The Go”

Over the past few weeks I’ve been spending most of my spare time developing a couple of web sites.  These sites are based on the Drupal CMS written in PHP.  And I’ve taken a bit of a crash course in Drupal module design.

When I set out developing these, I faced a challenge that I’d been aware of, but managed to avoid in the past.  How do I work on these projects in a predictable, constant environment, and still bring my code with me to work on my home machine, work machine, laptop, and anything else I happen to sit down in front of?

This blog post is about how I’ve accomplished this so far.  Read more after the break…

Read the rest of this entry »

, , , , , , , ,

1 Comment

Drupal Flickr Module. Now with URLs!

Okay, so I’ve been a bit preoccupied with a couple projects which have slowed my efforts at blogging etc.

In both cases, I’ve been working on websites that leverage the PHP based Drupal CMS.  One of those projects is over at http://www.chasejarvisshoeproject.com.  That site is basically a small community forum for some folks that are sending a pair of shoes around the world, and taking pictures of them in various locations and situations.  Pretty cool.  The result of this effort is a Flickr photo pool and a good time.

So, of course a website devoted to a group on Flickr, is going to require some integration with Flickr.  Enter the Drupal Flickr Module.  When I started using it, this module was still in either an alpha, or beta (can’t seem to remember) and has released it’s 1.0 as of the 25th of March.  Throughout the time I’ve been using it however, there’ve been a few functions of the Flickr API which I needed, and the module didn’t support.  Those were.

Since the framework of the module did the hard work of making the calls, it was easy to write my own methods which performed these Flickr API functions for me.  And as the module developers released new versions, I just copy/pasted my code back into the new file, and went about my business.

Well when 1.0 was released, I took a closer look.  It turns out they’d implemented the call to get photos from a group pool, but still nothing for the URL’s.  So I figured I’d contribute and write a patch for the two calls I was still in need of.  And that, is what you see here.

569,597d568
< }
<
< /**
<  * @param $nsid
<  *   nsid of the group whose pool url will be returned
<  * @return
<  *   The URL portion of the response from the flickr method flickr.urls.getGroup
<  */
< function flickr_urls_get_group($nsid)
< {
<   $response = flickr_request('flickr.urls.getGroup', array('group_id' => $nsid));
<   if($response)
<     return $response['group']['url'];
<
<   return FALSE;
< }
<
< /**
<  * @param $nsid
<  *   nsid of the user whose photostream url will be returned
<  * @return unknown_type
<  */
< function flickr_urls_get_user_photos($nsid)
< {
<   $response = flickr_request('flickr.urls.getUserPhotos', array('user_id' => $nsid));
<   if($response)
<     return $response['user']['url'];
<
<   return FALSE;

As you can see, pretty basic but I figured I'd contribute.  I posted this as a feature request/issue over on the Flickr Module's issue queue, but have yet to receive a response.  If nothing else, I can use this to patch the next version.  Hopefully it helps someone else as well.

, , , ,

No Comments