Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / blocks [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
06 Aug 2002 15:47:36 | postnuke_official/html/modules/blocks | pninit.php,1.1,1.2 | Paul Rosania |
decentralized table creation, split into relevant modules (somewhat) |
Update of /home/cvsroot/postnuke_official/html/modules/blocks In directory ns7.hostnuke.net:/tmp/cvs-serv15336/blocks Modified Files: pninit.php Log Message: decentralized table creation, split into relevant modules (somewhat) Index: pninit.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/blocks/pninit.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pninit.php 3 Aug 2002 03:00:13 -0000 1.1 --- pninit.php 6 Aug 2002 15:47:33 -0000 1.2 *************** *** 39,159 **** // Create tables ! // *_block_group_instances ! pnDBCreateTable($prefix . '_block_group_instances', ! array('pn_id' => array('type' => 'integer', ! 'unsigned' => true, ! 'null' => false, ! 'default' => 0, ! 'increment' => true, ! 'primary_key' => true) ! 'pn_group_id' => array('type' => 'integer', ! 'unsigned' => true, ! 'null' => false, ! 'default' => 0) ! 'pn_instance_id' => array('type' => 'integer', ! 'unsigned' => true, ! 'null' => false, ! 'default' => 0) ! 'pn_position' => array('type' => 'integer', ! 'unsigned' => true, ! 'null' => false, ! 'default' => 0))); ! /* ! # ! # Dumping data for table `nuke_block_group_instances` ! # ! ! INSERT INTO nuke_block_group_instances (pn_id, pn_group_id, pn_instance_id, pn_position) VALUES (1, 1, 6, 0); ! INSERT INTO nuke_block_group_instances (pn_id, pn_group_id, pn_instance_id, pn_position) VALUES (2, 1, 1, 1); ! INSERT INTO nuke_block_group_instances (pn_id, pn_group_id, pn_instance_id, pn_position) VALUES (3, 1, 7, 2); ! INSERT INTO nuke_block_group_instances (pn_id, pn_group_id, pn_instance_id, pn_position) VALUES (4, 1, 2, 3); ! INSERT INTO nuke_block_group_instances (pn_id, pn_group_id, pn_instance_id, pn_position) VALUES (5, 1, 3, 4); ! INSERT INTO nuke_block_group_instances (pn_id, pn_group_id, pn_instance_id, pn_position) VALUES (6, 1, 4, 5); ! INSERT INTO nuke_block_group_instances (pn_id, pn_group_id, pn_instance_id, pn_position) VALUES (7, 2, 5, 0); ! # -------------------------------------------------------- ! ! # ! # Table structure for table `nuke_block_groups` ! # ! ! DROP TABLE IF EXISTS nuke_block_groups; ! CREATE TABLE nuke_block_groups ( ! pn_id int(11) unsigned NOT NULL auto_increment, ! pn_name varchar(255) NOT NULL default '', ! pn_template varchar(255) default NULL, ! PRIMARY KEY (pn_id), ! UNIQUE KEY pn_name (pn_name) ! ) TYPE=MyISAM; ! ! # ! # Dumping data for table `nuke_block_groups` ! # ! ! INSERT INTO nuke_block_groups (pn_id, pn_name, pn_template) VALUES (1, 'left', 'default'); ! INSERT INTO nuke_block_groups (pn_id, pn_name, pn_template) VALUES (2, 'right', 'right'); ! # -------------------------------------------------------- ! ! # ! # Table structure for table `nuke_block_instances` ! # ! ! DROP TABLE IF EXISTS nuke_block_instances; ! CREATE TABLE nuke_block_instances ( ! pn_id int(11) unsigned NOT NULL auto_increment, ! pn_type_id int(11) unsigned NOT NULL default '0', ! pn_title varchar(255) default NULL, ! pn_content text, ! pn_template varchar(255) default NULL, ! pn_state tinyint(1) NOT NULL default '1', ! pn_refresh int(11) NOT NULL default '0', ! pn_last_update int(11) NOT NULL default '0', ! PRIMARY KEY (pn_id) ! ) TYPE=MyISAM; ! ! # ! # Dumping data for table `nuke_block_instances` ! # ! ! INSERT INTO nuke_block_instances (pn_id, pn_type_id, pn_title, pn_content, pn_template, pn_state, pn_refresh, pn_last_update) VALUES (1, 5, 'Main Menu', 'a:4:{s:5:"style";s:1:"1";s:14:"displaywaiting";i:0;s:14:"displaymodules";s:1:"1";s:7:"content";s:292:"index.php|Home|Back to the home page.LINESPLITindex.php?module=users|My Account|Administer your personal account.LINESPLITindex.php?module=adminpanels&type=admin&func=main|Administration|Administer your PostNuked site.LINESPLITindex.php?module=users&func=logout|Logout|Logout of your account.";}', NULL, 1, 0, 0); ! INSERT INTO nuke_block_instances (pn_id, pn_type_id, pn_title, pn_content, pn_template, pn_state, pn_refresh, pn_last_update) VALUES (2, 5, 'Incoming', 'a:4:{s:5:"style";s:1:"1";s:14:"displaywaiting";s:1:"1";s:14:"displaymodules";i:0;s:7:"content";s:0:"";}', NULL, 0, 0, 0); ! INSERT INTO nuke_block_instances (pn_id, pn_type_id, pn_title, pn_content, pn_template, pn_state, pn_refresh, pn_last_update) VALUES (3, 9, 'Who\'s Online', '', NULL, 1, 0, 0); ! INSERT INTO nuke_block_instances (pn_id, pn_type_id, pn_title, pn_content, pn_template, pn_state, pn_refresh, pn_last_update) VALUES (4, 8, 'Users Block', 'Put anything you want here', NULL, 1, 0, 0); ! INSERT INTO nuke_block_instances (pn_id, pn_type_id, pn_title, pn_content, pn_template, pn_state, pn_refresh, pn_last_update) VALUES (5, 7, 'User\'s Login', '', NULL, 1, 0, 0); ! INSERT INTO nuke_block_instances (pn_id, pn_type_id, pn_title, pn_content, pn_template, pn_state, pn_refresh, pn_last_update) VALUES (6, 2, 'Reminder', 'Please remember to remove the following files from your PostNuke directory<p>·<b>install.php</b> file<p>·<b>install</b> directory<p>If you do not remove these files then users can obtain the password to your database!', NULL, 1, 0, 0); ! INSERT INTO nuke_block_instances (pn_id, pn_type_id, pn_title, pn_content, pn_template, pn_state, pn_refresh, pn_last_update) VALUES (7, 10, 'Admin', '', NULL, 1, 0, 0); ! # -------------------------------------------------------- ! ! # ! # Table structure for table `nuke_block_types` ! # ! ! DROP TABLE IF EXISTS nuke_block_types; ! CREATE TABLE nuke_block_types ( ! pn_id int(11) unsigned NOT NULL auto_increment, ! pn_type varchar(255) NOT NULL default '', ! pn_module varchar(255) NOT NULL default '', ! PRIMARY KEY (pn_id), ! KEY pn_type (pn_type), ! KEY pn_typemodule_index (pn_type(100),pn_module(100)) ! ) TYPE=MyISAM; ! ! # ! # Dumping data for table `nuke_block_types` ! # ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (1, 'text', 'base'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (2, 'html', 'base'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (3, 'php', 'base'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (4, 'finclude', 'base'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (5, 'menu', 'base'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (6, 'thelang', 'base'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (7, 'login', 'users'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (8, 'user', 'users'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (9, 'online', 'users'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (10, 'adminmenu', 'adminpanels'); ! INSERT INTO nuke_block_types (pn_id, pn_type, pn_module) VALUES (11, 'admintop', 'adminpanels'); ! # -------------------------------------------------------- - */ // Register BL tags pnTplRegisterTag('blocks', 'blocks-stateicon', --- 39,202 ---- // Create tables ! // *_block_groups ! $query = pnDBCreateTable($prefix . '_block_groups', ! array('pn_id' => array('type' => 'integer', ! 'null' => false, ! 'default' => '', ! 'increment' => true, ! 'primary_key' => true), ! 'pn_name' => array('type' => 'varchar', ! 'size' => 255, ! 'null' => false, ! 'default' => ''), ! 'pn_template' => array('type' => 'varchar', ! 'size' => 255, ! 'null' => false, ! 'default' => ''))); ! $dbconn->Execute($query); ! ! // Check for db errors ! if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); ! pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', ! new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return NULL; ! } ! ! $query = pnDBCreateIndex($prefix . '_block_groups', ! array('name' => 'pn_name_index', ! 'fields' => array('pn_name'), ! 'unique' => 'true')); ! $dbconn->Execute($query); ! ! // Check for db errors ! if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); ! pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', ! new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return NULL; ! } ! ! // *_block_instances ! $query = pnDBCreateTable($prefix . '_block_instances', ! array('pn_id' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0', ! 'increment' => true, ! 'primary_key' => true), ! 'pn_type_id' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0'), ! 'pn_title' => array('type' => 'varchar', ! 'size' => 255, ! 'null' => true, ! 'default' => NULL), ! 'pn_content' => array('type' => 'text'), ! 'pn_template' => array('type' => 'varchar', ! 'size' => 255, ! 'null' => true, ! 'default' => NULL), ! 'pn_state' => array('type' => 'integer', ! 'size' => 'tiny', ! 'null' => false, ! 'default' => '2'), ! 'pn_refresh' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0'), ! 'pn_last_update' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0'))); ! ! $dbconn->Execute($query); ! ! // Check for db errors ! if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); ! pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', ! new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return NULL; ! } ! ! // *_block_types ! $query = pnDBCreateTable($prefix . '_block_types', ! array('pn_id' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0', ! 'increment' => true, ! 'primary_key' => true), ! 'pn_type' => array('type' => 'varchar', ! 'size' => 255, ! 'null' => false, ! 'default' => ''), ! 'pn_module' => array('type' => 'varchar', ! 'size' => 255, ! 'null' => false, ! 'default' => ''))); ! ! $dbconn->Execute($query); ! ! // Check for db errors ! if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); ! pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', ! new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return NULL; ! } ! ! $query = pnDBCreateIndex($prefix . '_block_types', ! array('name' => 'pn_type_index', ! 'fields' => array('pn_type'), ! 'unique' => false)); ! $dbconn->Execute($query); ! ! // Check for db errors ! if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); ! pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', ! new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return NULL; ! } ! $query = pnDBCreateIndex($prefix . '_block_types', ! array('name' => 'pn_typemodule_index', ! 'fields' => array('pn_type(50)', 'pn_module(50)'), ! 'unique' => true)); ! $dbconn->Execute($query); ! ! // Check for db errors ! if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); ! pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', ! new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return NULL; ! } ! ! // *_block_group_instances ! $query = pnDBCreateTable($prefix . '_block_group_instances', ! array('pn_id' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0', ! 'increment' => true, ! 'primary_key' => true), ! 'pn_group_id' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0'), ! 'pn_instance_id' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0'), ! 'pn_position' => array('type' => 'integer', ! 'null' => false, ! 'default' => '0'))); ! ! $dbconn->Execute($query); ! ! // Check for db errors ! if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); ! pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', ! new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); ! return NULL; ! } // Register BL tags pnTplRegisterTag('blocks', 'blocks-stateicon',
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |