Example #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);
 }
Example #2
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);
 }
Example #3
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);
 }
Example #4
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);
 }
Example #5
0
 public function install()
 {
     //
     // EMAIL TEMPLATES
     //
     $activation_email = array('name' => 'Activation Email', 'slug' => 'activation', 'description' => 'The email which contains the activation code that is sent to a new user', 'subject' => '{{ settings:site_name }} - Account Activation', 'body' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'activation_template_body.html'), 'lang' => 'en', 'type' => 'html', 'module' => 'registration', 'is_default' => 1, 'is_core' => 1);
     $at = Email\Model\Template::create($activation_email);
     $forgotten_password = array('name' => 'Forgotten Password Email', 'slug' => 'forgotten_password', 'description' => 'The email that is sent containing a password reset code', 'subject' => '{{ settings:site_name }} - Forgotten Password', 'body' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'forgotten_template_body.html'), 'lang' => 'en', 'type' => 'html', 'module' => 'registration', 'is_default' => 1, 'is_core' => 1);
     $fp = Email\Model\Template::create($forgotten_password);
     $registered = array('name' => 'New User Registered', 'slug' => 'registered', 'description' => 'Email sent to the site contact e-mail when a new user registers', 'subject' => 'A New user registered to {{ settings:site_name }}', 'body' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'registered_template_body.html'), 'lang' => 'en', 'type' => 'html', 'module' => 'registration', 'is_default' => 1, 'is_core' => 1);
     $re = Email\Model\Template::create($registered);
     $welcome_email = array('name' => 'Welcome Email', 'slug' => 'welcome_email', 'description' => 'The email that is sent to welcome user after account activation', 'subject' => '{{ settings:site_name }} - Welcome!', 'body' => File::get(dirname(__FILE__) . DS . 'data' . DS . 'welcome_template_body.html'), 'lang' => 'en', 'type' => 'html', 'module' => 'registration', 'is_default' => 1, 'is_core' => 1);
     $we = Email\Model\Template::create($welcome_email);
     //
     // REGISTRATION SETTINGS
     //
     $registration_module = \Modules\Model\Module::where_slug('registration')->first();
     $conf_email = array('title' => 'Confirmation Email', 'slug' => 'registration_email_template', 'description' => 'If email confirmation is enabled this is the email template that will be sent to the user on signup', 'type' => 'select', 'default' => $at->id, 'value' => $at->id, 'options' => 'func:registration\\get_email_templates', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'registration', 'module_id' => $registration_module->id);
     $conf_email = Settings\Model\Setting::create($conf_email);
     $registration_disabled = array('title' => 'Registration Disabled', 'slug' => 'registration_disabled', 'description' => 'Enables or disable registration into the application', 'type' => 'select', 'default' => 'no', 'value' => 'no', 'options' => '{"yes":"Yes","no":"No"}', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'registration', 'module_id' => $registration_module->id);
     $registration_disabled = Settings\Model\Setting::create($registration_disabled);
     $registration_pwreset_email_template = array('title' => 'Password Reset Email Template', 'slug' => 'registration_pwreset_email_template', 'description' => 'Email template to be used upon password reset', 'type' => 'select', 'default' => $fp->id, 'value' => $fp->id, 'options' => 'func:registration\\get_email_templates', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'registration', 'module_id' => $registration_module->id);
     $registration_pwreset_email_template = Settings\Model\Setting::create($registration_pwreset_email_template);
     $registration_confirmation_required = array('title' => 'Confirmation Required', 'slug' => 'registration_confirmation_required', 'description' => 'User must confirm email to activate account If set to no user will be able to login after signup', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'registration', 'module_id' => $registration_module->id);
     $registration_confirmation_required = Settings\Model\Setting::create($registration_confirmation_required);
     $registration_admin_new_user = array('title' => 'Admin Registration Email', 'slug' => 'email_admin_on_registration', 'description' => 'Send an email to Admin when a new user registers', 'type' => 'select', 'default' => 'yes', 'value' => 'yes', 'options' => '{"yes":"Yes","no":"No"}', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'registration', 'module_id' => $registration_module->id, 'order' => '999');
     $registration_email_admin_user = Settings\Model\Setting::create($registration_admin_new_user);
     $admin_registration_email_template = array('title' => 'User Registered Email Template', 'slug' => 'admin_registration_email_template', 'description' => 'Template to be used if the admin registration email is enabled', 'type' => 'select', 'default' => $re->id, 'value' => $re->id, 'options' => 'func:registration\\get_email_templates', 'class' => '', 'section' => '', 'validation' => '', 'is_gui' => 1, 'module_slug' => 'registration', 'module_id' => $registration_module->id);
     $admin_registration_email = Settings\Model\Setting::create($admin_registration_email_template);
     //
     // EMAIL NAVIGATION LINK
     //
     $sidebar = Navigation\Model\Group::where_slug('sidebar')->first();
     // Add links to sidebar navigation group
     $sidebar_signup_link = array('title' => 'Sign Up', 'module_id' => $registration_module->id, 'page_id' => '0', 'group_id' => $sidebar->id, 'parent' => '0', 'link_type' => 'uri', 'url' => '', 'uri' => 'signup', 'target' => '', 'order' => '2', 'restricted_to' => '0', 'class' => '', 'is_core' => '1');
     $sidebar_link = Navigation\Model\Link::create($sidebar_signup_link);
     $header = Navigation\Model\Group::where_slug('header')->first();
     $header_signup_link = array('title' => 'Sign Up', 'module_id' => $registration_module->id, 'page_id' => '0', 'group_id' => $header->id, 'parent' => '0', 'link_type' => 'uri', 'url' => '', 'uri' => 'signup', 'target' => '', 'order' => '2', 'restricted_to' => '0', 'class' => '', 'is_core' => '1');
     $header_link = Navigation\Model\Link::create($header_signup_link);
 }
Example #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);
 }