First foray into a Drupal Module

Find attached “Galleria” which is the gallery solution that I came up with. Some features:

  • Drupal 5.x
  • Thumbnail ribbon with image caching
  • Image scaling
  • Upload image files and zip files
  • Comes with a block function to allow “last updated” or “last created” view of galleries
  • Control over user content (in other words, you don’t have to let users create galleries)
  • Uses Drupal content types for nodes, so hooked into the whole node system
  • Sorting and captions
  • Click viewing image to see original
  • Filenames are retained

There are more features, so have a look at the initial sample gallery I uploaded. There’s probably the odd bug or two, but I tested it with IE 7 and Firefox 2. I’m upgrading my Mac, so Safari testing will follow.

If you want the module, it’s attached. The license is simple: do what you want with it and I’m not responsible for any problems resulting from the use of it. If that works for you, feel free to download. If you find any bugs and/or want to share enhancements to it, please drop a comment on this posting.


9 thoughts on “First foray into a Drupal Module”

    1. I haven’t actually moved up to Drupal 6, though I looked at the porting of it, and I haven’t had the free time needed to figure out the new module system and to actually do the work. I’ll admit that it hasn’t been a priority right now.

      1. Uhm, maybe you could try to sell it (as an incentive), there isn’t any good slideshow for Drupal 6. I mean, a simple one, others are too complex or don’t work in Drupal 6. Drupal should come with your code out of the box… Let me know if i can help… i’m good at designing user interfaces…

        1. I’ve been working on my own CMS. I’m generally not happy with the options out there and so I’ve been working away at my own. That’s a big reason why I haven’t bothered to figure out how Drupal 6 does it. When they released it, the documentation on module development was so thin that it might as well have not existed. That pretty much ended it for me.

          As for selling it, I suspect that it wouldn’t really do well. I don’t think there have been all that many downloads to begin with.

  1. I’m getting the following error, any idea?

    # warning: mkdir() [function.mkdir]: No such file or directory in /var/www/vhosts/ on line 329.
    # warning: chmod() [function.chmod]: No such file or directory in /var/www/vhosts/ on line 330.


    1. At the bottom of the module file there is a function:

      _get_gallery_path(&$node, $local)

      This function is using information supplied by calling Drupal methods and it may be that there’s an incorrect concatenation happening. I suspect there is. Find this line:

      $base_path .= file_directory_path() . '/galleria/galleries/' . $node->uid;

      And modify it to:

      $base_path .= '/' . file_directory_path() . '/galleria/galleries/' . $node->uid;

      That may solve the problem.

  2. Hi, can’t imagine why one would build a proprietary CMS… i use a combination of Plone, Drupal and WordPress for different kinds of projects and can imagine the work needed to build such a thing… but you might have your reasons ; )

    Anyway it’s too bad you stopped developing this module, as i said before, there is a need in the Drupal community for a module like this…

    If you need help beta testing it feel free to use my time… ; )

    PS: I’m trying to make it work with D6…

    1. I’m a software architect/developer, so I look at it as more of an interesting challenge. I don’t have a deadline on it, so I work as I go and eventually something will come out. I do this kind of thing all the time, especially when the available options for some piece of software doesn’t quite fit what I’m looking for. Since I can write it for myself, why settle for something else? That’s a very nice bonus in having the skills, so I may as well make use of them.

      Anyways, it won’t be proprietary. It’s being developed in PHP (minimum 5.2, it’s much more object oriented) and, if it holds up and is properly secure, I’ll very likely make it available when version 1 is done. I tend to do that, as you can tell. My thinking is that I may host a site for it or I may make use of one of the open source platforms (e.g. Sourceforge) to do it. Not sure.

  3. Just a note- if you’re ever thinking about a content management FRAMEWORK (not a content management system), take a look at modX- I started a business 2 years ago in web development and graphic design which has, through some fortunate contacts, been more focused on development in the last year. I use modX extensively because you can use it’s document parsing tools (either pre-developed snippets, as they are called in the modX world, or roll your own easily through it’s snippet engine) to create any type of gallery you like. I prefer to use jquery as my front end (I’ve used several different jquery plugins depending on client wishes/needs) and the modx backend to manage the galleries and generate the markup. Great thing about modX- NO fixed templating system, you build templates as you see fit, and the community is very active and supportive!

    As well, an entirely new version is now in full production version, and it gives even better management tools than the previous version.

Leave a Reply