';
}
if ( $this->site_disabled && $session->user_level >= USER_LEVEL_ADMIN && ( $paths->page != $paths->nslist['Special'] . 'Administration' ) )
@@ -871,78 +905,294 @@
else return '';
}
- function process_template($file) {
+ /**
+ * Compiles and executes a template based on the current variables and booleans. Loads
+ * the theme and initializes variables if needed. This mostly just calls child functions.
+ * @param string File to process
+ * @return string
+ */
+
+ function process_template($file)
+ {
global $db, $session, $paths, $template, $plugins; // Common objects
if(!defined('ENANO_TEMPLATE_LOADED'))
{
$this->load_theme();
$this->init_vars();
}
- eval($this->compile_template($file));
- return $tpl_code;
+
+ $compiled = $this->compile_template($file);
+ return eval($compiled);
}
- function extract_vars($file) {
+ /**
+ * Loads variables from the specified template file. Returns an associative array containing the variables.
+ * @param string Template file to process (elements.tpl)
+ * @return array
+ */
+
+ function extract_vars($file)
+ {
global $db, $session, $paths, $template, $plugins; // Common objects
- if(!$this->theme)
+
+ // Sometimes this function gets called before the theme is loaded
+ // This is a bad coding practice so this function will always be picky.
+ if ( !$this->theme )
{
die('$template->extract_vars(): theme not yet loaded, so we can\'t open template files yet...this is a bug and should be reported.
Backtrace, most recent call first:
'.enano_debug_print_backtrace(true).'
');
}
- if(!is_file(ENANO_ROOT . '/themes/'.$this->theme.'/'.$file)) die('Cannot find '.$file.' file for style "'.$this->theme.'", exiting');
- $text = file_get_contents(ENANO_ROOT . '/themes/'.$this->theme.'/'.$file);
+
+ // Full pathname of template file
+ $tpl_file_fullpath = ENANO_ROOT . '/themes/' . $this->theme . '/' . $file;
+
+ // Make sure the template even exists
+ if ( !is_file($tpl_file_fullpath) )
+ {
+ die_semicritical('Cannot find template file',
+ '
The template parser was asked to load the file "' . htmlspecialchars($filename) . '", but that file couldn\'t be found in the directory for
+ the current theme.
');
+
+ return $text;
+
+ }
+
+ /**
+ * Compiles the contents of a given template file, possibly using a cached copy, and returns the compiled code.
+ * @param string Filename of template (header.tpl)
+ * @return string
+ */
+
+ function compile_template($filename)
+ {
+ global $db, $session, $paths, $template, $plugins; // Common objects
+ // Full path to template file
+ $tpl_file_fullpath = ENANO_ROOT . '/themes/' . $this->theme . '/' . $filename;
+
+ // Make sure the file exists
+ if ( !is_file($tpl_file_fullpath) )
+ {
+ die_semicritical('Cannot find template file',
+ '
The template parser was asked to load the file "' . htmlspecialchars($filename) . '", but that file couldn\'t be found in the directory for
+ the current theme.
');
+ }
+
+ // Check for cached copy
+ // This will make filenames in the pattern of theme-file.tpl.php
+ $cache_file = ENANO_ROOT . '/cache/' . $this->theme . '-' . str_replace('/', '-', $filename) . '.php';
+
+ // Only use cached copy if caching is enabled
+ // (it is enabled by default I think)
+ if ( file_exists($cache_file) && getConfig('cache_thumbs') == '1' )
+ {
+ // Cache files are auto-generated, but otherwise are normal PHP files
+ include($cache_file);
+
+ // Fetch content of the ORIGINAL
+ $text = file_get_contents($tpl_file_fullpath);
+
+ // $md5 will be set by the cached file
+ // This makes sure that a cached copy of the template is used only if its MD5
+ // matches the MD5 of the file that the compiled file was compiled from.
+ if ( isset($md5) && $md5 == md5($text) )
+ {
+ return $this->compile_template_text_post(str_replace('\\"', '"', $tpl_text));
+ }
+ }
+
+ // We won't use the cached copy here
+ $text = file_get_contents($tpl_file_fullpath);
+
+ // This will be used later when writing the cached file
$md5 = md5($text);
- $seed = md5 ( microtime() . mt_rand() );
- preg_match_all("/<\?php(.*?)\?>/is", $text, $m);
- //die('
'.htmlspecialchars(print_r($m, true)).'
');
- for($i = 0; $i < sizeof($m[1]); $i++)
+ // Preprocessing and checks complete - compile the code
+ $text = $this->compile_tpl_code($text);
+
+ // Perhaps caching is enabled and the admin has changed the template?
+ if ( is_writable( ENANO_ROOT . '/cache/' ) && getConfig('cache_thumbs') == '1' )
{
- $text = str_replace("", "{PHPCODE:{$i}:{$seed}}", $text);
- }
- //die('
@@ -133,14 +138,19 @@
';
if($paths->wiki_mode)
- echo 'Edit summary: This is a minor edit ';
+ echo $lang->get('editor_lbl_edit_summary') . ' This is a minor edit ';
echo '
-
-
-
-
+
+
+
+
If you think that this page is not relavent to the content on this site, or if it looks like this page was only created in
- an attempt to spam the site, you can request that this page be deleted by an administrator.
-
After you vote, you should leave a comment explaining the reason for your vote, especially if you are the first person to
- vote against this page.
-
So far, cpage['delvotes'] == 1 ) ? $paths->cpage['delvotes'] . ' person has' : $paths->cpage['delvotes'] . ' people have'; ?> voted to delete this page.
While the deletion of the page itself is completely reversible, it is impossible to recover any comments or category information on this page. If this is a file page, the file along with all older revisions of it will be permanently deleted. Also, any custom information that this page is tagged with, such as a custom name, protection status, or additional settings such as whether to allow comments, will be permanently lost.
-
Are you absolutely sure that you want to continue?
- You will not be asked again.
');
+ }
if ( isset($_POST['finish']) )
{
$level = intval($_POST['level']);
@@ -355,7 +377,7 @@
$q = $db->sql_query('UPDATE '.table_prefix.'pages SET wiki_mode=' . $level . ' WHERE urlname=\'' . $db->escape($paths->cpage['urlname_nons']) . '\' AND namespace=\'' . $paths->namespace . '\';');
if ( !$q )
$db->_die();
- redirect(makeUrl($paths->page), htmlspecialchars($paths->cpage['name']), 'Wiki mode for this page has been set. Redirecting you to the page...', 2);
+ redirect(makeUrl($paths->page), htmlspecialchars($paths->cpage['name']), $lang->get('page_wikimode_success_redirect'), 2);
}
else
{
@@ -369,17 +391,13 @@
echo '
';
echo '';
echo '';
- $level_txt = ( $level == 0 ) ? 'disabled' : ( ( $level == 1 ) ? 'enabled' : 'use the global setting' );
- $blurb = ( $level == 0 || ( $level == 2 && getConfig('wiki_mode') != '1' ) ) ? 'Because this will disable the wiki behavior on this page, several features, most
- notably the ability for users to vote to have this page deleted, will be disabled as they are not relevant to non-wiki pages. In addition, users will not be able
- to edit this page unless an ACL rule specifically permits them.' : 'Because this will enable the wiki behavior on this page, users will gain the ability to
- freely edit this page unless an ACL rule specifically denies them. If your site is public and gets good traffic, you should be aware of the possiblity of vandalism, and you need to be ready to revert
- malicious edits to this page.';
+ $level_txt = ( $level == 0 ) ? 'page_wikimode_level_off' : ( ( $level == 1 ) ? 'page_wikimode_level_on' : 'page_wikimode_level_global' );
+ $blurb = ( $level == 0 || ( $level == 2 && getConfig('wiki_mode') != '1' ) ) ? 'page_wikimode_blurb_disable' : 'page_wikimode_blurb_enable';
?>
-
You are changing wiki mode for this page.
-
Wiki features will be set to .
-
If you want to continue, please click the button below.
-
+
get('page_wikimode_heading'); ?>
+
get($level_txt) . ' ' . $lang->get($blurb); ?>
+
get('page_wikimode_warning'); ?>
+
';
$template->footer();
@@ -398,16 +416,16 @@
case 'detag':
if ( $session->user_level < USER_LEVEL_ADMIN )
{
- die_friendly('Access denied', '
');
break;
case 'aclmanager':
$data = ( isset($_POST['data']) ) ? $_POST['data'] : Array('mode' => 'listgroups');
diff -r d8156d18ac58 -r 97ae8e9d5e29 install.php
--- a/install.php Thu Sep 27 15:55:37 2007 -0400
+++ b/install.php Sat Nov 03 07:43:35 2007 -0400
@@ -1,1215 +1,1215 @@
-The Enano installer has found a Enano installation in this directory. You MUST delete config.php if you want to re-install Enano.
If you wish to upgrade an older Enano installation to this version, please use the upgrade script.
This option allows you to control whether anything between the standard <?php and ?> tags will be treated as
- PHP code by Enano. If this option is enabled, and members of the Administrators group use these tags, Enano will
- execute that code when the page is loaded. There are obvious potential security implications here, which should
- be carefully considered before enabling this option.
-
If you are the only administrator of this site, or if you have a high level of trust for those will be administering
- the site with you, you should enable this to allow extreme customization of pages.
-
Leave this option off if you are at all concerned about security – if your account is compromised and PHP embedding
- is enabled, an attacker can run arbitrary code on your server! Enabling this will also allow administrators to
- embed Javascript and arbitrary HTML and CSS.
-
If you don\'t have experience coding in PHP, you can safely disable this option. You may change this at any time
- using the ACL editor by selecting the Administrators group and This Entire Website under the scope selection.
version 1.0.2 – beta 1
- also affectionately known as "coblynau" :)
- You are about to install a NIGHTLY BUILD of Enano. Nightly builds are NOT upgradeable and may contain serious flaws, security problems, or extraneous debugging information. Installing this version of Enano on a production site is NOT recommended.
';
- }
- ?>
-
-
-
-
-
-
Welcome to the Enano installer.
-
Thank you for choosing Enano as your CMS. You've selected the finest in design, the strongest in security, and the latest in Web 2.0 toys. Trust us, you'll like it.
-
To get started, please read and accept the following license agreement. You've probably seen it before.
-
-
GNU General Public License
-
Declaration of license usage
-
Enano is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License (below) for more details.
-
By clicking the button below or otherwise continuing the installation, you indicate your acceptance of this license agreement.
-
Human-readable version
-
Enano is distributed under certain licensing terms that we believe make it of the greatest possible use to the public. The license we distribute it under, the GNU General Public License, provides certain terms and conditions that, rather than limit your use of Enano, allow you to get the most out of it. If you would like to read the full text, it can be found below. Here is a human-readable version that we think is a little easier to understand.
-
-
You may to run Enano for any purpose.
-
You may study how Enano works and adapt it to your needs.
-
You may redistribute copies so you can help your neighbor.
-
You may improve Enano and release your improvements to the public, so that the whole community benefits.
-
-
You may exercise the freedoms specified here provided that you comply with the express conditions of this license. The principal conditions are:
-
-
You must conspicuously and appropriately publish on each copy distributed an appropriate copyright notice and disclaimer of warranty and keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of Enano a copy of the GNU General Public License along with Enano. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.
-
If you modify your copy or copies of Enano or any portion of it, or develop a program based upon it, you may distribute the resulting work provided you do so under the GNU General Public License. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.
-
If you copy or distribute Enano, you must accompany it with the complete corresponding machine-readable source code or with a written offer, valid for at least three years, to furnish the complete corresponding machine-readable source code.
-
-
Disclaimer: The above text is not a license. It is simply a handy reference for understanding the Legal Code (the full license) – it is a human-readable expression of some of its key terms. Think of it as the user-friendly interface to the Legal Code beneath. The above text itself has no legal value, and its contents do not appear in the actual license. Text copied from the Creative Commons GPL Deed page
-
-
Notice for prerelease versions
-
This version of Enano is designed only for testing and evaluation purposes. It is not yet completely stable, and should not be used on production websites. As with any Enano version, Dan Fuhry and the Enano team cannot be responsible for any damage, physical or otherwise, to any property as a result of the use of Enano. While security is a number one priority, sometimes things slip through.
-
-
Lawyer-readable version
-
-
-
-
-
-
-
Before clicking continue: • Ensure that you agree with the terms of the license • Have your database host, name, username, and password available
-
-
-
-
-
-
Checking your server
-
Enano has several requirements that must be met before it can be installed. If all is good then note any warnings and click Continue below.
-
- =4.3.0', 'It seems that the version of PHP that your server is running is too old to support Enano properly. If this is your server, please upgrade to the most recent version of PHP, remembering to use the --with-mysql configure option if you compile it yourself. If this is not your server, please contact your webhost and ask them if it would be possible to upgrade PHP. If this is not possible, you will need to switch to a different webhost in order to use Enano.');
- run_test('return function_exists(\'mysql_connect\');', 'MySQL extension for PHP', 'It seems that your PHP installation does not have the MySQL extension enabled. If this is your own server, you may need to just enable the "libmysql.so" extension in php.ini. If you do not have the MySQL extension installed, you will need to either use your distribution\'s package manager to install it, or you will have to compile PHP from source. If you compile PHP from source, please remember to use the "--with-mysql" configure option, and you will have to have the MySQL development files installed (they usually are). If this is not your server, please contact your hosting company and ask them to install the PHP MySQL extension.');
- run_test('return @ini_get(\'file_uploads\');', 'File upload support', 'It seems that your server does not support uploading files. Enano *requires* this functionality in order to work properly. Please ask your server administrator to set the "file_uploads" option in php.ini to "On".');
- run_test('return is_apache();', 'Apache HTTP Server', 'Apparently your server is running a web server other than Apache. Enano will work nontheless, but there are some known bugs with non-Apache servers, and the "fancy" URLs will not work properly. The "Standard URLs" option will be set on the website configuration page, only change it if you are absolutely certain that your server is running Apache.', true);
- //run_test('return function_exists(\'finfo_file\');', 'Fileinfo PECL extension', 'The MIME magic PHP extension is used to determine the type of a file by looking for a certain "magic" string of characters inside it. This functionality is used by Enano to more effectively prevent malicious file uploads. The MIME magic option will be disabled by default.', true);
- run_test('return is_writable(ENANO_ROOT.\'/config.php\');', 'Configuration file writable', 'It looks like the configuration file, config.php, is not writable. Enano needs to be able to write to this file in order to install.
If you are installing Enano on a SourceForge web site: SourceForge mounts the web partitions read-only now, so you will need to use the project shell service to symlink config.php to a file in the /tmp/persistent directory.');
- run_test('return file_exists(\'/usr/bin/convert\');', 'ImageMagick support', 'Enano uses ImageMagick to scale images into thumbnails. Because ImageMagick was not found on your server, Enano will use the width= and height= attributes on the <img> tag to scale images. This can cause somewhat of a performance increase, but bandwidth usage will be higher, especially if you use high-resolution images on your site.
If you are sure that you have ImageMagick, you can set the location of the "convert" program using the administration panel after installation is complete.', true);
- run_test('return is_writable(ENANO_ROOT.\'/cache/\');', 'Cache directory writable', 'Apparently the cache/ directory is not writable. Enano will still work, but you will not be able to cache thumbnails, meaning the server will need to re-render them each time they are requested. In some cases, this can cause a significant slowdown.', true);
- run_test('return is_writable(ENANO_ROOT.\'/files/\');', 'File uploads directory writable', 'It seems that the directory where uploaded files are stored (' . ENANO_ROOT . '/files) cannot be written by the server. Enano will still function, but file uploads will not function, and will be disabled by default.', true);
- echo '
';
- if(!$failed)
- {
- ?>
-
-
- ';
- run_test('return false;', 'Some scalebacks were made due to your server configuration.', 'Enano has detected that some of the features or configuration settings on your server are not optimal for the best behavior and/or performance for Enano. As a result, certain features or enhancements that are part of Enano have been disabled to prevent further errors. You have seen those "fatal error" notices that spew from PHP, haven\'t you?
Fatal error: call to undefined function wannahokaloogie() in file '.__FILE__.' on line '.__LINE__.'', true);
- echo '
';
- } else {
- echo '
';
- run_test('return true;', 'Your server meets all the requirements for running Enano. Click the button below to continue the installation.', 'You should never see this text. Congratulations for being an Enano hacker!');
- echo '
';
- }
- ?>
-
-
-
-
Before clicking continue: • Ensure that you are satisfied with any scalebacks that may have been made to accomodate your server configuration • Have your database host, name, username, and password available
-
-
-
-
-
';
- run_test('return false;', 'Your server does not meet the requirements for Enano to run.', 'As a precaution, Enano will not install until the above requirements have been met. Contact your server administrator or hosting company and convince them to upgrade. Good luck.');
- echo '
';
- }
- }
- ?>
-
-
-
Now we need some information that will allow Enano to contact your database server. Enano uses MySQL as a data storage backend,
- and we need to have access to a MySQL server in order to continue.
-
If you do not have access to a MySQL server, and you are using your own server, you can download MySQL for free from
- MySQL.com. Please note that, like Enano, MySQL is licensed under the GNU GPL.
- If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL
- or purchase a proprietary license.
- MySQL login information for this virtual appliance:
Database hostname This is the hostname (or sometimes the IP address) of your MySQL server. In many cases, this is "localhost".
-
Database name The name of the actual database. If you don't already have a database, you can create one here, if you have the username and password of a MySQL user with administrative rights.
-
Database login These fields should be the username and password of a user with "select", "insert", "update", "delete", "create table", and "replace" privileges for your database.
-
-
Optional information
-
Table prefix The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).
-
Database administrative login If the MySQL database or username that you entered above does not exist yet, you can create them here, assuming that you have the login information for an administrative user (such as root). Leave these fields blank unless you need to use them.
-
-
MySQL version
MySQL version information will be checked when you click "Test Connection".
-
Delete existing tables? If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.
Drop existing tables
-
-
-
-
-
-
Before clicking continue: • Check your MySQL connection using the "Test Connection" button. • Be aware that your database information will be transmitted unencrypted several times.
The next step is to enter some information about your website. You can always change this information later, using the administration panel.
-
-
Website name The display name of your website. Allowed characters are uppercase and lowercase letters, numerals, and spaces. This must not be blank or "Enano".
-
Website description This text will be shown below the name of your website.
-
Copyright info This should be a one-line legal notice that will appear at the bottom of all your pages.
-
Wiki mode This feature allows people to create and edit pages on your site. Enano keeps a history of all page modifications, and you can protect pages to prevent editing.
Yes, make my website a wiki.
-
URL scheme Choose how the page URLs will look. Depending on your server configuration, you may need to select the first option. If you don't know, select the first option, and you can always change it later.
name="urlscheme" value="ugly" id="ugly"> Standard URLs - compatible with any web server (www.example.com/index.php?title=Page_name) name="urlscheme" value="short" id="short"> Short URLs - requires Apache with a PHP module (www.example.com/index.php/Page_name) Tiny URLs - requires Apache on Linux/Unix/BSD with PHP module and mod_rewrite enabled (www.example.com/Page_name)
-
-
-
-
-
Before clicking continue: • Verify that your site information is correct. Again, all of the above settings can be changed from the administration panel.
Next, enter your desired username and password. The account you create here will be used to administer your site.
-
-
Administration username The administration username you will use to log into your site. This cannot be "anonymous" or in the form of an IP address.
-
Administration password:
-
Enter it again to confirm:
-
Your e-mail address:
-
-
- Allow administrators to embed PHP code into pages:
- Do not under any circumstances enable this option without reading these
- important security implications.
-
-
-
- Disabled
- Enabled
-
-
-
-
If your browser supports Javascript, the password you enter here will be encrypted with AES before it is sent to the server.
-
-
-
-
-
Before clicking continue: • Remember the username and password you enter here! You will not be able to administer your site without the information you enter on this page.
The wizard has finished collecting information and is ready to install the database schema. Please review the information below,
- and then click the button below to install the database.
-
-
Database hostname:
-
Database name:
-
Database user:
-
Database password: <hidden>
-
Site name:
-
Site description:
-
Administration username:
-
Cipher strength: -bit AES Cipher strength is defined in the file constants.php; if you desire to change the cipher strength, you may do so and then restart installation. Unless your site is mission-critical, changing the cipher strength is not necessary.
-
-
-
-
-
Before clicking continue: • Pray.
-
-
-
-
- restart the installation.';
- $template->footer();
- exit;
- }
- switch($_POST['urlscheme'])
- {
- case "ugly":
- default:
- $cp = scriptPath.'/index.php?title=';
- break;
- case "short":
- $cp = scriptPath.'/index.php/';
- break;
- case "tiny":
- $cp = scriptPath.'/';
- break;
- }
- function err($t) { global $template; echo $t; $template->footer(); exit; }
-
- echo 'Connecting to MySQL...';
- if($_POST['db_root_user'] != '')
- {
- $conn = mysql_connect($_POST['db_host'], $_POST['db_root_user'], $_POST['db_root_pass']);
- if(!$conn) err('Error connecting to MySQL: '.mysql_error());
- $q = mysql_query('USE '.$_POST['db_name']);
- if(!$q)
- {
- $q = mysql_query('CREATE DATABASE '.$_POST['db_name']);
- if(!$q) err('Error initializing database: '.mysql_error());
- }
- $q = mysql_query('GRANT ALL PRIVILEGES ON '.$_POST['db_name'].'.* TO \''.$_POST['db_user'].'\'@\'localhost\' IDENTIFIED BY \''.$_POST['db_pass'].'\' WITH GRANT OPTION;');
- if(!$q) err('Could not create the user account');
- $q = mysql_query('GRANT ALL PRIVILEGES ON '.$_POST['db_name'].'.* TO \''.$_POST['db_user'].'\'@\'%\' IDENTIFIED BY \''.$_POST['db_pass'].'\' WITH GRANT OPTION;');
- if(!$q) err('Could not create the user account');
- mysql_close($conn);
- }
- $conn = mysql_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass']);
- if(!$conn) err('Error connecting to MySQL: '.mysql_error());
- $q = mysql_query('USE '.$_POST['db_name']);
- if(!$q) err('Error selecting database: '.mysql_error());
- echo 'done! ';
-
- // Are we supposed to drop any existing tables? If so, do it now
- if(isset($_POST['drop_tables']))
- {
- echo 'Dropping existing Enano tables...';
- // Our list of tables included in Enano
- $tables = Array( 'mdg_categories', 'mdg_comments', 'mdg_config', 'mdg_logs', 'mdg_page_text', 'mdg_session_keys', 'mdg_pages', 'mdg_users', 'mdg_users_extra', 'mdg_themes', 'mdg_buddies', 'mdg_banlist', 'mdg_files', 'mdg_privmsgs', 'mdg_sidebar', 'mdg_hits', 'mdg_search_index', 'mdg_groups', 'mdg_group_members', 'mdg_acl', 'mdg_search_cache', 'mdg_tags', 'mdg_page_groups', 'mdg_page_group_members' );
- $tables = implode(', ', $tables);
- $tables = str_replace('mdg_', $_POST['table_prefix'], $tables);
- $query_of_death = 'DROP TABLE '.$tables.';';
- mysql_query($query_of_death); // We won't check for errors here because if this operation fails it probably means the tables didn't exist
- echo 'done! ';
- }
-
- $cacheonoff = is_writable(ENANO_ROOT.'/cache/') ? '1' : '0';
-
- echo 'Decrypting administration password...';
-
- $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE);
-
- if ( !empty($_POST['crypt_data']) )
- {
- require('config.php');
- if ( !isset($cryptkey) )
- {
- echo 'failed! Cannot get the key from config.php';
- break;
- }
- $key = hexdecode($cryptkey);
-
- $dec = $aes->decrypt($_POST['crypt_data'], $key, ENC_HEX);
-
- }
- else
- {
- $dec = $_POST['admin_pass'];
- }
- echo 'done! Generating '.AES_BITS.'-bit AES private key...';
- $privkey = $aes->gen_readymade_key();
- $pkba = hexdecode($privkey);
- $encpass = $aes->encrypt($dec, $pkba, ENC_HEX);
-
- echo 'done! Preparing for schema execution...';
- $schema = file_get_contents('schema.sql');
- $schema = str_replace('{{SITE_NAME}}', mysql_real_escape_string($_POST['sitename'] ), $schema);
- $schema = str_replace('{{SITE_DESC}}', mysql_real_escape_string($_POST['sitedesc'] ), $schema);
- $schema = str_replace('{{COPYRIGHT}}', mysql_real_escape_string($_POST['copyright'] ), $schema);
- $schema = str_replace('{{ADMIN_USER}}', mysql_real_escape_string($_POST['admin_user'] ), $schema);
- $schema = str_replace('{{ADMIN_PASS}}', mysql_real_escape_string($encpass ), $schema);
- $schema = str_replace('{{ADMIN_EMAIL}}', mysql_real_escape_string($_POST['admin_email']), $schema);
- $schema = str_replace('{{ENABLE_CACHE}}', mysql_real_escape_string($cacheonoff ), $schema);
- $schema = str_replace('{{REAL_NAME}}', '', $schema);
- $schema = str_replace('{{TABLE_PREFIX}}', $_POST['table_prefix'], $schema);
- $schema = str_replace('{{VERSION}}', ENANO_VERSION, $schema);
- $schema = str_replace('{{ADMIN_EMBED_PHP}}', $_POST['admin_embed_php'], $schema);
- $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION, $schema);
-
- if(isset($_POST['wiki_mode']))
- {
- $schema = str_replace('{{WIKI_MODE}}', '1', $schema);
- }
- else
- {
- $schema = str_replace('{{WIKI_MODE}}', '0', $schema);
- }
-
- // Build an array of queries
- $schema = explode("\n", $schema);
-
- foreach ( $schema as $i => $sql )
- {
- $query =& $schema[$i];
- $t = trim($query);
- if ( empty($t) || preg_match('/^(\#|--)/i', $t) )
- {
- unset($schema[$i]);
- unset($query);
- }
- }
-
- $schema = array_values($schema);
- $schema = implode("\n", $schema);
- $schema = explode(";\n", $schema);
-
- foreach ( $schema as $i => $sql )
- {
- $query =& $schema[$i];
- if ( substr($query, ( strlen($query) - 1 ), 1 ) != ';' )
- {
- $query .= ';';
- }
- }
-
- // echo '
' . htmlspecialchars(print_r($schema, true)) . '
';
- // break;
-
- echo 'done! Executing schema.sql...';
-
- // OK, do the loop, baby!!!
- foreach($schema as $q)
- {
- $r = mysql_query($q, $conn);
- if(!$r) err('Error during mainstream installation: '.mysql_error());
- }
-
- echo 'done! Writing configuration files...';
- if($_POST['urlscheme']=='tiny')
- {
- $ht = fopen(ENANO_ROOT.'/.htaccess', 'a+');
- if(!$ht) err('Error opening file .htaccess for writing');
- fwrite($ht, '
-RewriteEngine on
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.+) '.scriptPath.'/index.php?title=$1 [L,QSA]
-RewriteRule \.(php|html|gif|jpg|png|css|js)$ - [L]
-');
- fclose($ht);
- }
-
- $config_file = '';
-
- $cf_handle = fopen(ENANO_ROOT.'/config.php', 'w');
- if(!$cf_handle) err('Couldn\'t open file config.php for writing');
- fwrite($cf_handle, $config_file);
- fclose($cf_handle);
-
- echo 'done! Starting the Enano API...';
-
- $template_bak = $template;
-
- // Get Enano loaded
- $_GET['title'] = 'Main_Page';
- require('includes/common.php');
-
- // We need to be logged in (with admin rights) before logs can be flushed
- $session->login_without_crypto($_POST['admin_user'], $dec, false);
-
- // Now that login cookies are set, initialize the session manager and ACLs
- $session->start();
- $paths->init();
-
- unset($template);
- $template =& $template_bak;
-
- echo 'done! Initializing logs...';
-
- $q = $db->sql_query('INSERT INTO ' . $_POST['table_prefix'] . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . date('d M Y h:i a') . '\', \'' . mysql_real_escape_string($_POST['admin_user']) . '\', \'' . mysql_real_escape_string(ENANO_VERSION) . '\', \'' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '\');', $conn);
- if ( !$q )
- err('Error setting up logs: '.$db->get_error());
-
- if ( !$session->get_permissions('clear_logs') )
- {
- echo ' Error: session manager won\'t permit flushing logs, these is a bug.';
- break;
- }
-
- // unset($session);
- // $session = new sessionManager();
- // $session->start();
-
- PageUtils::flushlogs('Main_Page', 'Article');
-
- echo 'done!
You have finished installing Enano on this server.
-
Now what?
-
Click the link below to see the main page for your website. Where to go from here:
-
-
The first thing you should do is log into your site using the Log in link on the sidebar.
-
Go into the Administration panel, expand General, and click General Configuration. There you will be able to configure some basic information about your site.
Periodically create a backup of your database and filesystem, in case something goes wrong. This should be done at least once a week – more for wiki-based sites.
-
Hire some moderators, to help you keep rowdy users tame.
Spread the word about Enano by adding a link to the Enano homepage on your sidebar! You can enable this option in the General Configuration section of the administration panel.
';
- break;
-}
-$template->footer();
-
-?>
+The Enano installer has found a Enano installation in this directory. You MUST delete config.php if you want to re-install Enano.
If you wish to upgrade an older Enano installation to this version, please use the upgrade script.
This option allows you to control whether anything between the standard <?php and ?> tags will be treated as
+ PHP code by Enano. If this option is enabled, and members of the Administrators group use these tags, Enano will
+ execute that code when the page is loaded. There are obvious potential security implications here, which should
+ be carefully considered before enabling this option.
+
If you are the only administrator of this site, or if you have a high level of trust for those will be administering
+ the site with you, you should enable this to allow extreme customization of pages.
+
Leave this option off if you are at all concerned about security – if your account is compromised and PHP embedding
+ is enabled, an attacker can run arbitrary code on your server! Enabling this will also allow administrators to
+ embed Javascript and arbitrary HTML and CSS.
+
If you don\'t have experience coding in PHP, you can safely disable this option. You may change this at any time
+ using the ACL editor by selecting the Administrators group and This Entire Website under the scope selection.
+ You are about to install a NIGHTLY BUILD of Enano. Nightly builds are NOT upgradeable and may contain serious flaws, security problems, or extraneous debugging information. Installing this version of Enano on a production site is NOT recommended.
';
+ }
+ ?>
+
+
+
+
+
+
Welcome to the Enano installer.
+
Thank you for choosing Enano as your CMS. You've selected the finest in design, the strongest in security, and the latest in Web 2.0 toys. Trust us, you'll like it.
+
To get started, please read and accept the following license agreement. You've probably seen it before.
+
+
GNU General Public License
+
Declaration of license usage
+
Enano is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License (below) for more details.
+
By clicking the button below or otherwise continuing the installation, you indicate your acceptance of this license agreement.
+
Human-readable version
+
Enano is distributed under certain licensing terms that we believe make it of the greatest possible use to the public. The license we distribute it under, the GNU General Public License, provides certain terms and conditions that, rather than limit your use of Enano, allow you to get the most out of it. If you would like to read the full text, it can be found below. Here is a human-readable version that we think is a little easier to understand.
+
+
You may to run Enano for any purpose.
+
You may study how Enano works and adapt it to your needs.
+
You may redistribute copies so you can help your neighbor.
+
You may improve Enano and release your improvements to the public, so that the whole community benefits.
+
+
You may exercise the freedoms specified here provided that you comply with the express conditions of this license. The principal conditions are:
+
+
You must conspicuously and appropriately publish on each copy distributed an appropriate copyright notice and disclaimer of warranty and keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of Enano a copy of the GNU General Public License along with Enano. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.
+
If you modify your copy or copies of Enano or any portion of it, or develop a program based upon it, you may distribute the resulting work provided you do so under the GNU General Public License. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.
+
If you copy or distribute Enano, you must accompany it with the complete corresponding machine-readable source code or with a written offer, valid for at least three years, to furnish the complete corresponding machine-readable source code.
+
+
Disclaimer: The above text is not a license. It is simply a handy reference for understanding the Legal Code (the full license) – it is a human-readable expression of some of its key terms. Think of it as the user-friendly interface to the Legal Code beneath. The above text itself has no legal value, and its contents do not appear in the actual license. Text copied from the Creative Commons GPL Deed page
+
+
Notice for prerelease versions
+
This version of Enano is designed only for testing and evaluation purposes. It is not yet completely stable, and should not be used on production websites. As with any Enano version, Dan Fuhry and the Enano team cannot be responsible for any damage, physical or otherwise, to any property as a result of the use of Enano. While security is a number one priority, sometimes things slip through.
+
+
Lawyer-readable version
+
+
+
+
+
+
+
Before clicking continue: • Ensure that you agree with the terms of the license • Have your database host, name, username, and password available
+
+
+
+
+
+
Checking your server
+
Enano has several requirements that must be met before it can be installed. If all is good then note any warnings and click Continue below.
+
+ =4.3.0', 'It seems that the version of PHP that your server is running is too old to support Enano properly. If this is your server, please upgrade to the most recent version of PHP, remembering to use the --with-mysql configure option if you compile it yourself. If this is not your server, please contact your webhost and ask them if it would be possible to upgrade PHP. If this is not possible, you will need to switch to a different webhost in order to use Enano.');
+ run_test('return function_exists(\'mysql_connect\');', 'MySQL extension for PHP', 'It seems that your PHP installation does not have the MySQL extension enabled. If this is your own server, you may need to just enable the "libmysql.so" extension in php.ini. If you do not have the MySQL extension installed, you will need to either use your distribution\'s package manager to install it, or you will have to compile PHP from source. If you compile PHP from source, please remember to use the "--with-mysql" configure option, and you will have to have the MySQL development files installed (they usually are). If this is not your server, please contact your hosting company and ask them to install the PHP MySQL extension.');
+ run_test('return @ini_get(\'file_uploads\');', 'File upload support', 'It seems that your server does not support uploading files. Enano *requires* this functionality in order to work properly. Please ask your server administrator to set the "file_uploads" option in php.ini to "On".');
+ run_test('return is_apache();', 'Apache HTTP Server', 'Apparently your server is running a web server other than Apache. Enano will work nontheless, but there are some known bugs with non-Apache servers, and the "fancy" URLs will not work properly. The "Standard URLs" option will be set on the website configuration page, only change it if you are absolutely certain that your server is running Apache.', true);
+ //run_test('return function_exists(\'finfo_file\');', 'Fileinfo PECL extension', 'The MIME magic PHP extension is used to determine the type of a file by looking for a certain "magic" string of characters inside it. This functionality is used by Enano to more effectively prevent malicious file uploads. The MIME magic option will be disabled by default.', true);
+ run_test('return is_writable(ENANO_ROOT.\'/config.php\');', 'Configuration file writable', 'It looks like the configuration file, config.php, is not writable. Enano needs to be able to write to this file in order to install.
If you are installing Enano on a SourceForge web site: SourceForge mounts the web partitions read-only now, so you will need to use the project shell service to symlink config.php to a file in the /tmp/persistent directory.');
+ run_test('return file_exists(\'/usr/bin/convert\');', 'ImageMagick support', 'Enano uses ImageMagick to scale images into thumbnails. Because ImageMagick was not found on your server, Enano will use the width= and height= attributes on the <img> tag to scale images. This can cause somewhat of a performance increase, but bandwidth usage will be higher, especially if you use high-resolution images on your site.
If you are sure that you have ImageMagick, you can set the location of the "convert" program using the administration panel after installation is complete.', true);
+ run_test('return is_writable(ENANO_ROOT.\'/cache/\');', 'Cache directory writable', 'Apparently the cache/ directory is not writable. Enano will still work, but you will not be able to cache thumbnails, meaning the server will need to re-render them each time they are requested. In some cases, this can cause a significant slowdown.', true);
+ run_test('return is_writable(ENANO_ROOT.\'/files/\');', 'File uploads directory writable', 'It seems that the directory where uploaded files are stored (' . ENANO_ROOT . '/files) cannot be written by the server. Enano will still function, but file uploads will not function, and will be disabled by default.', true);
+ echo '
';
+ if(!$failed)
+ {
+ ?>
+
+
+ ';
+ run_test('return false;', 'Some scalebacks were made due to your server configuration.', 'Enano has detected that some of the features or configuration settings on your server are not optimal for the best behavior and/or performance for Enano. As a result, certain features or enhancements that are part of Enano have been disabled to prevent further errors. You have seen those "fatal error" notices that spew from PHP, haven\'t you?
Fatal error: call to undefined function wannahokaloogie() in file '.__FILE__.' on line '.__LINE__.'', true);
+ echo '
';
+ } else {
+ echo '
';
+ run_test('return true;', 'Your server meets all the requirements for running Enano. Click the button below to continue the installation.', 'You should never see this text. Congratulations for being an Enano hacker!');
+ echo '
';
+ }
+ ?>
+
+
+
+
Before clicking continue: • Ensure that you are satisfied with any scalebacks that may have been made to accomodate your server configuration • Have your database host, name, username, and password available
+
+
+
+
+
';
+ run_test('return false;', 'Your server does not meet the requirements for Enano to run.', 'As a precaution, Enano will not install until the above requirements have been met. Contact your server administrator or hosting company and convince them to upgrade. Good luck.');
+ echo '
';
+ }
+ }
+ ?>
+
+
+
Now we need some information that will allow Enano to contact your database server. Enano uses MySQL as a data storage backend,
+ and we need to have access to a MySQL server in order to continue.
+
If you do not have access to a MySQL server, and you are using your own server, you can download MySQL for free from
+ MySQL.com. Please note that, like Enano, MySQL is licensed under the GNU GPL.
+ If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL
+ or purchase a proprietary license.
+ MySQL login information for this virtual appliance:
Database hostname This is the hostname (or sometimes the IP address) of your MySQL server. In many cases, this is "localhost".
+
Database name The name of the actual database. If you don't already have a database, you can create one here, if you have the username and password of a MySQL user with administrative rights.
+
Database login These fields should be the username and password of a user with "select", "insert", "update", "delete", "create table", and "replace" privileges for your database.
+
+
Optional information
+
Table prefix The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).
+
Database administrative login If the MySQL database or username that you entered above does not exist yet, you can create them here, assuming that you have the login information for an administrative user (such as root). Leave these fields blank unless you need to use them.
+
+
MySQL version
MySQL version information will be checked when you click "Test Connection".
+
Delete existing tables? If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.
Drop existing tables
+
+
+
+
+
+
Before clicking continue: • Check your MySQL connection using the "Test Connection" button. • Be aware that your database information will be transmitted unencrypted several times.
The next step is to enter some information about your website. You can always change this information later, using the administration panel.
+
+
Website name The display name of your website. Allowed characters are uppercase and lowercase letters, numerals, and spaces. This must not be blank or "Enano".
+
Website description This text will be shown below the name of your website.
+
Copyright info This should be a one-line legal notice that will appear at the bottom of all your pages.
+
Wiki mode This feature allows people to create and edit pages on your site. Enano keeps a history of all page modifications, and you can protect pages to prevent editing.
Yes, make my website a wiki.
+
URL scheme Choose how the page URLs will look. Depending on your server configuration, you may need to select the first option. If you don't know, select the first option, and you can always change it later.
name="urlscheme" value="ugly" id="ugly"> Standard URLs - compatible with any web server (www.example.com/index.php?title=Page_name) name="urlscheme" value="short" id="short"> Short URLs - requires Apache with a PHP module (www.example.com/index.php/Page_name) Tiny URLs - requires Apache on Linux/Unix/BSD with PHP module and mod_rewrite enabled (www.example.com/Page_name)
+
+
+
+
+
Before clicking continue: • Verify that your site information is correct. Again, all of the above settings can be changed from the administration panel.
Next, enter your desired username and password. The account you create here will be used to administer your site.
+
+
Administration username The administration username you will use to log into your site. This cannot be "anonymous" or in the form of an IP address.
+
Administration password:
+
Enter it again to confirm:
+
Your e-mail address:
+
+
+ Allow administrators to embed PHP code into pages:
+ Do not under any circumstances enable this option without reading these
+ important security implications.
+
+
+
+ Disabled
+ Enabled
+
+
+
+
If your browser supports Javascript, the password you enter here will be encrypted with AES before it is sent to the server.
+
+
+
+
+
Before clicking continue: • Remember the username and password you enter here! You will not be able to administer your site without the information you enter on this page.
The wizard has finished collecting information and is ready to install the database schema. Please review the information below,
+ and then click the button below to install the database.
+
+
Database hostname:
+
Database name:
+
Database user:
+
Database password: <hidden>
+
Site name:
+
Site description:
+
Administration username:
+
Cipher strength: -bit AES Cipher strength is defined in the file constants.php; if you desire to change the cipher strength, you may do so and then restart installation. Unless your site is mission-critical, changing the cipher strength is not necessary.
+
+
+
+
+
Before clicking continue: • Pray.
+
+
+
+
+ restart the installation.';
+ $template->footer();
+ exit;
+ }
+ switch($_POST['urlscheme'])
+ {
+ case "ugly":
+ default:
+ $cp = scriptPath.'/index.php?title=';
+ break;
+ case "short":
+ $cp = scriptPath.'/index.php/';
+ break;
+ case "tiny":
+ $cp = scriptPath.'/';
+ break;
+ }
+ function err($t) { global $template; echo $t; $template->footer(); exit; }
+
+ echo 'Connecting to MySQL...';
+ if($_POST['db_root_user'] != '')
+ {
+ $conn = mysql_connect($_POST['db_host'], $_POST['db_root_user'], $_POST['db_root_pass']);
+ if(!$conn) err('Error connecting to MySQL: '.mysql_error());
+ $q = mysql_query('USE '.$_POST['db_name']);
+ if(!$q)
+ {
+ $q = mysql_query('CREATE DATABASE '.$_POST['db_name']);
+ if(!$q) err('Error initializing database: '.mysql_error());
+ }
+ $q = mysql_query('GRANT ALL PRIVILEGES ON '.$_POST['db_name'].'.* TO \''.$_POST['db_user'].'\'@\'localhost\' IDENTIFIED BY \''.$_POST['db_pass'].'\' WITH GRANT OPTION;');
+ if(!$q) err('Could not create the user account');
+ $q = mysql_query('GRANT ALL PRIVILEGES ON '.$_POST['db_name'].'.* TO \''.$_POST['db_user'].'\'@\'%\' IDENTIFIED BY \''.$_POST['db_pass'].'\' WITH GRANT OPTION;');
+ if(!$q) err('Could not create the user account');
+ mysql_close($conn);
+ }
+ $conn = mysql_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass']);
+ if(!$conn) err('Error connecting to MySQL: '.mysql_error());
+ $q = mysql_query('USE '.$_POST['db_name']);
+ if(!$q) err('Error selecting database: '.mysql_error());
+ echo 'done! ';
+
+ // Are we supposed to drop any existing tables? If so, do it now
+ if(isset($_POST['drop_tables']))
+ {
+ echo 'Dropping existing Enano tables...';
+ // Our list of tables included in Enano
+ $tables = Array( 'mdg_categories', 'mdg_comments', 'mdg_config', 'mdg_logs', 'mdg_page_text', 'mdg_session_keys', 'mdg_pages', 'mdg_users', 'mdg_users_extra', 'mdg_themes', 'mdg_buddies', 'mdg_banlist', 'mdg_files', 'mdg_privmsgs', 'mdg_sidebar', 'mdg_hits', 'mdg_search_index', 'mdg_groups', 'mdg_group_members', 'mdg_acl', 'mdg_search_cache', 'mdg_tags', 'mdg_page_groups', 'mdg_page_group_members' );
+ $tables = implode(', ', $tables);
+ $tables = str_replace('mdg_', $_POST['table_prefix'], $tables);
+ $query_of_death = 'DROP TABLE '.$tables.';';
+ mysql_query($query_of_death); // We won't check for errors here because if this operation fails it probably means the tables didn't exist
+ echo 'done! ';
+ }
+
+ $cacheonoff = is_writable(ENANO_ROOT.'/cache/') ? '1' : '0';
+
+ echo 'Decrypting administration password...';
+
+ $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE);
+
+ if ( !empty($_POST['crypt_data']) )
+ {
+ require('config.php');
+ if ( !isset($cryptkey) )
+ {
+ echo 'failed! Cannot get the key from config.php';
+ break;
+ }
+ $key = hexdecode($cryptkey);
+
+ $dec = $aes->decrypt($_POST['crypt_data'], $key, ENC_HEX);
+
+ }
+ else
+ {
+ $dec = $_POST['admin_pass'];
+ }
+ echo 'done! Generating '.AES_BITS.'-bit AES private key...';
+ $privkey = $aes->gen_readymade_key();
+ $pkba = hexdecode($privkey);
+ $encpass = $aes->encrypt($dec, $pkba, ENC_HEX);
+
+ echo 'done! Preparing for schema execution...';
+ $schema = file_get_contents('schema.sql');
+ $schema = str_replace('{{SITE_NAME}}', mysql_real_escape_string($_POST['sitename'] ), $schema);
+ $schema = str_replace('{{SITE_DESC}}', mysql_real_escape_string($_POST['sitedesc'] ), $schema);
+ $schema = str_replace('{{COPYRIGHT}}', mysql_real_escape_string($_POST['copyright'] ), $schema);
+ $schema = str_replace('{{ADMIN_USER}}', mysql_real_escape_string($_POST['admin_user'] ), $schema);
+ $schema = str_replace('{{ADMIN_PASS}}', mysql_real_escape_string($encpass ), $schema);
+ $schema = str_replace('{{ADMIN_EMAIL}}', mysql_real_escape_string($_POST['admin_email']), $schema);
+ $schema = str_replace('{{ENABLE_CACHE}}', mysql_real_escape_string($cacheonoff ), $schema);
+ $schema = str_replace('{{REAL_NAME}}', '', $schema);
+ $schema = str_replace('{{TABLE_PREFIX}}', $_POST['table_prefix'], $schema);
+ $schema = str_replace('{{VERSION}}', ENANO_VERSION, $schema);
+ $schema = str_replace('{{ADMIN_EMBED_PHP}}', $_POST['admin_embed_php'], $schema);
+ // Not anymore!! :-D
+ // $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION, $schema);
+
+ if(isset($_POST['wiki_mode']))
+ {
+ $schema = str_replace('{{WIKI_MODE}}', '1', $schema);
+ }
+ else
+ {
+ $schema = str_replace('{{WIKI_MODE}}', '0', $schema);
+ }
+
+ // Build an array of queries
+ $schema = explode("\n", $schema);
+
+ foreach ( $schema as $i => $sql )
+ {
+ $query =& $schema[$i];
+ $t = trim($query);
+ if ( empty($t) || preg_match('/^(\#|--)/i', $t) )
+ {
+ unset($schema[$i]);
+ unset($query);
+ }
+ }
+
+ $schema = array_values($schema);
+ $schema = implode("\n", $schema);
+ $schema = explode(";\n", $schema);
+
+ foreach ( $schema as $i => $sql )
+ {
+ $query =& $schema[$i];
+ if ( substr($query, ( strlen($query) - 1 ), 1 ) != ';' )
+ {
+ $query .= ';';
+ }
+ }
+
+ // echo '
' . htmlspecialchars(print_r($schema, true)) . '
';
+ // break;
+
+ echo 'done! Executing schema.sql...';
+
+ // OK, do the loop, baby!!!
+ foreach($schema as $q)
+ {
+ $r = mysql_query($q, $conn);
+ if(!$r) err('Error during mainstream installation: '.mysql_error());
+ }
+
+ echo 'done! Writing configuration files...';
+ if($_POST['urlscheme']=='tiny')
+ {
+ $ht = fopen(ENANO_ROOT.'/.htaccess', 'a+');
+ if(!$ht) err('Error opening file .htaccess for writing');
+ fwrite($ht, '
+RewriteEngine on
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.+) '.scriptPath.'/index.php?title=$1 [L,QSA]
+RewriteRule \.(php|html|gif|jpg|png|css|js)$ - [L]
+');
+ fclose($ht);
+ }
+
+ $config_file = '';
+
+ $cf_handle = fopen(ENANO_ROOT.'/config.php', 'w');
+ if(!$cf_handle) err('Couldn\'t open file config.php for writing');
+ fwrite($cf_handle, $config_file);
+ fclose($cf_handle);
+
+ echo 'done! Starting the Enano API...';
+
+ $template_bak = $template;
+
+ // Get Enano loaded
+ $_GET['title'] = 'Main_Page';
+ require('includes/common.php');
+
+ // We need to be logged in (with admin rights) before logs can be flushed
+ $session->login_without_crypto($_POST['admin_user'], $dec, false);
+
+ // Now that login cookies are set, initialize the session manager and ACLs
+ $session->start();
+ $paths->init();
+
+ unset($template);
+ $template =& $template_bak;
+
+ echo 'done! Initializing logs...';
+
+ $q = $db->sql_query('INSERT INTO ' . $_POST['table_prefix'] . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . date('d M Y h:i a') . '\', \'' . mysql_real_escape_string($_POST['admin_user']) . '\', \'' . mysql_real_escape_string(ENANO_VERSION) . '\', \'' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '\');', $conn);
+ if ( !$q )
+ err('Error setting up logs: '.$db->get_error());
+
+ if ( !$session->get_permissions('clear_logs') )
+ {
+ echo ' Error: session manager won\'t permit flushing logs, these is a bug.';
+ break;
+ }
+
+ // unset($session);
+ // $session = new sessionManager();
+ // $session->start();
+
+ PageUtils::flushlogs('Main_Page', 'Article');
+
+ echo 'done!
You have finished installing Enano on this server.
+
Now what?
+
Click the link below to see the main page for your website. Where to go from here:
+
+
The first thing you should do is log into your site using the Log in link on the sidebar.
+
Go into the Administration panel, expand General, and click General Configuration. There you will be able to configure some basic information about your site.
Periodically create a backup of your database and filesystem, in case something goes wrong. This should be done at least once a week – more for wiki-based sites.
+
Hire some moderators, to help you keep rowdy users tame.
Spread the word about Enano by adding a link to the Enano homepage on your sidebar! You can enable this option in the General Configuration section of the administration panel.
';
+ break;
+}
+$template->footer();
+
+?>
diff -r d8156d18ac58 -r 97ae8e9d5e29 language/english/enano.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/language/english/enano.json Sat Nov 03 07:43:35 2007 -0400
@@ -0,0 +1,556 @@
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+// This is the main language file for Enano. Feel free to use it as a base for your own translations.
+// All text in this file before the first left curly brace and all text after the last curly brace will
+// be trimmed. So you can use a limited amount of Javascript in this so that the language can be imported
+// via Javascript as well.
+
+var enano_lang = {
+ categories: [
+ 'adm', 'meta', 'user', 'page', 'comment', 'onpage', 'etc', 'editor', 'history', 'catedit', 'tags', 'delvote', 'ajax', 'sidebar', 'acl',
+ 'perm',
+ ],
+ strings: {
+ meta: {
+ adm: 'Administration panel nav menu',
+ meta: 'Language category strings',
+ user: 'Login, logout, and authentication',
+ page: 'Page creation and control',
+ comment: 'Comment display',
+ onpage: 'On-page buttons and controls',
+ etc: 'Miscellaneous strings',
+ editor: 'Page editor interface',
+ history: 'Page history and log viewer',
+ catedit: 'Categorization box and editor',
+ tags: 'Page tagging interface',
+ delvote: 'Page deletion vote interface',
+ ajax: 'On-page AJAX applets',
+ sidebar: 'Default sidebar blocks and buttons',
+ acl: 'Access control list editor',
+ perm: 'Page actions (for ACLs)',
+ plural: 's',
+ enano_about_poweredby: '
The developers and maintainers of Enano strongly believe that software should not only be free to use, but free to be modified, distributed, and used to create derivative works. For more information about Free Software, check out the Wikipedia page or the Free Software Foundation\'s homepage.
',
+ enano_about_gpl: '
This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
',
+ enano_about_lbl_enanoversion: 'Enano version:',
+ enano_about_lbl_webserver: 'Web server:',
+ enano_about_lbl_serverplatform: 'Server platform:',
+ enano_about_lbl_phpversion: 'PHP version:',
+ enano_about_lbl_mysqlversion: 'MySQL version:',
+ },
+ user: {
+ login_message_short: 'Please enter your username and password to log in.',
+ login_message_short_elev: 'Please re-enter your login details',
+ login_body: 'Logging in enables you to use your preferences and access member information. If you don\'t have a username and password here, you can create an account.',
+ login_body_elev: 'You are requesting that a sensitive operation be performed. To continue, please re-enter your password to confirm your identity.',
+ login_field_username: 'Username',
+ login_field_password: 'Password',
+ login_forgotpass_blurb: 'Forgot your password? No problem.',
+ login_createaccount_blurb: 'Maybe you need to create an account.',
+ login_field_captcha: 'Code in image',
+ login_nocrypt_title: 'Important note regarding cryptography:',
+ login_nocrypt_body: 'Some countries do not allow the import or use of cryptographic technology. If you live in one of the countries listed below, you should log in without using encryption.',
+ login_nocrypt_countrylist: 'This restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.',
+ login_usecrypt_title: 'Encryption is currently turned off.',
+ login_usecrypt_body: 'If you are not in one of the countries listed below, you should enable encryption to secure the logon process.',
+ login_usecrypt_countrylist: 'The cryptography restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.',
+ login_success_title: 'Login successful',
+ login_success_body: 'You have successfully logged into the %config.site_name% site as "%username%". Redirecting to %redir_target%...',
+ login_success_body_mainpage: 'the main page',
+
+ login_ajax_fetching_key: 'Fetching an encryption key...',
+ login_ajax_prompt_title: 'Please enter your username and password to continue.',
+ login_ajax_prompt_title_elev: 'You are requesting a sensitive operation.',
+ login_ajax_prompt_body_elev: 'Please re-enter your login details, to verify your identity.',
+ login_ajax_link_fullform: 'Trouble logging in? Try the full login form.',
+ login_ajax_link_forgotpass: 'Did you forget your password?',
+ login_ajax_loggingin: 'Logging in...',
+
+ err_key_not_found: 'Enano couldn\'t look up the encryption key used to encrypt your password. This most often happens if a cache rotation occurred during your login attempt, or if you refreshed the login page.',
+ err_key_wrong_length: 'The encryption key was the wrong length.',
+ err_too_big_for_britches: 'You are trying to authenticate at a level that your user account does not permit.',
+ err_invalid_credentials: 'You have entered an invalid username or password. Please enter your login details again.',
+ err_invalid_credentials_lockout: ' You have used up %fails% out of %config.lockout_threshold% login attempts. After you have used up all %config.lockout_threshold% login attempts, you will be locked out from logging in for %config.lockout_duration% minutes.',
+ err_invalid_credentials_lockout_captcha: ' You have used up %lockout_fails% out of %config.lockout_threshold% login attempts. After you have used up all %config.lockout_threshold% login attempts, you will have to enter a visual confirmation code while logging in, effective for %config.lockout_duration% minutes.',
+ err_backend_fail: 'You entered the right credentials and everything was validated, but for some reason Enano couldn\'t register your session. This is an internal problem with the site and you are encouraged to contact site administration.',
+ err_locked_out: 'You have used up all %config.lockout_threshold% allowed login attempts. Please wait %time_rem% minute%plural% before attempting to log in again%captcha_blurb%.',
+ err_locked_out_captcha_blurb: ', or enter the visual confirmation code shown above in the appropriate box',
+
+ logout_success_title: 'Logged out',
+ logout_success_body: 'You have been successfully logged out, and all cookies have been cleared. You will now be transferred to the main page.',
+ logout_confirm_title: 'Are you sure you want to log out?',
+ logout_confirm_body: 'If you log out, you will no longer be able to access your user preferences, your private messages, or certain areas of this site until you log in again.',
+ logout_confirm_title_elev: 'Are you sure you want to de-authenticate?',
+ logout_confirm_body_elev: 'If you de-authenticate, you will no longer be able to use the administration panel until you re-authenticate again. You may do so at any time using the Administration button on the sidebar.',
+ logout_err_title: 'An error occurred during the logout process.',
+ // Unused at this point
+ logout_err_not_loggedin: 'You don\'t seem to be logged in.',
+
+ keepalive_info_title: 'About the keep-alive feature',
+ keepalive_info_body: 'Keep-alive is a new Enano feature that keeps your administrative session from timing out while you are using the administration panel. This feature can be useful if you are editing a large page or doing something in the administration interface that will take longer than 15 minutes.
For security reasons, Enano mandates that high-privilege logins last only 15 minutes, with the time being reset each time a page is loaded (or, more specifically, each time the session API is started). The consequence of this is that if you are performing an action in the administration panel that takes more than 15 minutes, your session may be terminated. The keep-alive feature attempts to relieve this by sending a "ping" to the server every 10 minutes.
Please note that keep-alive state is determined by a cookie. Thus, if you log out and then back in as a different administrator, keep-alive will use the same setting that was used when you were logged in as the first administrative user. In the same way, if you log into the administration panel under your account from another computer, keep-alive will be set to "off".
For more information: Overview of Enano\'s security model',
+
+ type_guest: 'Guest',
+ type_member: 'Member',
+ type_mod: 'Moderator',
+ type_admin: 'Administrator',
+
+ msg_elev_timed_out: 'Your administrative session has timed out.Log in again',
+
+ reg_err_captcha: 'The confirmation code you entered was incorrect.',
+ reg_err_disabled_title: 'Registration disabled',
+ reg_err_disabled_body: 'The administrator has disabled the registration of new accounts on this site.',
+ reg_err_disabled_body_adminblurb: 'Oops...it seems that you are the administrator...hehe...you can also force account registration to work.',
+ reg_err_username_invalid: 'Your username must be at least two characters in length and may not contain any of the following characters: < > _ & ? \' " % / \\.',
+ // Not exactly an error
+ reg_err_password_good: 'The password you entered is valid.',
+ reg_err_alert_password_tooshort: 'Your password must be 6 characters or greater in length.',
+ reg_err_alert_password_nomatch: 'The passwords you entered do not match.',
+ reg_err_missing_key: 'Couldn\'t look up public encryption key',
+
+ reg_msg_greatercontrol: 'A user account enables you to have greater control over your browsing experience.',
+ reg_msg_table_title: 'Create a user account',
+ reg_msg_table_subtitle: 'Please tell us a little bit about yourself.',
+ reg_msg_username_checking: 'Checking availability...',
+ reg_msg_username_available: 'This username is available.',
+ reg_msg_username_unavailable: 'This username is already taken.',
+ reg_msg_password_length: 'Your password must be at least six characters in length.',
+ reg_msg_password_score: 'It needs to score at least %config.pw_strength_minimum% for your registration to be accepted.',
+ reg_msg_password_needmatch: 'The passwords you entered do not match.',
+ reg_msg_email_activuser: 'An e-mail with an account activation key will be sent to this address, so please ensure that it is correct.',
+ reg_msg_realname_optional: 'Giving your real name is totally optional. If you choose to provide your real name, it will be used to provide attribution for any edits or contributions you may make to this site.',
+ reg_msg_captcha_pleaseenter: 'Please enter the code shown in the image to the right into the text box. This process helps to ensure that this registration is not being performed by an automated bot. If the image to the right is illegible, you can generate a new image.',
+ reg_msg_captcha_blind: 'If you are visually impaired or otherwise cannot read the text shown to the right, please contact the site management and they will create an account for you.',
+ reg_msg_success_title: 'Registration successful',
+ reg_msg_success_body: 'Thank you for registering, your user account has been created.',
+ reg_msg_success_activ_none: 'You may now log in with the username and password that you created.',
+ reg_msg_success_activ_user: 'Because this site requires account activation, you have been sent an e-mail with further instructions. Please follow the instructions in that e-mail to continue your registration.',
+ reg_msg_success_activ_admin: 'Because this site requires administrative account activation, you cannot use your account at the moment. A notice has been sent to the site administration team that will alert them that your account has been created.',
+ reg_msg_success_activ_coppa: 'However, in compliance with the Childrens\' Online Privacy Protection Act, you must have your parent or legal guardian activate your account. Please ask them to check their e-mail for further information.',
+
+ reg_lbl_field_username: 'Preferred username:',
+ reg_lbl_field_password: 'Password:',
+ reg_lbl_field_password_confirm: 'Enter your password again to confirm.',
+ reg_lbl_field_email: 'E-mail address:',
+ reg_lbl_field_email_coppa: 'Your parent or guardian\'s e-mail address:',
+ reg_lbl_field_realname: 'Real name:',
+ reg_lbl_field_captcha: 'Visual confirmation',
+ reg_lbl_field_captcha_code: 'Code:',
+
+ reg_coppa_title: 'Before you can register, please tell us your age.',
+ reg_coppa_link_atleast13: 'I was born on or before %yo13_date% and am at least 13 years of age',
+ reg_coppa_link_not13: 'I was born after %yo13_date% and am less than 13 years of age',
+ },
+ onpage: {
+ lbl_pagetools: 'Page tools',
+ lbl_page_article: 'article',
+ lbl_page_admin: 'administration page',
+ lbl_page_system: 'system message',
+ lbl_page_file: 'uploaded file',
+ lbl_page_help: 'documentation page',
+ lbl_page_user: 'user page',
+ lbl_page_special: 'special page',
+ lbl_page_template: 'template',
+ lbl_page_project: 'project page',
+ lbl_page_category: 'category',
+
+ btn_discussion: 'discussion (%num_comments%)',
+ btn_discussion_unapp: 'discussion (%num_comments% total, %num_unapp% unapp.)',
+ btn_edit: 'edit this page',
+ btn_viewsource: 'view source',
+ btn_history: 'history',
+ btn_moreoptions: 'more options',
+
+ btn_rename: 'rename',
+ btn_printable: 'view printable version',
+ btn_votedelete: 'vote to delete this page',
+ btn_votedelete_reset: 'reset deletion votes',
+ lbl_wikimode: 'page wiki mode:',
+ btn_wikimode_on: 'on',
+ btn_wikimode_off: 'off',
+ btn_wikimode_global: 'global',
+ lbl_protect: 'protection:',
+ btn_protect_on: 'on',
+ btn_protect_off: 'off',
+ btn_protect_semi: 'semi',
+ btn_clearlogs: 'clear page logs',
+ btn_deletepage: 'delete this page',
+ btn_deletepage_votes: ' (%num_votes% vote%plural%)',
+ lbl_password: 'page password:',
+ btn_password_set: 'set',
+ btn_acl: 'manage page access',
+ btn_admin: 'administrative options',
+ },
+ comment: {
+ lbl_subject: 'Subject',
+ lbl_mod_options: 'Moderator options:',
+ heading: 'Article comments',
+ btn_send_privmsg: 'Send private message',
+ btn_add_buddy: 'Add to buddy list',
+ btn_edit: 'edit',
+ btn_delete: 'delete',
+ btn_mod_approve: 'Approve',
+ btn_mod_unapprove: 'Unapprove',
+ btn_mod_delete: 'Delete',
+ btn_save: 'save',
+
+ msg_comment_posted: 'Your comment has been posted. If it does not appear right away, it is probably awaiting approval.',
+
+ msg_count_zero: 'There are no comments on this %page_type%.',
+ msg_count_one: 'There is 1 comment on this %page_type%.',
+ msg_count_plural: 'There are %num_comments% comments on this %page_type%.',
+
+ msg_count_unapp_mod: '%num_unapp% of those are unapproved.',
+ msg_count_unapp_one: 'However, there is 1 additional comment awaiting approval.',
+ msg_count_unapp_plural: 'However, there are %num_unapp% additional comments awaiting approval.',
+
+ msg_note_unapp: '(Unapproved)',
+
+ msg_delete_confirm: 'Do you really want to delete this comment?',
+
+ postform_title: 'Got something to say?',
+ postform_blurb: 'If you have comments or suggestions on this article, you can shout it out here.',
+ postform_blurb_unapp: 'Before your post will be visible to the public, a moderator will have to approve it.',
+ postform_blurb_captcha: 'Because you are not logged in, you will need to enter a visual confirmation before your comment will be posted.',
+ postform_blurb_link: 'Leave a comment...',
+ postform_field_name: 'Your name/screen name:',
+ postform_field_subject: 'Comment subject:',
+ postform_field_comment: 'Comment:',
+ postform_field_captcha_title: 'Visual confirmation:',
+ postform_field_captcha_blurb: 'Please enter the confirmation code seen in the image on the right into the box. If you cannot read the code, please click on the image to generate a new one. This helps to prevent automated bot posting.',
+ postform_field_captcha_label: 'Confirmation code:',
+ postform_field_captcha_cantread_js: 'If you can\'t read the code, click on the image to generate a new one.',
+ postform_field_captcha_cantread_nojs: 'If you can\'t read the code, please refresh this page to generate a new one.',
+ postform_btn_submit: 'Submit comment',
+
+ on_friend_list: 'On your friend list',
+ on_foe_list: 'On your foe list',
+ },
+ adm: {
+ cat_general: 'General',
+ cat_content: 'Content',
+ cat_appearance: 'Appearance',
+ cat_users: 'Users',
+ cat_security: 'Security',
+ cat_plugins: 'Plugin configuration',
+
+ page_general_config: 'General configuration',
+ page_file_uploads: 'File uploads',
+ page_file_types: 'Allowed file types',
+ page_plugins: 'Manage plugins',
+ page_db_backup: 'Backup database',
+
+ page_manager: 'Manage pages',
+ page_editor: 'Edit page content',
+ page_pg_groups: 'Manage page groups',
+
+ page_themes: 'Manage themes',
+
+ page_users: 'Manage users',
+ page_user_groups: 'Edit user groups',
+ page_coppa: 'COPPA support',
+ page_mass_email: 'Mass e-mail',
+
+ page_security_log: 'Security log',
+ page_ban_control: 'Ban control',
+
+ btn_home: 'Administration panel home',
+ btn_logout: 'Log out of admin panel',
+ btn_keepalive_off: 'Turn on keep-alive',
+ btn_keepalive_on: 'Turn off keep-alive',
+ btn_keepalive_about: 'About keep-alive',
+ btn_keepalive_loading: 'Loading keep-alive button...',
+
+ err_not_auth_title: 'Error: Not authenticated',
+ err_not_auth_body: 'It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.',
+ },
+ editor: {
+ msg_revert_confirm: 'Do you really want to revert your changes?',
+ msg_discard_confirm: 'Do you really want to discard your changes?',
+ msg_unload: 'If you do, any changes that you have made to this page will be lost.',
+ btn_graphical: 'graphical editor',
+ btn_wikitext: 'wikitext editor',
+ lbl_edit_summary: 'Edit summary:',
+ lbl_minor_edit: 'This is a minor edit',
+ btn_save: 'Save changes',
+ btn_preview: 'Show preview',
+ btn_revert: 'Revert changes',
+ btn_cancel: 'Cancel and return to page',
+ btn_closeviewer: 'Close viewer',
+ preview_blurb: 'Reminder: This is only a preview - your changes to this page have not yet been saved.',
+ },
+ history: {
+ summary_clearlogs: 'Automatic backup created when logs were purged',
+ page_subtitle: 'History of edits and actions',
+ heading_edits: 'Edits:',
+ heading_other: 'Other changes:',
+ no_entries: 'No history entries in this category.',
+ btn_compare: 'Compare selected revisions',
+ col_diff: 'Diff',
+ col_datetime: 'Date/time',
+ col_user: 'User',
+ col_summary: 'Edit summary',
+ col_minor: 'Minor',
+ col_actions: 'Actions',
+ col_action_taken: 'Action taken',
+ col_extra: 'Extra info',
+ extra_reason: 'Reason:',
+ extra_oldtitle: 'Old title:',
+ tip_rdns: 'Click cell background for reverse DNS info',
+ action_view: 'View',
+ action_contrib: 'User contribs',
+ action_restore: 'Restore',
+ action_revert: 'Revert action',
+ log_protect: 'Protected page',
+ log_unprotect: 'Unprotected page',
+ log_semiprotect: 'Semi-protected page',
+ log_rename: 'Renamed page',
+ log_create: 'Created page',
+ log_delete: 'Deleted page',
+ log_uploadnew: 'Uploaded new file version',
+ lbl_comparingrevisions: 'Comparing revisions:',
+ },
+ page: {
+ protect_lbl_success_title: 'Page protected',
+ protect_lbl_success_body: 'The protection setting has been applied. Return to the page.',
+ protect_err_need_reason: 'Error: you must enter a reason for protecting this page.',
+ protect_lbl_reason: 'Reason for protecting the page:',
+ protect_lbl_level: 'Protecion level to be applied:',
+ protect_lbl_level_none: 'No protection',
+ protect_lbl_level_semi: 'Semi-protection',
+ protect_lbl_level_full: 'Full protection',
+ protect_btn_submit: 'Protect page',
+
+ rename_err_need_name: 'Error: you must enter a new name for this page.',
+ rename_lbl: 'Please enter a new name for this page:',
+ rename_btn_submit: 'Rename page',
+
+ flushlogs_warning_stern: '
You are about to destroy all logged edits and actions on this page.
Unlike deleting or editing this page, this action is not reversible! You should only do this if you are desparate for database space.
If you think that this page is not relavent to the content on this site, or if it looks like this page was only created in an attempt to spam the site, you can request that this page be deleted by an administrator.
After you vote, you should leave a comment explaining the reason for your vote, especially if you are the first person to vote against this page.
',
+
+ delvote_count_zero: 'So far, no one has voted for the deletion of this page.',
+ delvote_count_one: 'So far, one person has voted to delete this page.',
+ delvote_count_plural: 'So far, %delvotes% people have voted to delete this page.',
+ delvote_btn_submit: 'Vote to delete this page',
+ delvote_reset_btn_submit: 'Reset votes',
+
+ delete_warning_stern: '
You are about to destroy this page.
While the deletion of the page itself is completely reversible, it is impossible to recover any comments or category information on this page. If this is a file page, the file along with all older revisions of it will be permanently deleted. Also, any custom information that this page is tagged with, such as a custom name, protection status, or additional settings such as whether to allow comments, will be permanently lost.
Are you absolutely sure that you want to continue? You will not be asked again.
',
+ delete_btn_submit: 'Delete this page',
+ delete_lbl_reason: 'Reason for deleting:',
+
+ wikimode_success_redirect: 'Wiki mode for this page has been set. Redirecting you to the page...',
+ wikimode_level_on: 'Wiki features will be enabled.',
+ wikimode_level_off: 'Wiki features will be disabled.',
+ wikimode_level_global: 'Wiki features will be synchronized to the global setting.',
+ wikimode_heading: 'You are changing wiki mode for this page.',
+ wikimode_warning: 'If you want to continue, please click the button below.',
+ wikimode_blurb_disable: 'Because this will disable the wiki behavior on this page, several features, most notably the ability for users to vote to have this page deleted, will be disabled as they are not relevant to non-wiki pages. In addition, users will not be able to edit this page unless an ACL rule specifically permits them.',
+ wikimode_blurb_enable: 'Because this will enable the wiki behavior on this page, users will gain the ability to freely edit this page unless an ACL rule specifically denies them. If your site is public and gets good traffic, you should be aware of the possiblity of vandalism, and you need to be ready to revert malicious edits to this page.',
+ wikimode_btn_submit: 'Set wiki mode',
+
+ detag_err_page_exists: 'The detag action is only valid for pages that have been deleted in the past.',
+ detag_success_title: 'Page detagged',
+ detag_success_body: 'All stale tags have been removed from this page.',
+ },
+ catedit: {
+ title: 'Select which categories this page should be included in.',
+ no_categories: 'There are no categories on this site yet.',
+ catbox_lbl_categories: 'Categories:',
+ catbox_lbl_uncategorized: '(Uncategorized)',
+ catbox_link_edit: 'edit categorization',
+ catbox_link_showcategorization: 'show page categorization',
+ },
+ tags: {
+ catbox_link: 'show page tags',
+ lbl_page_tags: 'Page tags:',
+ lbl_no_tags: 'No tags on this page',
+ btn_add_tag: '(add a tag)',
+ lbl_add_tag: 'Add a tag:',
+ btn_add: '+ Add',
+ },
+ delvote: {
+ lbl_votes_one: 'There is one user that thinks this page should be deleted.',
+ lbl_votes_plural: 'There are %num_users% users that think this page should be deleted.',
+ lbl_users_that_voted: 'Users that voted:',
+ btn_deletepage: 'Delete page',
+ btn_resetvotes: 'Reset votes',
+ },
+ ajax: {
+ // Client-side messages
+ protect_prompt_reason: 'Reason for (un)protecting:',
+ rename_prompt: 'What title should this page be renamed to?\nNote: This does not and will never change the URL of this page, that must be done from the admin panel.',
+ delete_prompt_reason: 'Please enter your reason for deleting this page.',
+ delete_confirm: 'You are about to REVERSIBLY delete this page. Do you REALLY want to do this?\n\n(Comments and categorization data, as well as any attached files, will be permanently lost)',
+ delvote_confirm: 'Are you sure that you want to vote that this page be deleted?',
+ delvote_reset_confirm: 'This action will reset the number of votes against this page to zero. Do you really want to do this?',
+ clearlogs_confirm: 'You are about to DESTROY all log entries for this page. As opposed to (example) deleting this page, this action is completely IRREVERSIBLE and should not be used except in dire circumstances. Do you REALLY want to do this?',
+ clearlogs_confirm_nag: 'You\'re ABSOLUTELY sure???',
+ changestyle_select: '[Select]',
+ changestyle_title: 'Change your theme',
+ changestyle_pleaseselect_theme: 'Please select a theme from the list.',
+ changestyle_lbl_theme: 'Theme:',
+ changestyle_lbl_style: 'Style:',
+ changestyle_success: 'Your theme preference has been changed.\nWould you like to reload the page now to see the changes?',
+ killphp_confirm: 'Are you really sure you want to do this? Some pages might not function if this emergency-only feature is activated.',
+ killphp_success: 'Embedded PHP in pages has been disabled.',
+ lbl_moreoptions_nojs: 'More options for this page',
+
+ // Server-side responses
+ rename_too_short: 'The name you entered is too short. Please enter a longer name for this page.',
+ rename_success: 'The page "%page_name_old%" has been renamed to "%page_name_new%". You are encouraged to leave a comment explaining your action.\n\nYou will see the change take effect the next time you reload this page.',
+ clearlogs_success: 'The logs for this page have been cleared. A backup of this page has been added to the logs table so that this page can be restored in case of vandalism or spam later.',
+ delete_need_reason: 'Invalid reason for deletion passed. Please enter a reason for deleting this page.',
+ delete_success: 'This page has been deleted. Note that there is still a log of edits and actions in the database, and anyone with admin rights can raise this page from the dead unless the log is cleared. If the deleted file is an image, there may still be cached thumbnails of it in the cache/ directory, which is inaccessible to users.',
+ delvote_success: 'Your vote to have this page deleted has been cast.\nYou are encouraged to leave a comment explaining the reason for your vote.',
+ delvote_already_voted: 'It appears that you have already voted to have this page deleted.',
+ delvote_reset_success: 'The number of votes for having this page deleted has been reset to zero.',
+ password_success: 'The password for this page has been set.',
+ password_disable_success: 'The password for this page has been disabled.',
+
+ },
+ sidebar: {
+ title_navigation: 'Navigation',
+ title_tools: 'Tools',
+ title_search: 'Search',
+ title_links: 'Links',
+
+ btn_home: 'Home',
+ btn_createpage: 'Create a page',
+ btn_uploadfile: 'Upload file',
+ btn_specialpages: 'Special pages',
+ btn_administration: 'Administration',
+ btn_editsidebar: 'Edit the sidebar',
+ btn_search_go: 'Go',
+
+ btn_userpage: 'User page',
+ btn_mycontribs: 'My contributions',
+ btn_preferences: 'Preferences',
+ btn_privatemessages: 'Private messages',
+ btn_groupcp: 'Group control panel',
+ btn_register: 'Create an account',
+ btn_login: 'Log in',
+ btn_logout: 'Log out',
+ btn_changestyle: 'Change theme',
+ },
+ acl: {
+ err_access_denied: 'You are not authorized to view or edit access control lists.',
+ err_missing_template: 'It seems that (a) the file acledit.tpl is missing from this theme, and (b) the JSON response is working.',
+ err_user_not_found: 'The username you entered was not found.',
+ err_bad_group_id: 'The group ID you submitted is not valid.',
+ err_demo: 'Editing access control lists is disabled in the administration demo.',
+ err_zero_list: 'Supplied rule list has a length of zero',
+ err_pleaseselect_targettype: 'Please select a target type.',
+ err_pleaseselect_username: 'Please enter a username.',
+
+ radio_usergroup: 'A usergroup',
+ radio_user: 'A specific user',
+ radio_scope_thispage: 'Only this page',
+ radio_scope_wholesite: 'The entire website',
+ radio_scope_pagegroup: 'A group of pages',
+
+ lbl_scope: 'What should this access rule control?',
+ lbl_welcome_title: 'Manage page access',
+ lbl_welcome_body: 'Please select who should be affected by this access rule.',
+ lbl_editwin_title_create: 'Create access rule',
+ lbl_editwin_title_edit: 'Editing permissions',
+ lbl_editwin_body: 'This panel allows you to edit what the %target_type% "%target%" can do on %scope_type%. Unless you set a permission to "Deny", these permissions may be overridden by other rules.',
+ lbl_deleterule: 'Delete this rule',
+ lbl_save_success_title: 'Permissions updated',
+ lbl_save_success_body: 'The permissions for %target_name% on this page have been updated successfully. If you changed permissions that affect your user account, you may not see changes until you reload the page.',
+ lbl_delete_success_title: 'Rule deleted',
+ lbl_delete_success_body: 'The access rules for %target_name% on this page have been deleted.',
+ lbl_field_deny: 'Deny',
+ lbl_field_disallow: 'Disallow',
+ lbl_field_wikimode: 'Wiki mode',
+ lbl_field_allow: 'Allow',
+ lbl_help: '
Permission types:
Allow means that the user is allowed to access the item
Wiki mode means the user can access the item if wiki mode is active (per-page wiki mode is taken into account)
Disallow means the user is denied access unless something allows it.
Deny means that the user is denied access to the item. This setting overrides all other permissions.
',
+
+ scope_type_wholesite: 'this entire site',
+ scope_type_thispage: 'this page',
+ scope_type_pagegroup: 'this group of pages',
+
+ target_type_user: 'user',
+ target_type_group: 'group',
+
+ msg_guest_howto: 'To edit permissions for guests, select "a specific user", and enter Anonymous as the username.',
+ msg_deleterule_confirm: 'Do you really want to delete this rule?',
+ msg_closeacl_confirm: 'Do you really want to close the ACL manager?',
+
+ btn_success_dismiss: 'dismiss',
+ btn_success_close: 'close manager',
+ btn_deleterule: 'Delete rule',
+ btn_createrule: 'Create rule',
+ btn_returnto_editor: 'Return to ACL editor',
+ btn_returnto_userscope: 'Return to user/scope selection',
+ },
+ perm: {
+ read: 'Read page(s)',
+ post_comments: 'Post comments',
+ edit_comments: 'Edit own comments',
+ edit_page: 'Edit page',
+ view_source: 'View source',
+ mod_comments: 'Moderate comments',
+ history_view: 'View history/diffs',
+ history_rollback: 'Rollback history',
+ history_rollback_extra: 'Undelete page(s)',
+ protect: 'Protect page(s)',
+ rename: 'Rename page(s)',
+ clear_logs: 'Clear page logs (dangerous)',
+ vote_delete: 'Vote to delete',
+ vote_reset: 'Reset delete votes',
+ delete_page: 'Delete page(s)',
+ tag_create: 'Tag page(s)',
+ tag_delete_own: 'Remove own page tags',
+ tag_delete_other: 'Remove others\' page tags',
+ set_wiki_mode: 'Set per-page wiki mode',
+ password_set: 'Set password',
+ password_reset: 'Disable/reset password',
+ mod_misc: 'Super moderator (generate SQL backtraces, view IP addresses, and send large numbers of private messages)',
+ edit_cat: 'Edit categorization',
+ even_when_protected: 'Allow editing, renaming, and categorization even when protected',
+ upload_files: 'Upload files',
+ upload_new_version: 'Upload new versions of files',
+ create_page: 'Create pages',
+ php_in_pages: 'Embed PHP code in pages',
+ edit_acl: 'Edit access control lists',
+ },
+ etc: {
+ redirect_title: 'Redirecting...',
+ redirect_body: 'Please wait while you are redirected.',
+ redirect_timeout: 'If you are not redirected within %timeout% seconds, please click here.',
+ // Generic "Save Changes" button
+ save_changes: 'Save changes',
+ // Generic "Cancel changes" button
+ cancel_changes: 'Cancel changes',
+ // Generic wizard buttons
+ wizard_next: 'Next >',
+ wizard_back: '< Back',
+ wizard_previous: '< Previous',
+ // Generic "Notice:" label
+ lbl_notice: 'Notice:',
+ // Generic "Access denied"
+ access_denied: 'Access to the specified file, resource, or action is denied.',
+ access_denied_short: 'Access denied',
+ return_to_page: 'Return to the page',
+ invalid_request_short: 'Invalid request',
+ // Message box buttons
+ ok: 'OK',
+ cancel: 'Cancel',
+ yes: 'Yes',
+ no: 'No'
+ }
+ }
+};
+
+// All done! :-)
+
diff -r d8156d18ac58 -r 97ae8e9d5e29 licenses/index.html
--- a/licenses/index.html Thu Sep 27 15:55:37 2007 -0400
+++ b/licenses/index.html Sat Nov 03 07:43:35 2007 -0400
@@ -110,6 +110,7 @@
diff -r d8156d18ac58 -r 97ae8e9d5e29 plugins/PrivateMessages.php
--- a/plugins/PrivateMessages.php Thu Sep 27 15:55:37 2007 -0400
+++ b/plugins/PrivateMessages.php Sat Nov 03 07:43:35 2007 -0400
@@ -4,13 +4,13 @@
Plugin URI: http://enanocms.org/
Description: Provides the page Special:PrivateMessages, which is used to manage private message functions. Also handles buddy lists.
Author: Dan Fuhry
-Version: 1.0.1
+Version: 1.0.2
Author URI: http://enanocms.org/
*/
/*
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0 release candidate 2
+ * Version 1.0.2
* Copyright (C) 2006-2007 Dan Fuhry
*
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
@@ -35,12 +35,18 @@
function page_Special_PrivateMessages()
{
global $db, $session, $paths, $template, $plugins; // Common objects
- if(!$session->user_logged_in) die_friendly('Access denied', '
');
+ }
$q = $db->sql_query('SELECT p.message_from, p.message_to, p.subject, p.message_text, p.date, p.folder_name, u.signature FROM '.table_prefix.'privmsgs AS p LEFT JOIN '.table_prefix.'users AS u ON (p.message_from=u.username) WHERE message_id='.$id.'');
- if(!$q) $db->_die('The message data could not be selected.');
+ if ( !$q )
+ {
+ $db->_die('The message data could not be selected.');
+ }
$r = $db->fetchrow();
$db->free_result();
- if( ($r['message_to'] != $session->username && $r['message_from'] != $session->username ) || $r['folder_name']=='drafts' ) die_friendly('Access denied', '
');
+ }
$q = $db->sql_query('SELECT message_to FROM '.table_prefix.'privmsgs WHERE message_id='.$id.'');
- if(!$q) $db->_die('The message data could not be selected.');
+ if ( !$q )
+ {
+ $db->_die('The message data could not be selected.');
+ }
$r = $db->fetchrow();
$db->free_result();
- if($r['message_to'] != $session->username) die_friendly('Access denied', '
');
+ }
$q = $db->sql_query('SELECT message_to FROM '.table_prefix.'privmsgs WHERE message_id='.$id.'');
- if(!$q) $db->_die('The message data could not be selected.');
+ if ( !$q )
+ {
+ $db->_die('The message data could not be selected.');
+ }
$r = $db->fetchrow();
- if($r['message_to'] != $session->username) die_friendly('Access denied', '
';
return;
}
@@ -2548,6 +2643,7 @@
function page_Special_Administration()
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
if($session->auth_level < USER_LEVEL_ADMIN) {
redirect(makeUrlNS('Special', 'Login/'.$paths->page, 'level='.USER_LEVEL_ADMIN), 'Not authorized', 'You need an authorization level of '.USER_LEVEL_ADMIN.' to use this page, your auth level is: ' . $session->auth_level, 0);
@@ -2573,7 +2669,7 @@
}
if ( t == namespace_list.Admin + 'AdminLogout' )
{
- var mb = new messagebox(MB_YESNO|MB_ICONQUESTION, 'Are you sure you want to de-authenticate?', 'If you de-authenticate, you will no longer be able to use the administration panel until you re-authenticate again. You may do so at any time using the Administration button on the sidebar.');
+ var mb = new messagebox(MB_YESNO|MB_ICONQUESTION, $lang.get('user_logout_confirm_title_elev'), $lang.get('user_logout_confirm_body_elev'));
mb.onclick['Yes'] = function() {
var tigraentry = document.getElementById('i_div0_0').parentNode;
var tigraobj = $(tigraentry);
@@ -2685,7 +2781,7 @@
}
else
{
- echo '
Please wait while the administration panel loads. You need to be using a recent browser with AJAX support in order to use Runt.
\\7', $c);
break;
case BLOCK_HTML:
$parser = $template->makeParserText($vars['sidebar_section_raw']);
@@ -3178,7 +3291,10 @@
$c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : 'Can\'t find plugin block';
break;
}
- $t = $template->tplWikiFormat($row['block_name']);
+ $block_name = $row['block_name']; // $template->tplWikiFormat($row['block_name']);
+ if ( empty($block_name) )
+ $block_name = '<Unnamed>';
+ $t = '' . $block_name . '';
if($row['item_enabled'] == 0) $t .= ' (disabled)';
else $t .= ' (disabled)';
$side = ( $row['sidebar_id'] == SIDEBAR_LEFT ) ? SIDEBAR_RIGHT : SIDEBAR_LEFT;
diff -r d8156d18ac58 -r 97ae8e9d5e29 plugins/SpecialCSS.php
--- a/plugins/SpecialCSS.php Thu Sep 27 15:55:37 2007 -0400
+++ b/plugins/SpecialCSS.php Sat Nov 03 07:43:35 2007 -0400
@@ -4,13 +4,13 @@
Plugin URI: http://enanocms.org/
Description: Provides the page Special:CSS, which is used in template files to reference the style sheet. Disabling or deleting this plugin will result in site instability.
Author: Dan Fuhry
-Version: 1.0.1
+Version: 1.0.2
Author URI: http://enanocms.org/
*/
/*
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0 release candidate 2
+ * Version 1.0.2
* Copyright (C) 2006-2007 Dan Fuhry
*
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
diff -r d8156d18ac58 -r 97ae8e9d5e29 plugins/SpecialGroups.php
--- a/plugins/SpecialGroups.php Thu Sep 27 15:55:37 2007 -0400
+++ b/plugins/SpecialGroups.php Sat Nov 03 07:43:35 2007 -0400
@@ -4,13 +4,13 @@
Plugin URI: http://enanocms.org/
Description: Provides group moderators and site administrators with the ability to control who is part of their groups.
Author: Dan Fuhry
-Version: 1.0.1
+Version: 1.0.2
Author URI: http://enanocms.org/
*/
/*
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0 release candidate 2
+ * Version 1.0.2
* Copyright (C) 2007 Dan Fuhry
*
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
@@ -50,10 +50,10 @@
{
die_friendly('Error', '
Hacking attempt
');
}
- $q = $db->sql_query('SELECT group_name,group_type FROM '.table_prefix.'groups WHERE group_id=' . $gid . ';');
+ $q = $db->sql_query('SELECT group_name,group_type,system_group FROM '.table_prefix.'groups WHERE group_id=' . $gid . ';');
if ( !$q )
{
- $db->_die();
+ $db->_die('SpecialGroups.php, line ' . __LINE__);
}
$row = $db->fetchrow();
$db->free_result();
@@ -70,7 +70,7 @@
ORDER BY m.is_mod DESC,u.username ASC;');
if ( !$q )
{
- $db->_die();
+ $db->_die('SpecialGroups.php, line ' . __LINE__);
}
$is_member = false;
@@ -127,11 +127,29 @@
{
die_friendly('ERROR', '
diff -r d8156d18ac58 -r 97ae8e9d5e29 plugins/SpecialPageFuncs.php
--- a/plugins/SpecialPageFuncs.php Thu Sep 27 15:55:37 2007 -0400
+++ b/plugins/SpecialPageFuncs.php Sat Nov 03 07:43:35 2007 -0400
@@ -4,13 +4,13 @@
Plugin URI: http://enanocms.org/
Description: Provides the page Special:CreatePage, which can be used to create new pages. Also adds the About Enano and GNU General Public License pages.
Author: Dan Fuhry
-Version: 1.0.1
+Version: 1.0.2
Author URI: http://enanocms.org/
*/
/*
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0 release candidate 2
+ * Version 1.0.2
* Copyright (C) 2006-2007 Dan Fuhry
*
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
@@ -109,6 +109,17 @@
exit;
}
+ if ( substr($urlname, 0, 8) == 'Project:' )
+ {
+ $template->header();
+
+ echo '
The page could not be created.
The page title can\'t start with "Project:" because this prefix is reserved for a parser shortcut.
';
+
+ $template->footer();
+ $db->close();
+
+ exit;
+ }
$tn = $paths->nslist[$_POST['namespace']] . $urlname;
if ( isset($paths->pages[$tn]) )
@@ -151,13 +162,13 @@
{
$db->_die('The page entry could not be inserted.');
}
- $q = $db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text) VALUES(\''.$urlname.'\', \''.$_POST['namespace'].'\', \''.$db->escape('Please edit this page! ').'\');');
+ $q = $db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text) VALUES(\''.$urlname.'\', \''.$_POST['namespace'].'\', \''.'\');');
if ( !$q )
{
$db->_die('The page text entry could not be inserted.');
}
- header('Location: '.makeUrlNS($_POST['namespace'], sanitize_page_id($p)));
+ header('Location: '.makeUrlNS($_POST['namespace'], sanitize_page_id($p)) . '#do:edit');
exit;
}
$template->header();
@@ -347,6 +358,8 @@
function page_Special_About_Enano()
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
+
$platform = 'Unknown';
$uname = @file_get_contents('/proc/sys/kernel/ostype');
if($uname == "Linux\n")
@@ -367,23 +380,52 @@
The developers and maintainers of Enano strongly believe that software should not only be free to use, but free to be modified,
- distributed, and used to create derivative works. For more information about Free Software, check out the
- Wikipedia page or
- the Free Software Foundation's homepage.
-
This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ get('meta_enano_about_poweredby');
+ $subst = array(
+ 'gpl_link' => makeUrlNS('Special', 'GNU_General_Public_License')
+ );
+ echo $lang->get('meta_enano_about_gpl', $subst);
+ if ( $lang->lang_code != 'eng' ):
+ // Do not remove this block of code. Doing so is a violation of the GPL. (A copy of the GPL in other languages
+ // must be accompanied by a copy of the English GPL.)
+ ?>
+
+ The developers and maintainers of Enano strongly believe that software should not only be free to use, but free to be modified,
+ distributed, and used to create derivative works. For more information about Free Software, check out the
+ Wikipedia page or
+ the Free Software Foundation's homepage.
+
+
+ This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+
';
+ break;
+ }
}
}
diff -r d8156d18ac58 -r 97ae8e9d5e29 plugins/SpecialUpdownload.php
--- a/plugins/SpecialUpdownload.php Thu Sep 27 15:55:37 2007 -0400
+++ b/plugins/SpecialUpdownload.php Sat Nov 03 07:43:35 2007 -0400
@@ -4,13 +4,13 @@
Plugin URI: http://enanocms.org/
Description: Provides the pages Special:UploadFile and Special:DownloadFile. UploadFile is used to upload files to the site, and DownloadFile fetches the file from the database, creates thumbnails if necessary, and sends the file to the user.
Author: Dan Fuhry
-Version: 1.0.1
+Version: 1.0.2
Author URI: http://enanocms.org/
*/
/*
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0 release candidate 2
+ * Version 1.0.2
* Copyright (C) 2006-2007 Dan Fuhry
* SpecialUpdownload.php - handles uploading and downloading of user-uploaded files - possibly the most rigorously security-enforcing script in all of Enano, although sessions.php comes in a close second
*
@@ -59,8 +59,14 @@
{
$file = false;
}
- if(!is_array($file)) die_friendly('Upload failed', '
The server could not retrieve the array $_FILES[\'data\'].
';
}
if ( $p = $paths->getAllParams() )
{
@@ -159,18 +257,18 @@
Logging in enables you to use your preferences and access member information. If you don\'t have a username and password here, you can create an account.';
+ echo '
Important note regarding cryptography: Some countries do not allow the import or use of cryptographic technology. If you live in one of the countries listed below, you should log in without using encryption.
-
This restriction applies to the following countries: Belarus, China, India, Israel, Kazakhstan, Mongolia, Pakistan, Russia, Saudi Arabia, Singapore, Tunisia, Venezuela, and Vietnam.
' . $s);
}
if ( $session->user_level < USER_LEVEL_ADMIN && $session->user_logged_in )
{
@@ -355,7 +504,7 @@
$captcharesult = $session->get_captcha($_POST['captchahash']);
if($captcharesult != $_POST['captchacode'])
{
- $s = 'The confirmation code you entered was incorrect.';
+ $s = $lang->get('user_reg_err_captcha');
}
else
{
@@ -379,7 +528,7 @@
$crypt_key = $session->fetch_public_key($_POST['crypt_key']);
if ( !$crypt_key )
{
- $s = 'Couldn\'t look up public encryption key';
+ $s = $lang->get('user_reg_err_missing_key');
}
else
{
@@ -406,28 +555,28 @@
{
case "none":
default:
- $str = 'You may now log in with the username and password that you created.';
+ $str = $lang->get('user_reg_msg_success_activ_none', array('login_link' => makeUrlNS('Special', 'Login', false, true)));
break;
case "user":
- $str = 'Because this site requires account activation, you have been sent an e-mail with further instructions. Please follow the instructions in that e-mail to continue your registration.';
+ $str = $lang->get('user_reg_msg_success_activ_user');
break;
case "admin":
- $str = 'Because this site requires administrative account activation, you cannot use your account at the moment. A notice has been sent to the site administration team that will alert them that your account has been created.';
+ $str = $lang->get('user_reg_msg_success_activ_admin');
break;
}
- die_friendly('Registration successful', '
Thank you for registering, your user account has been created. '.$str.'
');
}
else if ( $s == 'success' && $coppa )
{
- $str = 'However, in compliance with the Childrens\' Online Privacy Protection Act, you must have your parent or legal guardian activate your account. Please ask them to check their e-mail for further information.';
- die_friendly('Registration successful', '
Thank you for registering, your user account has been created. '.$str.'
- Password:
+ get('user_reg_lbl_field_password'); ?>
-10 ): ?>
- It needs to score at least for your registration to be accepted.
+ get('user_reg_msg_password_score'); ?>
- Loading...
+ Loading...
@@ -481,7 +630,7 @@
- Enter your password again to confirm.
+ get('user_reg_lbl_field_password_confirm'); ?>
@@ -499,18 +648,24 @@
-mail address:
+ if ( $coppa )
+ {
+ echo $lang->get('user_reg_lbl_field_email_coppa');
+ }
+ else
+ {
+ echo $lang->get('user_reg_lbl_field_email');
+ }
+ ?>
An e-mail with an account activation key will be sent to this address, so please ensure that it is correct.';
+ echo ' ' . $lang->get('user_reg_msg_email_activuser') . '';
}
?>
-
+
@@ -520,8 +675,8 @@
- Real name:
- Giving your real name is totally optional. If you choose to provide your real name, it will be used to provide attribution for any edits or contributions you may make to this site.
+ get('user_reg_lbl_field_realname'); ?>
+ get('user_reg_msg_realname_optional'); ?>
@@ -531,11 +686,11 @@
- Visual confirmation
+ get('user_reg_lbl_field_captcha'); ?>
- Please enter the code shown in the image to the right into the text box. This process helps to ensure that this registration is not being performed by an automated bot. If the image to the right is illegible, you can generate a new image.
+ get('user_reg_msg_captcha_pleaseenter', array('regen_flags' => 'href="#" onclick="regenCaptcha(); return false;"')); ?>
- If you are visually impaired or otherwise cannot read the text shown to the right, please contact the site management and they will create an account for you.
+ get('user_reg_msg_captcha_blind'); ?>