/var/log/balo

Fancy gallery script for Drupal 6

The Drupal is one of the most popular CMSs on the Internet. We often make sites, where we have to give the opportunity to the less advanced users to edit the contents of the nodes. The procedure of these modifications should be as simple as possible.

In most cases, our users would like to get a gallery with nice effects and modest manageability. This feature doesn’t come with Drupal 6, it does not support galleries well. Sure we can do a lot of magic with modules and CCKs, but it is a nightmare and anything we get as result is complicated to manage and maintain.

I have searched way too much for the solution, so I just made a decision: I will use Google Picasa Webalbums. I found a javascript library on SourceForge, that downloads the Picasa’s rss feed and creates the list of the albums and images. The result is OK, but it gives a grim sight. We can redesign it by overwriting the js’s proper sections. I have modified the code:

Modified pwa library (right click, save as…): download

Insert the following code into a new Drupal node:

 1<script type="text/javascript">
 2  username='yourGoogleAccountName';
 3  photosize='800';
 4  columns='4';
 5</script>
 6<script src="/sites/all/themes/yourTheme/js/pwa-no-picasa-links.js" type="text/javascript">
 7</script>
 8
 9<script type="text/javascript">
10    $("a[rel='myAlbum']").colorbox();
11</script>

#cms #colorbox #drupal #gallery #javascript #jquery #lightbox