Esempio n. 1
0
 /**
  * Called immediately after creating a page.
  * Override this function to customize initialization.
  * @see _make_page()
  * @param ENVIRONMENT $env
  * @param THEMED_PAGE $page
  * @access private
  */
 protected function _init_page($env, $page)
 {
     /* Set default properties for the <PAGE_TITLE>. */
     $page->title->group = $env->title;
     /* Force common local storage (client-side cookies) for the entire site. */
     $page->storage->prefix = 'webcore_';
     $page->storage->path = '/';
     /* Customize the page template. The example below adjusts the logo and
      * copyright rendered by the default template (See DEFAULT_TEMPLATE_RENDERER).
      * For more information on individual settings, see the documentation for
      * <PAGE_TEMPLATE_OPTIONS> and <PAGE_ICON_OPTIONS>.
      */
     $page->template_options->logo_file = '{icons}/logos/earthli_webcore_logo_full';
     $page->template_options->logo_title = 'earthli WebCore';
     $page->template_options->copyright = "Copyright (c) " . date('Y') . " Copyright holder. All Rights Reserved.";
     $page->icon_options->file_name = '{icons}/logos/webcore_icon';
     $page->icon_options->mime_type = 'image/png';
     /* Set the default theme. Look in the '{styles}/fonts' folder for font faces,
      * '{styles}/core' for font sizes and '{styles}/themes' for themes.
      */
     $page->default_theme->main_CSS_file_name = '{styles}themes/ice';
     $page->default_theme->font_name_CSS_file_name = '{styles}fonts/verdana';
     $page->default_theme->font_size_CSS_file_name = '{styles}core/small';
     /* Set up database options. */
     $page->database_options->host = 'localhost';
     // sets the default
     $page->database_options->name = 'earthli';
     $page->database_options->user_name = 'root';
     // sets the default
     $page->database_options->password = '';
     /* Set up basic mailing options. */
     $page->mail_options->enabled = false;
     $page->mail_options->SMTP_server = $env->default_domain();
     $page->mail_options->webmaster_address = 'webmaster@' . $env->default_domain();
     $page->mail_options->send_from_address = 'webmaster@' . $env->default_domain();
     $page->mail_options->send_from_name = $env->title;
     $page->mail_options->log_file_name = '{logs}earthli_mail.log';
     /* Set up icon aliases; controls which paths are updated by themes. */
     $page->add_as_icon_listener_to($env);
     $page->add_as_icon_listener_to($page);
     $page->add_icon_alias($env, Folder_name_icons);
 }