diff --git a/boot.php b/boot.php
index 1fd0d2172..02162bb6a 100755
--- a/boot.php
+++ b/boot.php
@@ -43,7 +43,7 @@ require_once('include/taxonomy.php');
define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1058 );
+define ( 'DB_UPDATE_VERSION', 1059 );
define ( 'EOL', '
' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@@ -288,6 +288,10 @@ define ( 'ATTACH_FLAG_OS', 0x0002);
+define ( 'MENU_ITEM_ZID', 0x0001);
+
+
+
/**
* Maximum number of "people who like (or don't like) this" that we will list by name
*/
diff --git a/include/menu.php b/include/menu.php
new file mode 100644
index 000000000..98c18a45b
--- /dev/null
+++ b/include/menu.php
@@ -0,0 +1,40 @@
+ $r[0], 'items' => $x );
+
+
+ }
+ return null;
+}
+
+
+function menu_render($menu) {
+ if(! $menu)
+ return '';
+ for($x = 0; $x < count($menu['items']); $x ++)
+ if($menu['items']['mitem_flags'] & MENU_ITEM_ZID)
+ $menu['items']['link'] = zid($menu['items']['link']);
+
+ return replace_macros(get_markup_template('usermenu.tpl'),array(
+ '$menu' => $menu['menu'],
+ '$items' => $menu['items']
+ ));
+}
diff --git a/install/database.sql b/install/database.sql
index cd1c72ac6..0a86b8321 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -530,15 +530,18 @@ CREATE TABLE IF NOT EXISTS `manage` (
CREATE TABLE IF NOT EXISTS `menu` (
`menu_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`menu_channel_id` int(10) unsigned NOT NULL DEFAULT '0',
+ `menu_name` char(255) NOT NULL DEFAULT '',
`menu_desc` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`menu_id`),
- KEY `menu_channel_id` (`menu_channel_id`)
+ KEY `menu_channel_id` (`menu_channel_id`),
+ KEY `menu_name` (`menu_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `menu_item` (
`mitem_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mitem_link` char(255) NOT NULL DEFAULT '',
`mitem_desc` char(255) NOT NULL DEFAULT '',
+ `mitem_flags` int(11) NOT NULL DEFAULT '0',
`allow_cid` mediumtext NOT NULL,
`allow_gid` mediumtext NOT NULL,
`deny_cid` mediumtext NOT NULL,
@@ -547,6 +550,7 @@ CREATE TABLE IF NOT EXISTS `menu_item` (
`mitem_menu_id` int(10) unsigned NOT NULL DEFAULT '0',
`mitem_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`mitem_id`),
+ KEY `mitem_flags` (`mitem_flags`),
KEY `mitem_channel_id` (`mitem_channel_id`),
KEY `mitem_menu_id` (`mitem_menu_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/install/update.php b/install/update.php
index c09bc9d64..c97b5619f 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
+