" user_id C(40) PRIMARY, page_id I4 NOTNULL, data X ", 'wiki_pages' => " page_id I4 PRIMARY, content_id I4 NOTNULL, wiki_page_size I4 DEFAULT 0, description C(200), edit_comment C(200), flag C(1), points I4, votes I4, page_cache X, wiki_cache I8, cache_timestamp I8, page_rank N(4,3) ", 'wiki_received_pages' => " received_page_id I4 AUTO PRIMARY, title C(160) NOTNULL, data X, description C(200), received_comment C(200), received_from_site C(200), received_from_user C(200), received_date I8 ", 'wiki_tags' => " page_id I4 PRIMARY, tag_name C(80) PRIMARY, title C(160), user_id I4 NOTNULL, hits I4, description C(200), data X, last_modified I8, tag_comment C(200), version I4 NOTNULL, ip C(15), flag C(1) ", 'wiki_ext' => " extwiki_id I4 AUTO PRIMARY, name C(200) NOTNULL, extwiki C(255) " ); global $gBitInstaller; $gBitInstaller->makePackageHomeable(WIKI_PKG_NAME); foreach( array_keys( $tables ) AS $tableName ) { $gBitInstaller->registerSchemaTable( WIKI_PKG_NAME, $tableName, $tables[$tableName] ); } $gBitInstaller->registerPackageInfo( WIKI_PKG_NAME, array( 'description' => "A wiki is 'the simplest online database that could possibly work.' No HTML or programming knowledge is needed to contribute to a wiki.", 'license' => 'LGPL', 'version' => '0.1', 'state' => 'experimental', 'dependencies' => '', ) ); // ### Indexes $indices = array ( 'wiki_pages_content_idx' => array( 'table' => 'wiki_pages', 'cols' => 'content_id', 'opts' => 'UNIQUE' ), 'wiki_pages_page_rank_idx' => array( 'table' => 'wiki_pages', 'cols' => 'page_rank', 'opts' => NULL ), 'wiki_page_footnotes_page_idx' => array( 'table' => 'wiki_footnotes', 'cols' => 'page_id', 'opts' => NULL ) ); $gBitInstaller->registerSchemaIndexes( WIKI_PKG_NAME, $indices ); // ### Sequences $sequences = array ( 'wiki_pages_page_id_seq' => array( 'start' => 1 ) ); $gBitInstaller->registerSchemaSequences( WIKI_PKG_NAME, $sequences ); // ### Default UserPermissions $gBitInstaller->registerUserPermissions( WIKI_PKG_NAME, array( array('bit_p_edit_dynvar', 'Can edit dynamic variables', 'editors', WIKI_PKG_NAME), array('bit_p_edit', 'Can edit pages', 'registered', WIKI_PKG_NAME), array('bit_p_view', 'Can view page/pages', 'basic', WIKI_PKG_NAME), array('bit_p_remove', 'Can remove', 'editors', WIKI_PKG_NAME), array('bit_p_rollback', 'Can rollback pages', 'editors', WIKI_PKG_NAME), array('bit_p_admin_wiki', 'Can admin the wiki', 'editors', WIKI_PKG_NAME), array('bit_p_wiki_admin_attachments', 'Can admin attachments to wiki pages', 'editors', WIKI_PKG_NAME), array('bit_p_wiki_view_attachments', 'Can view wiki attachments and download', 'registered', WIKI_PKG_NAME), array('bit_p_upload_picture', 'Can upload pictures to wiki pages', 'registered', WIKI_PKG_NAME), array('bit_p_minor', 'Can save as minor edit', 'registered', WIKI_PKG_NAME), array('bit_p_rename', 'Can rename pages', 'editors', WIKI_PKG_NAME), array('bit_p_lock', 'Can lock pages', 'editors', WIKI_PKG_NAME), array('bit_p_edit_books', 'Can create and edit books', 'registered', WIKI_PKG_NAME), array('bit_p_admin_books', 'Can administer books', 'editors', WIKI_PKG_NAME), array('bit_p_edit_copyrights', 'Can edit copyright notices', 'registered', WIKI_PKG_NAME) ) ); // ### Default Preferences $gBitInstaller->registerPreferences( WIKI_PKG_NAME, array( //array( WIKI_PKG_NAME, 'anon_can_edit','n'), array( WIKI_PKG_NAME, 'autolinks','y'), array( WIKI_PKG_NAME, 'backlinks','y'), array( WIKI_PKG_NAME, 'wiki_dump','y'), array( WIKI_PKG_NAME, 'wiki_history','y'), array( WIKI_PKG_NAME, 'wiki_last_changes','y'), array( WIKI_PKG_NAME, 'wiki_like_pages','y'), array( WIKI_PKG_NAME, 'allow_dup_wiki_page_names','y'), array( WIKI_PKG_NAME, 'wiki_list_pages','y'), array( WIKI_PKG_NAME, 'page_title','y'), //array( WIKI_PKG_NAME, 'wiki_ranking','n'), array( WIKI_PKG_NAME, 'sandbox','y'), //array( WIKI_PKG_NAME, 'warn_on_edit','n'), array( WIKI_PKG_NAME, 'wiki_attachments','y'), array( WIKI_PKG_NAME, 'wiki_books','y'), //array( WIKI_PKG_NAME, 'wiki_comments','n'), array( WIKI_PKG_NAME, 'wiki_description','y'), //array( WIKI_PKG_NAME, 'wiki_discuss','n'), //array( WIKI_PKG_NAME, 'wiki_footnotes','n'), //array( WIKI_PKG_NAME, 'wiki_icache','n'), //array( WIKI_PKG_NAME, 'wiki_monosp','n'), //array( WIKI_PKG_NAME, 'wiki_multiprint','n'), //array( WIKI_PKG_NAME, 'wiki_notepad','n'), //array( WIKI_PKG_NAME, 'wiki_generate_pdf',''), array( WIKI_PKG_NAME, 'wiki_pictures','y'), array( WIKI_PKG_NAME, 'wiki_plurals','y'), array( WIKI_PKG_NAME, 'wiki_rankings','y'), array( WIKI_PKG_NAME, 'wiki_tables','new'), //array( WIKI_PKG_NAME, 'wiki_templates','n'), //array( WIKI_PKG_NAME, 'wiki_undo','n'), //array( WIKI_PKG_NAME, 'wiki_usrlock','n'), array( WIKI_PKG_NAME, 'wiki_words','y'), //array( WIKI_PKG_NAME, 'keep_versions','1'), //array( WIKI_PKG_NAME, 'max_versions','0'), array( WIKI_PKG_NAME, 'w_use_db','y'), //array( WIKI_PKG_NAME, 'w_use_dir',''), array( WIKI_PKG_NAME, 'warn_on_edit_time','2'), //array( WIKI_PKG_NAME, 'wiki_bot_bar','n'), array( WIKI_PKG_NAME, 'wiki_cache','0'), //array( WIKI_PKG_NAME, 'wiki_creator_admin','n'), //array( WIKI_PKG_NAME, 'wiki_copyrights','n'), //array( WIKI_PKG_NAME, 'wiki_forum',''), //array( WIKI_PKG_NAME, 'wiki_forum_id',''), array( WIKI_PKG_NAME, 'wiki_left_column','y'), array( WIKI_PKG_NAME, 'wiki_list_backlinks','y'), array( WIKI_PKG_NAME, 'wiki_list_comment','y'), array( WIKI_PKG_NAME, 'wiki_list_creator','y'), array( WIKI_PKG_NAME, 'wiki_list_hits','y'), array( WIKI_PKG_NAME, 'wiki_list_lastmodif','y'), array( WIKI_PKG_NAME, 'wiki_list_lastver','y'), array( WIKI_PKG_NAME, 'wiki_list_links','y'), array( WIKI_PKG_NAME, 'wiki_list_name','y'), array( WIKI_PKG_NAME, 'wiki_list_size','y'), array( WIKI_PKG_NAME, 'wiki_list_status','y'), array( WIKI_PKG_NAME, 'wiki_list_user','y'), array( WIKI_PKG_NAME, 'wiki_list_versions','y'), array( WIKI_PKG_NAME, 'wiki_page_regex','strict'), array( WIKI_PKG_NAME, 'wiki_right_column','y'), //array( WIKI_PKG_NAME, 'wiki_spellcheck','n'), //array( WIKI_PKG_NAME, 'wiki_top_bar','n'), //array( WIKI_PKG_NAME, 'wiki_uses_slides','n'), array( WIKI_PKG_NAME, 'wikibook_show_path','y'), array( WIKI_PKG_NAME, 'wikibook_show_navigation','y'), array( WIKI_PKG_NAME, 'wiki_home_page','Welcome'), //array( WIKI_PKG_NAME, 'wiki_license_page',''), //array( WIKI_PKG_NAME, 'wiki_submit_notice',''), ) ); if( defined( 'RSS_PKG_NAME' ) ) { $gBitInstaller->registerPreferences( WIKI_PKG_NAME, array( array( RSS_PKG_NAME, 'rss_'.WIKI_PKG_NAME, 'y'), ) ); } ?>