Exemple #1
0
 public function install()
 {
     $module = Modules\Model\Module::where_slug('opensim')->first();
     $passes_db_settings = array('title' => 'Passes Database Settings', 'slug' => 'passes_db_settings', 'description' => 'If database settings are ok it should be set to 1 do not change this manually', 'type' => 'hidden', 'default' => '0', 'value' => '0', 'options' => '', 'section' => 'opensim_db_settings', 'validation' => '', 'class' => '', 'is_gui' => '0', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $passes_db_settings = Settings\Model\Setting::create($passes_db_settings);
     $database_driver = array('title' => 'Database Driver', 'slug' => 'database_driver', 'description' => 'The database type used by robust.', 'type' => 'select', 'default' => 'mysql', 'value' => 'mysql', 'options' => '{"mysql":"Mysql"}', 'section' => 'opensim_db_settings', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $database_driver = Settings\Model\Setting::create($database_driver);
     $database_host = array('title' => 'Database Host', 'slug' => 'database_host', 'description' => 'Robust database hostname.', 'type' => 'text', 'default' => '127.0.0.1', 'value' => '127.0.0.1', 'options' => '', 'section' => 'opensim_db_settings', 'validation' => 'required', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $database_host = Settings\Model\Setting::create($database_host);
     $database_name = array('title' => 'Database Name', 'slug' => 'database_name', 'description' => 'Robust database name. If sqlite database is used enter here the path to the database.', 'type' => 'text', 'default' => 'opensim', 'value' => 'opensim', 'options' => '', 'section' => 'opensim_db_settings', 'validation' => 'required|alpha_dash', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $database_name = Settings\Model\Setting::create($database_name);
     $database_user = array('title' => 'Database User', 'slug' => 'database_user', 'description' => 'The username to connect to robust database.', 'type' => 'text', 'default' => 'opensim', 'value' => 'opensim', 'options' => '', 'section' => 'opensim_db_settings', 'validation' => 'required', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $database_user = Settings\Model\Setting::create($database_user);
     $database_password = array('title' => 'Database Password', 'slug' => 'database_password', 'description' => 'Password to connect to robust database.', 'type' => 'password', 'default' => '', 'value' => '', 'options' => '', 'section' => 'opensim_db_settings', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $database_password = Settings\Model\Setting::create($database_password);
     $database_table_prefix = array('title' => 'Table Prefix', 'slug' => 'database_table_prefix', 'description' => 'The robust database table prefix&#46 Leave empty if no prefix is used.', 'type' => 'text', 'default' => '', 'value' => '', 'options' => '', 'section' => 'opensim_db_settings', 'validation' => 'alpha_dash', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $database_table_prefix = Settings\Model\Setting::create($database_table_prefix);
     $database_port = array('title' => 'Database Port', 'slug' => 'database_port', 'description' => 'The robust database port.', 'type' => 'text', 'default' => '3306', 'value' => '3306', 'options' => '', 'section' => 'opensim_db_settings', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $database_port = Settings\Model\Setting::create($database_port);
     $opensim_home_location = array('title' => 'Home Location', 'slug' => 'opensim_home_location', 'description' => 'Set home location for new accounts', 'type' => 'select', 'default' => '', 'value' => '', 'options' => 'func:opensim\\get_regions', 'section' => 'opensim_settings', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $opensim_home_location = Settings\Model\Setting::create($opensim_home_location);
     $opensim_position_location = array('title' => 'Home Position', 'slug' => 'opensim_position_location', 'description' => 'Set start position for the avatar&#46; It should be a vector &ltx,y,z&gt where the avatar will land&#46;', 'type' => 'text', 'default' => '<128,128,50>', 'value' => '<128,128,50>', 'options' => '', 'section' => 'opensim_settings', 'validation' => 'required|vector', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $opensim_position_location = Settings\Model\Setting::create($opensim_position_location);
     $opensim_remove_old_regions = array('title' => 'Remove Old Regions', 'slug' => 'opensim_remove_old_regions', 'description' => 'Remove regions last seen with more days then specified&#46;', 'type' => 'select', 'default' => '0', 'value' => '0', 'options' => '{"0":"Disabled","1":"1 Day","7":"7 Days","15":"15 Days","30":"30 Days"}', 'section' => 'opensim_settings', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'opensim', 'module_id' => $module->id, 'order' => '999');
     $opensim_remove_old_regions = Settings\Model\Setting::create($opensim_remove_old_regions);
 }
Exemple #2
0
 public function install()
 {
     $module = Modules\Model\Module::where_slug('navigation')->first();
     $home_page = Pages\Model\Page::where_slug('home')->first();
     $header = array('title' => 'Header', 'slug' => 'header', 'module_id' => $module->id, 'is_core' => '1');
     $header = Navigation\Model\Group::create($header);
     // Add links to header navigation group
     $header_home_link = array('title' => 'Home', 'module_id' => $module->id, 'page_id' => isset($home_page->id) ? $home_page->id : '1', 'group_id' => $header->id, 'parent' => '0', 'link_type' => 'page', 'url' => '', 'uri' => '', 'target' => '', 'order' => '1', 'restricted_to' => '0', 'class' => '', 'is_core' => '1');
     $header_link = Navigation\Model\Link::create($header_home_link);
     $about_us = Pages\Model\Page::where_slug('about-us')->first();
     $header_about_us_link = array('title' => 'About Us', 'module_id' => $module->id, 'page_id' => isset($about_us->id) ? $about_us->id : '3', 'group_id' => $header->id, 'parent' => '0', 'link_type' => 'page', 'url' => '', 'uri' => '', 'target' => '', 'order' => '1', 'restricted_to' => '0', 'class' => '', 'is_core' => '1');
     $header_a_us_link = Navigation\Model\Link::create($header_about_us_link);
     $sidebar = array('title' => 'Sidebar', 'slug' => 'sidebar', 'module_id' => $module->id, 'is_core' => '1');
     $sidebar = Navigation\Model\Group::create($sidebar);
     // Add links to sidebar navigation group
     $sidebar_home_link = array('title' => 'Home', 'module_id' => $module->id, 'page_id' => isset($home_page->id) ? $home_page->id : '1', 'group_id' => $sidebar->id, 'parent' => '0', 'link_type' => 'page', 'url' => '', 'uri' => '', 'target' => '', 'order' => '1', 'restricted_to' => '0', 'class' => '', 'is_core' => '1');
     $sidebar_link = Navigation\Model\Link::create($sidebar_home_link);
     $footer = array('title' => 'Footer', 'slug' => 'footer', 'module_id' => $module->id, 'is_core' => '1');
     $footer = Navigation\Model\Group::create($footer);
     // Add links to footer navigation group
     $footer_home_link = array('title' => 'Home', 'module_id' => $module->id, 'page_id' => isset($home_page->id) ? $home_page->id : '1', 'group_id' => $footer->id, 'parent' => '0', 'link_type' => 'page', 'url' => '', 'uri' => '', 'target' => '', 'order' => '1', 'restricted_to' => '0', 'class' => '', 'is_core' => '1');
     $footer_link = Navigation\Model\Link::create($footer_home_link);
     $footer_about_us_link = array('title' => 'About Us', 'module_id' => $module->id, 'page_id' => isset($about_us->id) ? $about_us->id : '3', 'group_id' => $footer->id, 'parent' => '0', 'link_type' => 'page', 'url' => '', 'uri' => '', 'target' => '', 'order' => '1', 'restricted_to' => '0', 'class' => '', 'is_core' => '1');
     $footer_a_us_link = Navigation\Model\Link::create($footer_about_us_link);
 }
Exemple #3
0
 public function install()
 {
     $module = Modules\Model\Module::where_slug('themes')->first();
     $backend = array('name' => 'Base Backend Theme', 'slug' => 'base_bke', 'description' => 'Basic backend application theme', 'layout' => 'admin', 'layout_css' => '', 'layout_js' => '', 'layout_default' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'backend_layout.html'), 'layout_content' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'backend_layout.html'), 'author' => 'Jefferson Costella', 'version' => '1.0.0', 'url' => '#', 'layer' => 'backend', 'is_default' => '1', 'is_core' => '1', 'enabled' => '1');
     $backend = Themes\Model\Theme::create($backend);
     $frontend = array('name' => 'Base Frontend Theme', 'slug' => 'base_fte', 'description' => 'Basic frontend application theme', 'layout' => 'application', 'layout_css' => '', 'layout_js' => '', 'layout_default' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'frontend_layout.html'), 'layout_content' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'frontend_layout.html'), 'author' => 'Jefferson Costella', 'version' => '1.0.0', 'url' => '#', 'layer' => 'frontend', 'is_default' => '1', 'is_core' => '1', 'enabled' => '1');
     $frontend = Themes\Model\Theme::create($frontend);
     $frontend_theme = array('title' => 'Base Frontend Theme', 'slug' => 'frontend_theme', 'description' => 'Basic application frontend theme', 'type' => 'hidden', 'default' => 'base_fte', 'value' => 'base_fte', 'options' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'themes', 'module_id' => $module->id, 'order' => '999');
     $frontend_theme = Settings\Model\Setting::create($frontend_theme);
     $frontend_layout = array('title' => 'Frontend Layout', 'slug' => 'frontend_layout', 'description' => 'Application frontend layout', 'type' => 'hidden', 'default' => 'application', 'value' => 'application', 'options' => '', 'section' => '', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'themes', 'module_id' => $module->id, 'order' => '999');
     $frontend_layout = Settings\Model\Setting::create($frontend_layout);
     $backend_layout = array('title' => 'Backend Layout', 'slug' => 'backend_layout', 'description' => 'Administration Layout', 'type' => 'hidden', 'default' => 'admin', 'value' => 'admin', 'options' => '', 'section' => '', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'themes', 'module_id' => $module->id, 'order' => '999');
     $backend_layout = Settings\Model\Setting::create($backend_layout);
     $backend_theme = array('title' => 'Backend base theme', 'slug' => 'backend_theme', 'description' => 'Application backend basic theme', 'type' => 'hidden', 'default' => 'base_bke', 'value' => 'base_bke', 'options' => '', 'section' => '', 'validation' => '', 'class' => '', 'is_gui' => '1', 'module_slug' => 'themes', 'module_id' => $module->id, 'order' => '999');
     $backend_theme = Settings\Model\Setting::create($backend_theme);
 }
Exemple #4
0
 public function install()
 {
     $module = Modules\Model\Module::where_slug('splashscreen')->first();
     $splashscreen_show_regions_list = array('title' => 'Show Regions List', 'slug' => 'splashscreen_show_regions_list', 'description' => 'Show Regions list block, if no regions are attachet to the grid the block will not show', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'settings', 'section' => 'settings', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_regions_list = Settings\Model\Setting::create($splashscreen_show_regions_list);
     $splashscreen_show_flash_news = array('title' => 'Show Flash News', 'slug' => 'splashscreen_show_flash_news', 'description' => 'Show flash news block', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'settings', 'section' => 'settings', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_flash_news = Settings\Model\Setting::create($splashscreen_show_flash_news);
     $splashscreen_slug = array('title' => 'Splash Screen Slug', 'slug' => 'splashscreen_slug', 'description' => 'The URI of the splash screen', 'type' => 'text', 'default' => 'splash_screen', 'value' => 'splash_screen', 'options' => '', 'class' => 'settings', 'section' => 'settings', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_slug = Settings\Model\Setting::create($splashscreen_slug);
     $splashscreen_flash_news_handler = array('title' => 'Flash News Handler', 'slug' => 'splashscreen_flash_news_handler', 'description' => 'The handler for flash news', 'type' => 'text', 'default' => 'flash_news', 'value' => 'flash_news', 'options' => '', 'class' => 'settings', 'section' => 'settings', 'validation' => 'required', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_flash_news_handler = Settings\Model\Setting::create($splashscreen_flash_news_handler);
     $splashscreen_flash_news_link = array('title' => 'Flash News Link Target', 'slug' => 'splashscreen_flash_news_link', 'description' => 'Set the target of the flash news link', 'type' => 'select', 'default' => '_self', 'value' => '_self', 'options' => '{"_self":"Same Window","_blank":"New Window"}', 'class' => 'settings', 'section' => 'settings', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_flash_news_link = Settings\Model\Setting::create($splashscreen_flash_news_link);
     $splashscreen_effect = array('title' => 'Splash Screen Effect', 'slug' => 'splashscreen_effect', 'description' => 'The effect to be used on the splash screen', 'type' => 'select', 'default' => 'time_of_day', 'value' => 'time_of_day', 'options' => '{"loop_background":"Loop Background","time_of_day":"Time of Day"}', 'class' => 'settings', 'section' => 'settings', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_effect = Settings\Model\Setting::create($splashscreen_effect);
     $splashscreen_effect_time = array('title' => 'Time of Day Delay', 'slug' => 'splashscreen_effect_time', 'description' => 'When using time of day effect, you can set the delay between images (1000 = 1 sec)', 'type' => 'text', 'default' => '15000', 'value' => '15000', 'options' => '', 'class' => 'settings', 'section' => 'settings', 'validation' => 'required|integer', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_effect_time = Settings\Model\Setting::create($splashscreen_effect_time);
     $splashscreen_show_grid_status_block = array('title' => 'Show grid status block', 'slug' => 'splashscreen_show_grid_status_block', 'description' => 'Show/Hide grid status box', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'grid_status_block', 'section' => 'grid_status_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_grid_status_block = Settings\Model\Setting::create($splashscreen_show_grid_status_block);
     $splashscreen_grid_status = array('title' => 'Grid Online', 'slug' => 'splashscreen_grid_status', 'description' => 'Set the grid info box status', 'type' => 'select', 'default' => 'Online', 'value' => 'Online', 'options' => '{"online":"Online","offline":"Offline"}', 'class' => 'grid_status_block', 'section' => 'grid_status_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_grid_status = Settings\Model\Setting::create($splashscreen_grid_status);
     $splashscreen_show_total_users = array('title' => 'Show Total Users', 'slug' => 'splashscreen_show_total_users', 'description' => 'Show the total users registered', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'grid_status_block', 'section' => 'grid_status_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_total_users = Settings\Model\Setting::create($splashscreen_show_total_users);
     $splashscreen_show_total_regions = array('title' => 'Show Total Regions', 'slug' => 'splashscreen_show_total_regions', 'description' => 'Show the total regions registered to the grid', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'grid_status_block', 'section' => 'grid_status_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_total_regions = Settings\Model\Setting::create($splashscreen_show_total_regions);
     $splashscreen_show_active_users = array('title' => 'Show Total Active Users', 'slug' => 'splashscreen_show_active_users', 'description' => 'Show the count of all active users in the last 30 days', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'grid_status_block', 'section' => 'grid_status_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_active_users = Settings\Model\Setting::create($splashscreen_show_active_users);
     $splashscreen_show_online_users = array('title' => 'Show Total Online Users', 'slug' => 'splashscreen_show_online_users', 'description' => 'Show the count of all users currently online', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'grid_status_block', 'section' => 'grid_status_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_online_users = Settings\Model\Setting::create($splashscreen_show_online_users);
     $splashscreen_show_top_left_block = array('title' => 'Show Left Block', 'slug' => 'splashscreen_show_top_left_block', 'description' => 'Show the top left message block', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'message_block', 'section' => 'message_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_top_left_block = Settings\Model\Setting::create($splashscreen_show_top_left_block);
     $splashscreen_top_left_block_title = array('title' => 'Block Title', 'slug' => 'splashscreen_top_left_block_title', 'description' => 'Show the top left message block', 'type' => 'text', 'default' => '', 'value' => 'Lorem ipsum dolor sit amet!!', 'options' => '', 'class' => 'message_block', 'section' => 'message_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_top_left_block_title = Settings\Model\Setting::create($splashscreen_top_left_block_title);
     $splashscreen_top_left_block_body = array('title' => 'Block Text', 'slug' => 'splashscreen_top_left_block_body', 'description' => 'Show the top left message block', 'type' => 'textarea', 'default' => '', 'value' => 'Lorem ipsum dolor sit amet! <br /> Lorem ipsum dolor sit amet! <br /> Lorem ipsum dolor sit amet!', 'options' => '', 'class' => 'message_block', 'section' => 'message_block', 'validation' => 'required', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_top_left_block_body = Settings\Model\Setting::create($splashscreen_top_left_block_body);
     $splashscreen_show_grid_status_message_block = array('title' => 'Show Message Block', 'slug' => 'splashscreen_show_grid_status_message_block', 'description' => 'Show the gris status message block', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => 'status_message_block', 'section' => 'status_message_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_show_grid_status_message_block = Settings\Model\Setting::create($splashscreen_show_grid_status_message_block);
     $splashscreen_grid_status_message_block_color = array('title' => 'Block Color', 'slug' => 'splashscreen_grid_status_message_block_color', 'description' => 'Set the block color', 'type' => 'select', 'default' => 'green', 'value' => 'green', 'options' => '{"white":"White","green":"Green","yellow":"Yellow","red":"Red"}', 'class' => 'status_message_block', 'section' => 'status_message_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_grid_status_message_block_color = Settings\Model\Setting::create($splashscreen_grid_status_message_block_color);
     $splashscreen_grid_status_message_block_title = array('title' => 'Block Title', 'slug' => 'splashscreen_grid_status_message_block_title', 'description' => 'Show the grid status message block', 'type' => 'text', 'default' => '', 'value' => 'Lorem ipsum dolor sit amet!', 'options' => '', 'class' => 'status_message_block', 'section' => 'status_message_block', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_grid_status_message_block_title = Settings\Model\Setting::create($splashscreen_grid_status_message_block_title);
     $splashscreen_grid_status_message_block_body = array('title' => 'Lorem ipsum dolor sit amet!', 'slug' => 'splashscreen_grid_status_message_block_body', 'description' => 'Grid status message block text', 'type' => 'textarea', 'default' => '', 'value' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'options' => '', 'class' => 'status_message_block', 'section' => 'status_message_block', 'validation' => 'required', 'is_gui' => '1', 'module_slug' => 'splashscreen', 'module_id' => $module->id, 'order' => '999');
     $splashscreen_grid_status_message_block_body = Settings\Model\Setting::create($splashscreen_grid_status_message_block_body);
     $welcome_flash_news = array('slug' => 'welcome', 'title' => 'Welcome', 'message' => 'Welcome! This is a flash news message!', 'is_enabled' => 1);
     $welcome_flash_news = \Splashscreen\Model\News::create($welcome_flash_news);
 }
Exemple #5
0
 public function install()
 {
     $module = Modules\Model\Module::where_slug('email')->first();
     $mail_protocol = array('title' => 'Mail Protocol', 'slug' => 'mail_protocol', 'description' => 'Select desired email protocol', 'type' => 'select', 'default' => 'mail', 'value' => 'mail', 'options' => '{"mail":"Mail","sendmail":"Sendmail","smtp":"SMTP"}', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'email', 'module_id' => $module->id, 'order' => '999');
     $mail_protocol = Settings\Model\Setting::create($mail_protocol);
     $sendmail_path = array('title' => 'Sendmail Path', 'slug' => 'mail_sendmail_path', 'description' => 'Path to server sendmail binary', 'type' => 'text', 'default' => '/usr/sbin/sendmail', 'value' => '/usr/sbin/sendmail', 'options' => '', 'class' => 'conf-sendmail', 'section' => '', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'email', 'module_id' => $module->id, 'order' => '999');
     $sendmail_path = Settings\Model\Setting::create($sendmail_path);
     $smtp_hostname = array('title' => 'SMTP Host Name', 'slug' => 'mail_smtp_host', 'description' => 'The host name of your smtp server', 'type' => 'text', 'default' => '', 'value' => '', 'options' => '', 'class' => 'conf-sendmail', 'section' => '', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'email', 'module_id' => $module->id, 'order' => '999');
     $smtp_hostname = Settings\Model\Setting::create($smtp_hostname);
     $smtp_password = array('title' => 'SMTP Password', 'slug' => 'mail_smtp_pass', 'description' => 'SMTP Password', 'type' => 'password', 'default' => '', 'value' => '', 'options' => '', 'class' => 'conf-smtp', 'section' => '', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'email', 'module_id' => $module->id, 'order' => '999');
     $smtp_password = Settings\Model\Setting::create($smtp_password);
     $smtp_port = array('title' => 'SMTP Port', 'slug' => 'mail_smtp_port', 'description' => 'SMTP port number', 'type' => 'text', 'default' => '', 'value' => '', 'options' => '', 'class' => 'conf-smtp', 'section' => '', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'email', 'module_id' => $module->id, 'order' => '999');
     $smtp_port = Settings\Model\Setting::create($smtp_port);
     $smtp_username = array('title' => 'SMTP User Name', 'slug' => 'mail_smtp_user', 'description' => 'SMTP user name', 'type' => 'text', 'default' => '', 'value' => '', 'options' => '', 'class' => 'conf-smtp', 'section' => '', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'email', 'module_id' => $module->id, 'order' => '999');
     $smtp_username = Settings\Model\Setting::create($smtp_username);
     $admin_email = array('title' => 'Server E-mail', 'slug' => 'server_email', 'description' => 'All e-mails to users will come from this e-mail address', 'type' => 'text', 'default' => '*****@*****.**', 'value' => '*****@*****.**', 'options' => '', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => '1', 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => '999');
     $admin_email = Settings\Model\Setting::create($admin_email);
 }
Exemple #6
0
 public function install()
 {
     $module = Modules\Model\Module::where_slug('settings')->first();
     $administration_uri = array('title' => 'Administration URI', 'slug' => 'administration_uri', 'description' => 'Set the application administration URI', 'type' => 'text', 'default' => 'admin', 'value' => 'admin', 'options' => '', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $administration_uri = Settings\Model\Setting::create($administration_uri);
     $site_name = array('title' => 'Site Name', 'slug' => 'site_name', 'description' => 'The site name', 'type' => 'text', 'default' => 'Unknown Grid', 'value' => 'Unknown Grid', 'options' => '', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $site_name = Settings\Model\Setting::create($site_name);
     $backend_language = array('title' => 'Backend Language', 'slug' => 'backend_language', 'description' => 'Set the application administration language', 'type' => 'select', 'default' => 'en', 'value' => 'en', 'options' => 'func:settings\\get_available_languages', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $backend_language = Settings\Model\Setting::create($backend_language);
     $frontend_language = array('title' => 'Frontend Language', 'slug' => 'frontend_language', 'description' => 'Frontend Application Language', 'type' => 'hidden', 'default' => 'en', 'value' => 'en', 'options' => 'func:settings\\get_available_languages', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 0, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $frontend_language = Settings\Model\Setting::create($frontend_language);
     $available_languages = array('title' => 'Available Languages', 'slug' => 'available_languages', 'description' => 'List of available languages for the application', 'type' => 'hidden', 'default' => '{"en":"English","br":"Português do Brasil","fr":"Français"}', 'value' => '{"en":"English","br":"Português do Brasil","fr":"Français"}', 'options' => '{"en":"English","br":"Português do Brasil","fr":"Français"}', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 0, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $available_languages = Settings\Model\Setting::create($available_languages);
     $records_per_page = array('title' => 'Records Per Page', 'slug' => 'records_per_page', 'description' => 'How many records should we show per page in the admin section?', 'type' => 'select', 'default' => '10', 'value' => '10', 'options' => '{"10":"10","25":"25","50":"50","100":"100"}', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $records_per_page = Settings\Model\Setting::create($records_per_page);
     $site_maintenance = array('title' => 'Maintenance Mode', 'slug' => 'site_maintenance', 'description' => 'Lock application in maintenance mode', 'type' => 'select', 'default' => 'no', 'value' => 'no', 'options' => '{"yes":"Yes","no":"No"}', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $site_maintenance = Settings\Model\Setting::create($site_maintenance);
     $settings_time_zone = array('title' => 'Time Zone', 'slug' => 'settings_time_zone', 'description' => 'Time zone to be used by the system', 'type' => 'select', 'default' => 'America/Sao_Paulo', 'value' => 'America/Sao_Paulo', 'options' => 'func:\\settings\\get_available_time_zones', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $settings_time_zone = Settings\Model\Setting::create($settings_time_zone);
     $settings_date_format = array('title' => 'Date Format', 'slug' => 'settings_date_format', 'description' => 'How should dates be displayed across the website and administration area? Please refer to: <a href="http://php&#46;net/manual/en/function&#46;date&#46;php" target="_blank">date format</a> from PHP - OR - Using the format of <a href="http://php&#46;net/manual/en/function&#46;strftime&#46;php" target="_blank">strings formatted as date</a> from PHP&#46;', 'type' => 'text', 'default' => 'D d F h:i A', 'value' => 'D d F h:i A', 'options' => '', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $settings_date_format = Settings\Model\Setting::create($settings_date_format);
     $application_keywords = array('title' => 'Application Keywords', 'slug' => 'application_keywords', 'description' => 'Set the application keywords', 'type' => 'hidden', 'default' => 'World,Avatar,Virtual,Opensim,Grid', 'value' => 'World,Avatar,Virtual,Opensim,Grid', 'options' => '', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'settings', 'module_id' => $module->id, 'order' => 999);
     $application_keywords = Settings\Model\Setting::create($application_keywords);
 }