2012-04-23 01:15:31 +00:00
< ? php
2016-12-31 20:21:05 +00:00
/*
2012-04-23 01:15:31 +00:00
* e107 website system
*
2016-12-31 20:21:05 +00:00
* Copyright ( C ) 2008 - 2016 e107 Inc ( e107 . org )
2012-04-23 01:15:31 +00:00
* Released under the terms and conditions of the
* GNU General Public License ( http :// www . gnu . org / licenses / gpl . txt )
*
2016-03-30 14:28:44 +02:00
* @ file
* Class installations to handle configuration forms on Admin UI .
2012-04-23 01:15:31 +00:00
*/
$eplug_admin = true ;
2021-01-21 09:38:38 -08:00
require_once ( __DIR__ . '/../../class2.php' );
2016-03-29 14:17:29 +02:00
2016-03-29 11:22:25 +02:00
if ( ! getperms ( " P " ) || ! e107 :: isInstalled ( 'gallery' ))
2012-04-23 01:15:31 +00:00
{
2016-01-13 19:17:37 -08:00
e107 :: redirect ( 'admin' );
2016-03-29 11:22:25 +02:00
exit ();
2012-04-23 01:15:31 +00:00
}
2016-03-29 14:17:29 +02:00
// [PLUGINS]/gallery/languages/[LANGUAGE]/[LANGUAGE]_admin.php
e107 :: lan ( 'gallery' , true , true );
2016-03-29 11:22:25 +02:00
$e_sub_cat = 'gallery' ;
2012-08-10 19:30:43 +00:00
2016-03-30 14:28:44 +02:00
/**
* Class plugin_gallery_admin .
*/
2012-08-10 19:30:43 +00:00
class plugin_gallery_admin extends e_admin_dispatcher
{
2016-03-29 11:22:25 +02:00
2012-08-10 19:30:43 +00:00
/**
2016-03-30 14:28:44 +02:00
* Required ( set by child class ) .
*
* Controller map array in format .
* @ code
* 'MODE' => array (
* 'controller' => 'CONTROLLER_CLASS_NAME' ,
* 'path' => 'CONTROLLER SCRIPT PATH' ,
* 'ui' => 'UI_CLASS' , // extend of 'comments_admin_form_ui'
* 'uipath' => 'path/to/ui/' ,
* );
* @ endcode
*
2012-08-10 19:30:43 +00:00
* @ var array
*/
2016-03-29 11:22:25 +02:00
protected $modes = array (
'main' => array (
'controller' => 'gallery_cat_admin_ui' ,
'path' => null ,
'ui' => 'gallery_cat_admin_form_ui' ,
'uipath' => null
2012-08-10 19:30:43 +00:00
),
2016-03-29 11:22:25 +02:00
'cat' => array (
'controller' => 'gallery_cat_ui' ,
'path' => null ,
'ui' => 'gallery_cat_form_ui' ,
'uipath' => null
)
2012-08-10 19:30:43 +00:00
);
/**
2016-03-30 14:28:44 +02:00
* Optional ( set by child class ) .
*
* Required for admin menu render . Format :
* @ code
* 'mode/action' => array (
* 'caption' => 'Link title' ,
* 'perm' => '0' ,
* 'url' => '{e_PLUGIN}plugname/admin_config.php' ,
* ...
* );
* @ endcode
*
* Note that 'perm' and 'userclass' restrictions are inherited from the $modes , $access and $perm , so you don ' t
* have to set that vars if you don 't need any additional ' visual ' control .
*
* All valid key - value pair ( see e107 :: getNav () -> admin function ) are accepted .
*
2012-08-10 19:30:43 +00:00
* @ var array
*/
protected $adminMenu = array (
2017-11-20 10:16:37 -08:00
'main/prefs' => array ( 'caption' => LAN_PREFS , 'perm' => 'P' ),
'main/list' => array ( 'caption' => LAN_CATEGORIES , 'perm' => 'P' ),
'main/create' => array ( 'caption' => LAN_CREATE , 'perm' => 'P' ),
2012-08-10 19:30:43 +00:00
);
/**
2016-03-30 14:28:44 +02:00
* Optional ( set by child class ) .
*
2012-08-10 19:30:43 +00:00
* @ var string
*/
2016-03-29 14:17:29 +02:00
protected $menuTitle = LAN_PLUGIN_GALLERY_TITLE ;
2016-03-29 11:22:25 +02:00
2016-03-30 14:28:44 +02:00
/**
* Initial function .
*/
2015-02-01 18:45:33 -08:00
function init ()
{
2017-11-20 10:16:37 -08:00
2015-02-01 18:45:33 -08:00
if ( E107_DEBUG_LEVEL > 0 )
{
2016-03-30 14:28:44 +02:00
$this -> adminMenu [ 'main/list' ] = array (
'caption' => LAN_CATEGORY ,
'perm' => 'P' ,
);
2016-03-29 11:22:25 +02:00
}
2015-02-01 18:45:33 -08:00
}
2016-03-30 14:28:44 +02:00
2012-08-10 19:30:43 +00:00
}
2016-03-30 14:28:44 +02:00
/**
* Class gallery_cat_admin_ui .
*/
2012-08-10 19:30:43 +00:00
class gallery_cat_admin_ui extends e_admin_ui
2016-03-29 11:22:25 +02:00
{
2016-03-30 14:28:44 +02:00
/**
* Could be LAN constant ( multi - language support ) .
*
* @ var string plugin name
*/
2016-03-29 14:17:29 +02:00
protected $pluginTitle = LAN_PLUGIN_GALLERY_TITLE ;
2016-03-29 11:22:25 +02:00
2016-03-30 14:28:44 +02:00
/**
* Plugin name .
*
* @ var string
*/
protected $pluginName = 'gallery' ;
/**
* Plugin table .
*
* @ var string
*/
protected $table = " core_media_cat " ;
/**
* Primary key in plugin table .
*
* @ var string
*/
protected $pid = " media_cat_id " ;
/**
* Default ( db ) limit value .
*
* @ var integer
*/
protected $perPage = 10 ;
/**
* SQL order , false to disable order , null is default order .
*
* @ var string
*/
protected $listOrder = 'media_cat_order' ;
2016-03-29 11:22:25 +02:00
2016-03-30 14:28:44 +02:00
/**
* SQL query for listing . Without any Order or Limit .
*
* @ var string
*/
protected $listQry = " SELECT * FROM `#core_media_cat` WHERE media_cat_owner = 'gallery' " ;
/**
* UI field data .
*
* @ var array
*/
2016-03-29 11:22:25 +02:00
protected $fields = array (
2016-03-29 14:17:29 +02:00
'checkboxes' => array (
'title' => '' ,
'type' => null ,
'width' => '5%' ,
'forced' => true ,
'thclass' => 'center' ,
'class' => 'center' ,
),
'media_cat_image' => array (
'title' => LAN_IMAGE ,
'type' => 'image' ,
'data' => 'str' ,
'width' => '100px' ,
'thclass' => 'center' ,
'class' => 'center' ,
'readParms' => 'thumb=60&thumb_urlraw=0&thumb_aw=60' ,
'readonly' => false ,
'batch' => false ,
'filter' => false ,
),
'media_cat_owner' => array (
'title' => LAN_OWNER ,
'type' => 'hidden' ,
'nolist' => true ,
'width' => 'auto' ,
'thclass' => 'left' ,
'readonly' => false ,
'writeParms' => 'value=gallery' ,
),
'media_cat_category' => array (
'title' => LAN_CATEGORY ,
'type' => 'hidden' ,
'nolist' => true ,
'width' => 'auto' ,
'thclass' => 'left' ,
'readonly' => true ,
),
'media_cat_title' => array (
'title' => LAN_TITLE ,
'type' => 'text' ,
'width' => 'auto' ,
'thclass' => 'left' ,
'readonly' => false ,
2017-11-20 10:16:37 -08:00
'inline' => true ,
2016-03-29 14:17:29 +02:00
),
'media_cat_sef' => array (
'title' => LAN_SEFURL ,
'type' => 'text' ,
'inline' => true ,
'width' => 'auto' ,
'thclass' => 'left' ,
),
'media_cat_diz' => array (
'title' => LAN_DESCRIPTION ,
'type' => 'bbarea' ,
'width' => '30%' ,
'readParms' => 'expand=...&truncate=150&bb=1' ,
'readonly' => false ,
),
'media_cat_class' => array (
'title' => LAN_VISIBILITY ,
'type' => 'userclass' ,
'width' => 'auto' ,
'data' => 'int' ,
'filter' => true ,
'batch' => true ,
),
'media_cat_order' => array (
'title' => LAN_ORDER ,
'type' => 'text' ,
'width' => 'auto' ,
'thclass' => 'center' ,
'class' => 'center' ,
),
'options' => array (
'title' => LAN_OPTIONS ,
'type' => null ,
'width' => '5%' ,
'forced' => true ,
'thclass' => 'center last' ,
'class' => 'right' ,
),
2016-03-29 11:22:25 +02:00
);
2016-03-30 14:28:44 +02:00
/**
* Referenced from $prefs property per field - 'tab => xxx' where xxx is the tab key ( identifier ) .
*
* Example :
* @ code
* array (
* '0' => 'Tab label' ,
* '1' => 'Another label' ,
* );
* @ endcode
*
* @ var array
* Edit / create form tabs .
*/
protected $preftabs = array (
2016-12-31 20:21:05 +00:00
LAN_GENERAL ,
2016-03-30 14:28:44 +02:00
LAN_GALLERY_ADMIN_03 ,
LAN_GALLERY_ADMIN_32 ,
);
2012-08-10 19:30:43 +00:00
2016-03-30 14:28:44 +02:00
/**
* Plugin Preference description array .
*
* @ var array
*/
2012-08-10 19:30:43 +00:00
protected $prefs = array (
2016-03-30 14:28:44 +02:00
'popup_w' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_04 ,
'tab' => 0 ,
'type' => 'text' ,
'data' => 'int' ,
'help' => LAN_GALLERY_ADMIN_05 ,
),
2016-03-30 14:28:44 +02:00
'popup_h' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_06 ,
'tab' => 0 ,
'type' => 'text' ,
'data' => 'int' ,
'help' => LAN_GALLERY_ADMIN_07 ,
),
2016-03-30 14:28:44 +02:00
'downloadable' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_08 ,
'tab' => 0 ,
'type' => 'boolean' ,
'data' => 'int' ,
'help' => LAN_GALLERY_ADMIN_09 ,
),
2016-03-30 14:28:44 +02:00
'slideshow_category' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_10 ,
'tab' => 1 ,
'type' => 'dropdown' ,
'data' => 'str' ,
'help' => LAN_GALLERY_ADMIN_11 ,
),
2016-03-30 14:28:44 +02:00
'slideshow_duration' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_12 ,
'type' => 'number' ,
'tab' => 1 ,
'data' => 'integer' ,
'help' => LAN_GALLERY_ADMIN_13 ,
),
2016-03-30 14:28:44 +02:00
'slideshow_auto' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_14 ,
'type' => 'boolean' ,
'tab' => 1 ,
'data' => 'integer' ,
'help' => LAN_GALLERY_ADMIN_15 ,
),
2016-03-30 14:28:44 +02:00
'slideshow_freq' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_16 ,
'type' => 'number' ,
'tab' => 1 ,
'data' => 'integer' ,
'help' => LAN_GALLERY_ADMIN_17 ,
),
2016-03-30 14:28:44 +02:00
'slideshow_effect' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_18 ,
'type' => 'dropdown' ,
'tab' => 1 ,
'data' => 'str' ,
'help' => LAN_GALLERY_ADMIN_19
),
2016-03-30 14:28:44 +02:00
'perpage' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_20 ,
'tab' => 0 ,
'type' => 'number' ,
'data' => 'int' ,
'help' => LAN_GALLERY_ADMIN_21 ,
),
2016-03-30 14:28:44 +02:00
'orderby' => array (
2016-03-29 14:17:29 +02:00
'title' => LAN_GALLERY_ADMIN_22 ,
2016-03-29 11:22:25 +02:00
'tab' => 0 ,
'type' => 'dropdown' ,
'data' => 'str' ,
'writeParms' => array (
'optArray' => array (
2016-03-29 14:17:29 +02:00
'media_id ASC' => LAN_GALLERY_ADMIN_23 ,
'media_id DESC' => LAN_GALLERY_ADMIN_24 ,
'media_name ASC' => LAN_GALLERY_ADMIN_25 ,
'media_name DESC' => LAN_GALLERY_ADMIN_26 ,
'media_caption ASC' => LAN_GALLERY_ADMIN_27 ,
'media_caption DESC' => LAN_GALLERY_ADMIN_28 ,
2016-03-29 11:22:25 +02:00
),
),
),
2016-03-30 14:28:44 +02:00
'pp_global' => array (
'title' => LAN_GALLERY_ADMIN_70 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_hook' => array (
'title' => LAN_GALLERY_ADMIN_71 ,
'type' => 'text' ,
'data' => 'str' ,
'writeParms' => array (
'default' => 'data-gal' ,
),
'tab' => 2 ,
),
'pp_animation_speed' => array (
'title' => LAN_GALLERY_ADMIN_33 ,
'type' => 'dropdown' ,
'data' => 'str' ,
'writeParms' => array (
'optArray' => array (
'fast' => LAN_GALLERY_ADMIN_62 ,
'slow' => LAN_GALLERY_ADMIN_63 ,
'normal' => LAN_GALLERY_ADMIN_64 ,
),
),
'tab' => 2 ,
),
'pp_slideshow' => array (
'title' => LAN_GALLERY_ADMIN_34 ,
'type' => 'text' ,
'data' => 'int' ,
'writeParms' => array (
'default' => 5000 ,
),
'tab' => 2 ,
),
'pp_autoplay_slideshow' => array (
'title' => LAN_GALLERY_ADMIN_35 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_opacity' => array (
'title' => LAN_GALLERY_ADMIN_36 ,
'help' => LAN_GALLERY_ADMIN_37 ,
'type' => 'text' ,
2016-03-31 09:45:35 +02:00
'data' => 'float' ,
2016-03-30 14:28:44 +02:00
'writeParms' => array (
'default' => 0.80 ,
),
'tab' => 2 ,
),
'pp_show_title' => array (
'title' => LAN_GALLERY_ADMIN_38 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_allow_resize' => array (
'title' => LAN_GALLERY_ADMIN_39 ,
'help' => LAN_GALLERY_ADMIN_40 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_default_width' => array (
'title' => LAN_GALLERY_ADMIN_41 ,
'type' => 'text' ,
'data' => 'int' ,
'writeParms' => array (
'default' => 500 ,
),
'tab' => 2 ,
),
'pp_default_height' => array (
'title' => LAN_GALLERY_ADMIN_42 ,
'type' => 'text' ,
'data' => 'int' ,
'writeParms' => array (
'default' => 344 ,
),
'tab' => 2 ,
),
'pp_counter_separator_label' => array (
'title' => LAN_GALLERY_ADMIN_43 ,
'help' => LAN_GALLERY_ADMIN_44 ,
'type' => 'text' ,
'data' => 'str' ,
'writeParms' => array (
'default' => '/' ,
),
'tab' => 2 ,
),
'pp_theme' => array (
2016-12-31 20:21:05 +00:00
'title' => LAN_THEME ,
2016-03-30 14:28:44 +02:00
'type' => 'dropdown' ,
'data' => 'str' ,
'writeParms' => array (
'optArray' => array (
'pp_default' => LAN_DEFAULT ,
'light_rounded' => LAN_GALLERY_ADMIN_65 ,
'dark_rounded' => LAN_GALLERY_ADMIN_66 ,
'light_square' => LAN_GALLERY_ADMIN_67 ,
'dark_square' => LAN_GALLERY_ADMIN_68 ,
'facebook' => LAN_GALLERY_ADMIN_69 ,
),
),
'tab' => 2 ,
),
'pp_horizontal_padding' => array (
'title' => LAN_GALLERY_ADMIN_46 ,
'help' => LAN_GALLERY_ADMIN_47 ,
'type' => 'text' ,
'data' => 'int' ,
'writeParms' => array (
'default' => 20 ,
),
'tab' => 2 ,
),
'pp_hideflash' => array (
'title' => LAN_GALLERY_ADMIN_48 ,
'help' => LAN_GALLERY_ADMIN_49 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_wmode' => array (
'title' => LAN_GALLERY_ADMIN_50 ,
'help' => LAN_GALLERY_ADMIN_51 ,
'type' => 'text' ,
'data' => 'str' ,
'writeParms' => array (
'default' => 'opaque' ,
),
'tab' => 2 ,
),
'pp_autoplay' => array (
'title' => LAN_GALLERY_ADMIN_52 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_modal' => array (
'title' => LAN_GALLERY_ADMIN_53 ,
'help' => LAN_GALLERY_ADMIN_54 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_deeplinking' => array (
'title' => LAN_GALLERY_ADMIN_55 ,
'help' => LAN_GALLERY_ADMIN_56 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_overlay_gallery' => array (
'title' => LAN_GALLERY_ADMIN_57 ,
'help' => LAN_GALLERY_ADMIN_58 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_keyboard_shortcuts' => array (
'title' => LAN_GALLERY_ADMIN_59 ,
'help' => LAN_GALLERY_ADMIN_60 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
'pp_ie6_fallback' => array (
'title' => LAN_GALLERY_ADMIN_61 ,
'type' => 'boolean' ,
'data' => 'int' ,
'tab' => 2 ,
),
2012-08-10 19:30:43 +00:00
);
2016-03-29 11:22:25 +02:00
2017-11-20 10:16:37 -08:00
private $ownerCount ;
2016-03-30 14:28:44 +02:00
/**
* Initial function .
*/
2012-08-10 19:30:43 +00:00
function init ()
{
$effects = array (
2016-03-29 14:17:29 +02:00
'scrollHorz' => LAN_GALLERY_ADMIN_29 ,
'scrollVert' => LAN_GALLERY_ADMIN_30 ,
'fade' => LAN_GALLERY_ADMIN_31 ,
2016-03-29 11:22:25 +02:00
);
$this -> prefs [ 'slideshow_effect' ][ 'writeParms' ] = $effects ;
$this -> prefs [ 'slideshow_effect' ][ 'readParms' ] = $effects ;
2016-03-29 14:17:29 +02:00
2012-08-10 19:30:43 +00:00
$categories = e107 :: getMedia () -> getCategories ( 'gallery' );
$cats = array ();
2016-03-29 11:22:25 +02:00
foreach ( $categories as $k => $var )
2012-08-10 19:30:43 +00:00
{
2013-10-09 15:40:17 -07:00
$id = preg_replace ( " /[^0-9]/ " , '' , $k );
2016-03-29 11:22:25 +02:00
$cats [ $id ] = $var [ 'media_cat_title' ];
2012-08-10 19:30:43 +00:00
}
2016-03-29 11:22:25 +02:00
$this -> prefs [ 'slideshow_category' ][ 'writeParms' ] = $cats ;
$this -> prefs [ 'slideshow_category' ][ 'readParms' ] = $cats ;
2012-08-10 19:30:43 +00:00
$mes = e107 :: getMessage ();
2016-03-29 14:17:29 +02:00
$tp = e107 :: getParser ();
$x = LAN_PLUGIN_GALLERY_TITLE ;
$y = " <a href=' " . e_ADMIN . " image.php'> " . LAN_MEDIAMANAGER . " </a> " ;
2016-03-29 11:22:25 +02:00
2016-03-29 14:17:29 +02:00
$message = $tp -> lanVars ( LAN_GALLERY_ADMIN_01 , array ( $x , $y ), true );
2012-08-10 19:30:43 +00:00
$mes -> addInfo ( $message );
2017-11-20 10:16:37 -08:00
$this -> setGalleryCount ();
2012-08-10 19:30:43 +00:00
}
2017-11-20 10:16:37 -08:00
function setGalleryCount ()
{
$sql = e107 :: getDb ();
if ( $sql -> gen ( " SELECT media_cat_owner, MAX(CAST(SUBSTRING_INDEX(media_cat_category, '_', -1 ) AS UNSIGNED)) as maxnum, count(media_cat_id) as number FROM `#core_media_cat` GROUP BY media_cat_owner " ))
{
while ( $row = $sql -> fetch ())
{
$this -> ownerCount [ $row [ 'media_cat_owner' ]] = $row [ 'number' ];
$own = $row [ 'media_cat_owner' ];
// if(!in_array($own,$this->restricted))
{
// $this->fields['media_cat_owner']['writeParms'][$own] = $own;
if ( $row [ 'maxnum' ] > 0 )
{
$this -> ownerCount [ $row [ 'media_cat_owner' ]] = $row [ 'maxnum' ]; // $maxnum;
}
}
}
}
e107 :: getMessage () -> addDebug ( " Max value for category names: " . print_a ( $this -> ownerCount , true ));
}
2016-03-30 14:28:44 +02:00
public function beforeCreate ( $new_data , $old_data )
{
2017-11-20 10:16:37 -08:00
$new_data = $this -> setCategory ( $new_data );
return $new_data ;
}
public function beforeUpdate ( $new_data , $old_data , $id )
{
// $new_data = $this->setCategory($new_data);
return $new_data ;
}
private function setCategory ( $new_data )
{
$type = 'image_' ;
$increment = ( $this -> ownerCount [ 'gallery' ] + 1 );
$new_data [ 'media_cat_owner' ] = 'gallery' ;
$new_data [ 'media_cat_category' ] = 'gallery_' . $type . $increment ;
if ( empty ( $new_data [ 'media_cat_sef' ]))
{
$new_data [ 'media_cat_sef' ] = eHelper :: title2sef ( $new_data [ 'media_cat_title' ]);
}
2016-03-30 14:28:44 +02:00
return $new_data ;
}
2017-11-20 10:16:37 -08:00
2016-03-30 14:28:44 +02:00
function galleryPage ()
{
$mes = e107 :: getMessage ();
$tp = e107 :: getParser ();
$x = LAN_PLUGIN_GALLERY_TITLE ;
$y = " <a href=' " . e_ADMIN . " image.php'> " . LAN_MEDIAMANAGER . " </a> " ;
$message = $tp -> lanVars ( LAN_GALLERY_ADMIN_01 , array ( $x , $y ), true );
$mes -> addInfo ( $message );
}
2012-08-10 19:30:43 +00:00
}
2016-03-29 11:22:25 +02:00
2012-08-10 19:30:43 +00:00
class gallery_cat_admin_form_ui extends e_admin_form_ui
{
2016-03-29 11:22:25 +02:00
2016-03-29 14:17:29 +02:00
// Override the default Options field.
2016-03-29 11:22:25 +02:00
public function gallery_category_parent ( $curVal , $mode )
2012-08-10 19:30:43 +00:00
{
2016-03-30 14:28:44 +02:00
// TODO - catlist combo without current cat ID in write mode, parents only for batch/filter.
// Get UI instance.
2012-08-10 19:30:43 +00:00
$controller = $this -> getController ();
switch ( $mode )
{
case 'read' :
return e107 :: getParser () -> toHTML ( $controller -> getDownloadCategoryTree ( $curVal ), false , 'TITLE' );
2016-03-29 11:22:25 +02:00
break ;
2012-08-10 19:30:43 +00:00
case 'write' :
2020-12-22 14:48:28 -08:00
return $this -> select ( 'gallery_category_parent' , $controller -> getDownloadCategoryTree (), $curVal );
2016-03-29 11:22:25 +02:00
break ;
2012-08-10 19:30:43 +00:00
case 'filter' :
case 'batch' :
return $controller -> getDownloadCategoryTree ();
2016-03-29 11:22:25 +02:00
break ;
2012-08-10 19:30:43 +00:00
}
}
2016-03-30 14:28:44 +02:00
2012-08-10 19:30:43 +00:00
}
class gallery_main_admin_ui extends e_admin_ui
{
2016-03-29 11:22:25 +02:00
2012-08-10 19:30:43 +00:00
}
2016-03-29 11:22:25 +02:00
2012-08-10 19:30:43 +00:00
class gallery_main_admin_form_ui extends e_admin_form_ui
{
2016-03-29 11:22:25 +02:00
2012-08-10 19:30:43 +00:00
}
2012-04-23 01:15:31 +00:00
2016-03-29 11:22:25 +02:00
new plugin_gallery_admin ();
require_once ( e_ADMIN . " auth.php " );
e107 :: getAdminUI () -> runPage (); //gallery/includes/admin.php is auto-loaded.
require_once ( e_ADMIN . " footer.php " );
2021-01-22 13:44:10 -08:00