summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-08-21 16:22:48 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-08-21 16:22:48 +0000
commit7d183a779b42072de4a913029a7daad9f5b30034 (patch)
tree2a21a8105228e1268ab33b0abe061b52b9475f7a /admin
downloadpigeonholes-7d183a779b42072de4a913029a7daad9f5b30034.tar.gz
pigeonholes-7d183a779b42072de4a913029a7daad9f5b30034.tar.bz2
pigeonholes-7d183a779b42072de4a913029a7daad9f5b30034.zip
import pigeonholes - take 2
Diffstat (limited to 'admin')
-rw-r--r--admin/admin_pigeonholes_inc.php41
-rw-r--r--admin/schema_inc.php54
2 files changed, 95 insertions, 0 deletions
diff --git a/admin/admin_pigeonholes_inc.php b/admin/admin_pigeonholes_inc.php
new file mode 100644
index 0000000..616547f
--- /dev/null
+++ b/admin/admin_pigeonholes_inc.php
@@ -0,0 +1,41 @@
+<?php
+// $Header: /cvsroot/bitweaver/_bit_pigeonholes/admin/admin_pigeonholes_inc.php,v 1.1 2005/08/21 16:22:48 squareing Exp $
+
+$pigeonholeSettings = array(
+ 'custom_member_sorting' => array(
+ 'label' => 'Custom Sorting',
+ 'note' => 'This will change the way category members are displayed. It allows you to sort the members manually.',
+ ),
+ 'display_pigeonhole_path' => array(
+ 'label' => 'Display Path',
+ 'note' => 'Display category paths above the page leading to the object.',
+ ),
+ 'display_pigeonhole_members' => array(
+ 'label' => 'Display Members',
+ 'note' => 'Show the other members of the same categories at the bottom of the page.',
+ ),
+ 'display_pigeonhole_description' => array(
+ 'label' => 'Display Description',
+ 'note' => 'When showing the category members, you can display the category description as well.',
+ ),
+);
+$gBitSmarty->assign( 'pigeonholeSettings', $pigeonholeSettings );
+
+$memberLimit = array(
+ '9999' => 'Unlimited',
+ '10' => 10,
+ '20' => 20,
+ '30' => 30,
+ '50' => 50,
+ '100' => 100,
+);
+$gBitSmarty->assign( 'memberLimit', $memberLimit );
+
+if( !empty( $_REQUEST['pigeonhole_settings'] ) ) {
+ foreach( array_keys( $pigeonholeSettings ) as $item ) {
+ simple_set_toggle( $item, PIGEONHOLES_PKG_NAME );
+ }
+
+ simple_set_value( 'limit_member_number', PIGEONHOLES_PKG_NAME );
+}
+?>
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
new file mode 100644
index 0000000..b041712
--- /dev/null
+++ b/admin/schema_inc.php
@@ -0,0 +1,54 @@
+<?php
+
+$tables = array(
+ 'bit_pigeonholes' => "
+ content_id I4 NOTNULL PRIMARY,
+ structure_id I4 NOTNULL PRIMARY
+ ",
+ 'bit_pigeonhole_members' => "
+ parent_id I4 NOTNULL PRIMARY,
+ content_id I4 NOTNULL PRIMARY,
+ pos I4 NOTNULL
+ "
+);
+
+global $gBitInstaller;
+
+foreach( array_keys( $tables ) AS $tableName ) {
+ $gBitInstaller->registerSchemaTable( PIGEONHOLES_PKG_NAME, $tableName, $tables[$tableName] );
+}
+
+$gBitInstaller->registerPackageInfo( PIGEONHOLES_PKG_NAME, array(
+ 'description' => "A Categorisation system that makes it easy to keep an overview of your data. Has a simple, yet powerful interface for categorising multiple pages at once.",
+ 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>',
+ 'version' => '0.1',
+ 'state' => 'experimental',
+ 'dependencies' => '',
+) );
+
+//// ### Indexes
+//$indices = array (
+// 'bit_pigeonholes_content_idx' => array( 'table' => 'bit_pigeonholes', 'cols' => 'content_id', 'opts' => 'UNIQUE' ),
+//);
+//$gBitInstaller->registerSchemaIndexes( PIGEONHOLES_PKG_NAME, $indices );
+
+// ### Sequences
+$sequences = array (
+ 'bit_pigeonholes_id_seq' => array( 'start' => 1 )
+);
+
+$gBitInstaller->registerSchemaSequences( PIGEONHOLES_PKG_NAME, $sequences );
+
+// ### Default Preferences
+$gBitInstaller->registerPreferences( PIGEONHOLES_PKG_NAME, array(
+ array( PIGEONHOLES_PKG_NAME, 'display_pigeonhole_members','y' ),
+) );
+
+// ### Default UserPermissions
+$gBitInstaller->registerUserPermissions( PIGEONHOLES_PKG_NAME, array(
+ array( 'bit_p_view_pigeonholes', 'Can view pigeonholes', 'basic', PIGEONHOLES_PKG_NAME ),
+ array( 'bit_p_insert_pigeonhole_member', 'Can insert content into an existing pigeonhole', 'registered', PIGEONHOLES_PKG_NAME ),
+ array( 'bit_p_edit_pigeonholes', 'Can edit pigeonholes', 'editors', PIGEONHOLES_PKG_NAME ),
+) );
+
+?>