fputs($file, $text); fclose($file); // keys.php $key1 = Crypt::get_hash(Text::random_text(11)); $key2 = Crypt::get_hash(Text::random_text(11)); $key3 = Crypt::get_hash(Text::random_text(11)); $text = '<?php $_KEYS[0] = "nibbl' . $key1 . '"; $_KEYS[1] = "eblog' . $key2 . '"; $_KEYS[2] = "rulez' . $key3 . '"; ?>'; $file = fopen(FILE_KEYS, 'w'); fputs($file, $text); fclose($file); // welcome post $content = '<p>' . $_LANG['WELCOME_POST_LINE1'] . '</p>'; $content .= '<p>' . $_LANG['WELCOME_POST_LINE2'] . '</p>'; $content .= '<p>' . $_LANG['WELCOME_POST_LINE3'] . '</p>'; $_DB_POST = new DB_POSTS(FILE_XML_POSTS); $_DB_POST->add(array('id_user' => 0, 'id_cat' => 0, 'type' => 'simple', 'description' => $_LANG['WELCOME_POST_TITLE'], 'title' => $_LANG['WELCOME_POST_TITLE'], 'content' => $content, 'allow_comments' => '1', 'sticky' => '0', 'slug' => 'welcome-post')); // Plugins $plugins = array('pages', 'categories', 'latest_posts'); foreach ($plugins as $plugin) { include_once PATH_PLUGINS . $plugin . '/plugin.bit'; $class = 'PLUGIN_' . strtoupper($plugin); $obj = new $class(); if (@(!(include PATH_PLUGINS . $plugin . '/languages/' . $_GET['language'] . '.bit'))) { include PATH_PLUGINS . $plugin . '/languages/en_US.bit'; } $merge = array_merge($_LANG, $_PLUGIN_CONFIG['LANG']); $obj->set_lang($merge); $obj->set_attributes(array('name' => $_PLUGIN_CONFIG['LANG']['NAME'], 'description' => $_PLUGIN_CONFIG['LANG']['DESCRIPTION'], 'author' => $_PLUGIN_CONFIG['DATA']['author'], 'version' => $_PLUGIN_CONFIG['DATA']['version'], 'url' => $_PLUGIN_CONFIG['DATA']['url'], 'display' => isset($_PLUGIN_CONFIG['DATA']['display']) ? false : true)); include PATH_PLUGINS . $plugin . '/languages/en_US.bit'; $obj->set_slug_name($_PLUGIN_CONFIG['LANG']['NAME']); $obj->install(0);