GOOP Gallery 3 Drupal Demo

email-addthis printer-addthis favorites-addthis facebook-addthis digg-addthis | Share

21 May 2008 05:33:44
Category: GOOP Gallery

I'm continuing to test GOOP Gallery 3 for portability. This time I tested it as a Drupal 6 Module. It worked flawless with no modifications outside of the config file.

I placed the following two blocks in a directory called gallery and created a gallery.module and file. I then placed the gg3 code into the same directory. The only thing I changed in gg3 was to set GG_Config->return_gallery to true. The Info file:
name = Gallery
description = Implements GOOP Gallery inside of Drupal.
package = Core - optional
version = VERSION
core = 6.x 
; Information added by packaging script on 2008-04-09
version = "6.2"
project = "drupal"
datestamp = "1207776008"
The module file:

function gallery_perm() {
  return array('view galleries');
function gallery_menu() {

  $items['gallery'] = array(
    'title' => 'Gallery',
    'page callback' => 'gallery_main',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
    'file' => '',

  return $items;

function gallery_main()
    $gallery = GG_Init::main();     
    return  $gallery;

Edit: Here's a screen shot:
Goop Gallery 3 running in Drupal