summaryrefslogtreecommitdiff
path: root/admin/schema_inc.php
blob: 5846db843239cf0fab86718c2fb7f5226650ef3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php

$tables = array(
'tiki_nexus_plugins' => "
  plugin_guid C(16) PRIMARY,
  plugin_type C(16) NOTNULL,
  is_active C(1) NOTNULL DEFAULT 'y',
  plugin_description C(250),
  maintainer_url C(250)
",

'tiki_nexus_menus' => "
  menu_id I4 AUTO PRIMARY,
  plugin_guid C(16) NOTNULL,
  title C(128),
  description C(255),
  type C(16),
  editable I4 DEFAULT 0
",

'tiki_nexus_menu_items' => "
  item_id I4 AUTO PRIMARY,
  menu_id I4 DEFAULT 0,
  parent_id I4,
  ext_menu I4,
  pos I4,
  title C(128),
  hint C(255),
  rsrc C(255),
  rsrc_type C(16),
  perm C(128)
",
);

global $gBitInstaller;

foreach( array_keys( $tables ) AS $tableName ) {
	$gBitInstaller->registerSchemaTable( NEXUS_PKG_NAME, $tableName, $tables[$tableName] );
}

$gBitInstaller->registerPackageInfo( NEXUS_PKG_NAME, array(
	'description' => 'Nexus allows you to create multi level menus using a simple and intuitive interface. Menus can be of a dropdown style using css.',
	'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>',
	'version' => '0.1',
	'state' => 'experimental',
	'dependencies' => '',
) );

// ### Default UserPermissions
$gBitInstaller->registerUserPermissions( NEXUS_PKG_NAME, array(
	array('bit_p_insert_nexus_item', 'Can insert menu item in a menu while editing a page', 'editor', NEXUS_PKG_NAME),
	array('bit_p_create_nexus_menus', 'Can create new menus using Nexus', 'editor', NEXUS_PKG_NAME),
) );

// ### Default Preferences
$gBitInstaller->registerPreferences( NEXUS_PKG_NAME, array(
//	array(NEXUS_PKG_NAME, 'pref','value'),
) );

?>