summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 04:36:24 +0000
committerbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 04:36:24 +0000
commitcf071b67f1000864b864aedb3e294cbaf0509f73 (patch)
tree641097ba8de3271ac243806c9ec90b1237e8c9f6 /admin
downloadfisheye-cf071b67f1000864b864aedb3e294cbaf0509f73.tar.gz
fisheye-cf071b67f1000864b864aedb3e294cbaf0509f73.tar.bz2
fisheye-cf071b67f1000864b864aedb3e294cbaf0509f73.zip
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'admin')
-rw-r--r--admin/admin_fisheye_inc.php136
-rw-r--r--admin/schema_inc.php97
2 files changed, 233 insertions, 0 deletions
diff --git a/admin/admin_fisheye_inc.php b/admin/admin_fisheye_inc.php
new file mode 100644
index 0000000..e5ef429
--- /dev/null
+++ b/admin/admin_fisheye_inc.php
@@ -0,0 +1,136 @@
+<?php
+//This holds the checkbox options for what to display on the 'list galleries' page
+$formGalleryGeneral = array(
+ "fisheye_menu_text" => array(
+ 'label' => 'Menu Text',
+ 'note' => '',
+ 'type' => 'text'
+ ),
+/* Disabled for now - spiderr
+ "feature_megaupload" => array(
+ 'label' => 'Use <a href="http://sourceforge.net/projects/megaupload">MegaUpload</a>',
+ 'note' => 'Upload progress meter that requires Perl and ExecCGI permission',
+ 'type' => 'checkbox'
+ ),
+*/
+ "feature_offline_thumbnailer" => array(
+ 'label' => 'Background Thumbnailer',
+ 'note' => 'Thumbnails will be queued and regenerated by a background command-line script. For more information, see '.FISHEYE_PKG_PATH.'thumbaniler.php or you can <a href="'.FISHEYE_PKG_URL.'thumbnailer.php">run it manually</a>',
+ 'type' => 'checkbox'
+ )
+);
+$smarty->assign('formGalleryGeneral', $formGalleryGeneral);
+
+$formGalleryListLists = array(
+ "fisheye_list_title" => array(
+ 'label' => 'Gallery title',
+ 'note' => 'List the title of the gallery.',
+ ),
+ "fisheye_list_thumbnail" => array(
+ 'label' => 'Thumbnail',
+ 'note' => 'Display a small thumbnail associated with a gallery',
+ ),
+ "fisheye_list_description" => array(
+ 'label' => 'Description',
+ 'note' => 'List the description of a gallery',
+ ),
+ "fisheye_list_user" => array(
+ 'label' => 'Creator',
+ 'note' => 'List the name of the user who created the gallery',
+ ),
+ "fisheye_list_hits" => array(
+ 'label' => 'Hits',
+ 'note' => 'List number of hits this gallery has receieved',
+ ),
+ "fisheye_list_created" => array(
+ 'label' => 'Creation date',
+ 'note' => 'List the creation date of the gallery',
+ ),
+ "fisheye_list_lastmodif" => array(
+ 'label' => 'Last modification',
+ 'note' => 'List date this gallery was last modified',
+ )
+);
+$smarty->assign('formGalleryListLists', $formGalleryListLists);
+
+// This holds the checkbox options for what to display on a 'view gallery' page
+$formGalleryLists = array(
+ "fisheye_gallery_list_title" => array(
+ 'label' => 'Gallery title',
+ 'note' => 'When viewing a gallery, display the title of the gallery',
+ ),
+ "fisheye_gallery_list_description" => array(
+ 'label' => 'Gallery description',
+ 'note' => 'When viewing a gallery, display the description of the gallery below the title',
+ ),
+ "fisheye_gallery_list_image_titles" => array(
+ 'label' => 'Image titles',
+ 'note' => 'Show image titles underneath each thumbnail',
+ ),
+ "fisheye_gallery_hide_modules" => array(
+ 'label' => 'Hide modules for galleries',
+ 'note' => 'When viewing a gallery, hide the left and right module columns',
+ ),
+ "fisheye_gallery_list_image_descriptions" => array(
+ 'label' => 'Image description',
+ 'note' => 'Show image descriptions underneath each thumbnail',
+ )
+);
+$smarty->assign( 'formGalleryLists',$formGalleryLists );
+
+// This holds the checkbox options for what to display on an 'image details' page
+$formImageLists = array(
+ "fisheye_image_list_title" => array(
+ 'label' => 'Image title',
+ 'note' => 'When viewing an image, display the title of the image',
+ ),
+ "fisheye_image_list_description" => array(
+ 'label' => 'Image description',
+ 'note' => 'When viewing an image, display the description of the image below the title',
+ ),
+ "fisheye_image_hide_modules" => array(
+ 'label' => 'Hide modules for images',
+ 'note' => 'When viewing an image, hide the left and right module columns',
+ ),
+ "gallerybar_use_icons" => array(
+ 'label' => 'Use icons in the gallery bar',
+ 'note' => 'When viewing an image, show <strong>previous</strong> and <strong>next</strong> links as images instead of words',
+ ),
+);
+$smarty->assign( 'formImageLists', $formImageLists);
+
+//vd($_REQUEST);
+if (!empty($_REQUEST['fisheyeAdminSubmit'])) {
+ // General Settings
+ foreach ($formGalleryGeneral as $item=>$data) {
+ if( $data['type'] == 'checkbox' ) {
+ simple_set_toggle($item);
+ } else {
+ $gBitSystem->storePreference($item, $_REQUEST[$item]);
+ }
+ }
+
+ // Gallery List Display Settings
+ foreach ($formGalleryListLists as $item=>$data) {
+ simple_set_toggle($item);
+ }
+
+ // Gallery Display Settings
+ foreach ($formGalleryLists as $item => $data) {
+ simple_set_toggle($item);
+ }
+ $gBitSystem->storePreference('fisheye_gallery_default_thumbnail_size', $_REQUEST['default_gallery_thumbnail_size']);
+ $gBitSystem->storePreference('fisheye_gallery_default_rows_per_page', $_REQUEST['rows_per_page']);
+ $gBitSystem->storePreference('fisheye_gallery_default_cols_per_page', $_REQUEST['cols_per_page']);
+
+ // Image Display Settings
+ foreach ($formImageLists as $item => $data) {
+ simple_set_toggle( $item );
+ }
+ if( !empty( $_REQUEST['default_image_thumbnail_size'] ) ) {
+ $gBitSystem->storePreference('fisheye_image_default_thumbnail_size', $_REQUEST['default_image_thumbnail_size']);
+ }
+
+}
+
+?>
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
new file mode 100644
index 0000000..82cb00c
--- /dev/null
+++ b/admin/schema_inc.php
@@ -0,0 +1,97 @@
+<?php
+
+$tables = array(
+
+'tiki_fisheye_gallery' => "
+ gallery_id I4 PRIMARY,
+ content_id I4,
+ rows_per_page I4,
+ cols_per_page I4,
+ thumbnail_size C(32),
+ preview_content_id I4
+",
+
+'tiki_fisheye_gallery_image_map' => "
+ gallery_content_id I4 NOTNULL,
+ item_content_id I4 NOTNULL,
+ position I4
+",
+
+'tiki_fisheye_image' => "
+ image_id I4 PRIMARY,
+ content_id I4 NOTNULL,
+ photo_date I8,
+ width I4,
+ height I4
+",
+/*
+'tiki_fisheye_image_exif' => "
+ content_id I4 PRIMARY,
+ exif_title C(250),
+ exif_data X
+",
+*/
+'tiki_thumbnail_queue' => "
+ content_id I4 PRIMARY,
+ queue_date I8 NOTNULL,
+ begin_date I8,
+ end_date I8,
+ resize_original integer
+"
+
+);
+
+global $gBitInstaller;
+
+$gBitInstaller->makePackageHomeable('fisheye');
+
+foreach( array_keys( $tables ) AS $tableName ) {
+ $gBitInstaller->registerSchemaTable( FISHEYE_PKG_NAME, $tableName, $tables[$tableName] );
+}
+
+$indices = array (
+ 'tiki_fisheye_gallery_id_idx' => array( 'table' => 'tiki_fisheye_gallery', 'cols' => 'gallery_id', 'opts' => NULL ),
+ 'tiki_fisheye_image_id_idx' => array( 'table' => 'tiki_fisheye_image', 'cols' => 'image_id', 'opts' => NULL )
+);
+$gBitInstaller->registerSchemaIndexes( FISHEYE_PKG_NAME, $indices );
+
+$gBitInstaller->registerPackageInfo( FISHEYE_PKG_NAME, array(
+ 'description' => "FishEye is a package for creating image galleries",
+ 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>'
+) );
+
+// ### Sequences
+$sequences = array (
+ 'tiki_fisheye_gallery_id_seq' => array( 'start' => 1 )
+);
+$gBitInstaller->registerSchemaSequences( FISHEYE_PKG_NAME, $sequences );
+
+// ### Default Preferences
+$gBitInstaller->registerPreferences( FISHEYE_PKG_NAME, array(
+ array( FISHEYE_PKG_NAME, 'fisheye_list_title','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_list_created','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_list_user','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_list_hits','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_list_thumbnail','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_gallery_list_title','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_gallery_list_description','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_gallery_list_image_titles','y'),
+ array( FISHEYE_PKG_NAME, 'fisheye_gallery_default_rows_per_page','5'),
+ array( FISHEYE_PKG_NAME, 'fisheye_gallery_default_cols_per_page','3'),
+ array( FISHEYE_PKG_NAME, 'fisheye_gallery_default_thumbnail_size','small'),
+ array( FISHEYE_PKG_NAME, 'fisheye_image_list_description',''),
+ array( FISHEYE_PKG_NAME, 'fisheye_image_default_thumbnail_size',''),
+ array( FISHEYE_PKG_NAME, 'fisheye_menu_text','Image Galleries'),
+ )
+);
+
+// ### Default User Permissions
+$gBitInstaller->registerUserPermissions( FISHEYE_PKG_NAME, array(
+ array('bit_p_view_fisheye', 'Can view image galleries', 'basic', 'fisheye'),
+ array('bit_p_create_fisheye', 'Can create an image gallery', 'registered', 'fisheye'),
+ array('bit_p_edit_fisheye', 'Can edit image gallery', 'registered', 'fisheye'),
+ array('bit_p_upload_fisheye', 'Can upload images to gallery', 'registered', 'fisheye'),
+ array('bit_p_admin_fisheye', 'Can admin image galleries', 'editors', 'fisheye')
+) );
+
+?>