Esempio n. 1
0
 /**
  * Defines the gallery image mapper
  * @param type $context
  */
 function define($context = FALSE, $not_used = FALSE)
 {
     // Add 'attachment' context
     if (!is_array($context)) {
         $context = array($context);
     }
     array_push($context, 'attachment');
     // Define the mapper
     $this->_primary_key_column = 'pid';
     parent::define('ngg_pictures', $context);
     $this->add_mixin('Mixin_NextGen_Table_Extras');
     $this->add_mixin('Mixin_Gallery_Image_Mapper');
     $this->implement('I_Image_Mapper');
     $this->set_model_factory_method('image');
     // Define the columns
     $this->define_column('pid', 'BIGINT', 0);
     $this->define_column('image_slug', 'VARCHAR(255)');
     $this->define_column('post_id', 'BIGINT', 0);
     $this->define_column('galleryid', 'BIGINT', 0);
     $this->define_column('filename', 'VARCHAR(255)');
     $this->define_column('description', 'TEXT');
     $this->define_column('alttext', 'TEXT');
     $this->define_column('imagedate', 'DATETIME');
     $this->define_column('exclude', 'INT', 0);
     $this->define_column('sortorder', 'BIGINT', 0);
     $this->define_column('meta_data', 'TEXT');
     $this->define_column('extras_post_id', 'BIGINT', 0);
     $this->define_column('updated_at', 'BIGINT');
     // Mark the columns which should be unserialized
     $this->add_serialized_column('meta_data');
 }
Esempio n. 2
0
 function define($context = FALSE, $not_used = FALSE)
 {
     // Define the context
     if (!is_array($context)) {
         $context = array($context);
     }
     array_push($context, 'album');
     $this->_primary_key_column = 'id';
     // Define the mapper
     parent::define('ngg_album', $context);
     $this->add_mixin('Mixin_NextGen_Table_Extras');
     $this->add_mixin('Mixin_Album_Mapper');
     $this->implement('I_Album_Mapper');
     $this->set_model_factory_method('album');
     // Define the columns
     $this->define_column('id', 'BIGINT', 0);
     $this->define_column('name', 'VARCHAR(255)');
     $this->define_column('slug', 'VARCHAR(255');
     $this->define_column('previewpic', 'BIGINT', 0);
     $this->define_column('albumdesc', 'TEXT');
     $this->define_column('sortorder', 'TEXT');
     $this->define_column('pageid', 'BIGINT', 0);
     $this->define_column('extras_post_id', 'BIGINT', 0);
     // Mark the columns which should be unserialized
     $this->add_serialized_column('sortorder');
 }
Esempio n. 3
0
 /**
  * Define the object
  * @param string $context
  */
 function define($context = FALSE, $not_used = FALSE)
 {
     // Add 'gallery' context
     if (!is_array($context)) {
         $context = array($context);
     }
     array_push($context, 'gallery');
     $this->_primary_key_column = 'gid';
     // Continue defining the object
     parent::define('ngg_gallery', $context);
     $this->set_model_factory_method('gallery');
     $this->add_mixin('Mixin_NextGen_Table_Extras');
     $this->add_mixin('Mixin_Gallery_Mapper');
     $this->implement('I_Gallery_Mapper');
     // Define the columns
     $this->define_column('gid', 'BIGINT', 0);
     $this->define_column('name', 'VARCHAR(255)');
     $this->define_column('slug', 'VARCHAR(255');
     $this->define_column('path', 'TEXT');
     $this->define_column('title', 'TEXT');
     $this->define_column('pageid', 'INT', 0);
     $this->define_column('previewpic', 'INT', 0);
     $this->define_column('author', 'INT', 0);
     $this->define_column('extras_post_id', 'BIGINT', 0);
 }
 function define($context = FALSE)
 {
     if (!is_array($context)) {
         $context = array($context);
     }
     array_push($context, 'album');
     $this->_primary_key_column = 'id';
     parent::define('ngg_album', $context);
     $this->add_mixin('Mixin_Album_Mapper');
     $this->implement('I_Album_Mapper');
     $this->set_model_factory_method('album');
     $this->add_post_hook('_convert_to_entity', 'Unserialize Galleries', 'Hook_Unserialize_Album_Galleries', 'unserialize_galleries');
 }
 /**
  * Defines the gallery image mapper
  * @param type $context
  */
 function define($context = FALSE)
 {
     // Add 'attachment' context
     if (!is_array($context)) {
         $context = array($context);
     }
     array_push($context, 'attachment');
     $this->primary_key_column = 'pid';
     parent::define('ngg_pictures', $context);
     $this->add_mixin('Mixin_Gallery_Image_Mapper');
     $this->add_post_hook('_convert_to_entity', 'Unserialize Metadata', 'Hook_Unserialize_Image_Metadata', 'unserialize_metadata');
     $this->implement('I_Image_Mapper');
     $this->set_model_factory_method('image');
 }
 /**
  * Define the object
  * @param string $context
  */
 function define($context = FALSE)
 {
     // Add 'gallery' context
     if (!is_array($context)) {
         $context = array($context);
     }
     array_push($context, 'gallery');
     $this->_primary_key_column = 'gid';
     // Continue defining the object
     parent::define('ngg_gallery', $context);
     $this->set_model_factory_method('gallery');
     $this->add_mixin('Mixin_Gallery_Mapper');
     $this->implement('I_Gallery_Mapper');
 }