10, 'uiPerPage' => 25, 'uiDefaultSortColumn' => timeStamp, 'uiDefaultSortOrder' => ASC, 'uiDateFormat' => '%c', )); conf_update_param('user_info_tracking', $user_info_tracking_default_config); $conf['user_info_tracking'] = $user_info_tracking_default_config; } else { // if you need to test the "old" configuration you must check if not yet unserialized $old_conf = is_string($conf['user_info_tracking']) ? unserialize($conf['user_info_tracking']) : $conf['user_info_tracking']; } // add a new table pwg_query(' CREATE TABLE IF NOT EXISTS `'. $prefixeTable .'user_info_tracking` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `userId` int(11) DEFAULT NULL, `userName` mediumtext DEFAULT NULL, `ipAddress` mediumtext DEFAULT NULL, `timeStamp` mediumtext DEFAULT NULL, `action` mediumtext DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;'); // add a new column to existing table // $result = pwg_query('SHOW COLUMNS FROM `'.IMAGES_TABLE.'` LIKE "skeleton";'); // if (!pwg_db_num_rows($result)) // { // pwg_query('ALTER TABLE `' . IMAGES_TABLE . '` ADD `skeleton` TINYINT(1) NOT NULL DEFAULT 0;'); // } // create a local directory if ( file_exists(PWG_LOCAL_DIR) and !file_exists(PWG_LOCAL_DIR . 'user_info_tracking/') ) { mkdir(PWG_LOCAL_DIR . 'user_info_tracking/', 0755); } } ?>