Changeset 11
- Timestamp:
- 2007-11-21 22:50:58 (5 years ago)
- Files:
-
- trunk/classes/pages/Register.php (modified) (3 diffs)
- trunk/db/spamboard.sql (modified) (2 diffs)
- trunk/includes/config/crypt.tmpl (modified) (1 diff)
- trunk/includes/config/settings.tmpl (modified) (1 diff)
- trunk/includes/lang/en.php (modified) (3 diffs)
- trunk/install.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/classes/pages/Register.php
r9 r11 97 97 * not every db supports this, but usually, it should work without locking, too; there just is the risk of a wrong member id being returned in the second query which is very unlikely - it can only occur on forums with very high traffic */ 98 98 @$C->query('LOCK TABLE ' . $SETTINGS['dbtableprefix'] . 'members WRITE'); 99 $q = $C->prepare('INSERT INTO ' . $SETTINGS['dbtableprefix'] . 'members (membername, memberemail, memberpassword, registered, memberstatus , memberavatar) VALUES (:user, :email, :pw, :ts, :member, :avatar)');99 $q = $C->prepare('INSERT INTO ' . $SETTINGS['dbtableprefix'] . 'members (membername, memberemail, memberpassword, registered, memberstatus) VALUES (:user, :email, :pw, :ts, :member)'); 100 100 // the actual password will be entered seperately 101 101 $_pw = '*'; 102 102 $_member = 'Member'; 103 $_avatar = 'images/spacer.gif';104 103 $_t = new DateTime('now', new DateTimeZone('UTC')); 105 104 $q->bindParam(':user', $user, PDO::PARAM_STR); … … 108 107 $q->bindParam(':ts', $_t->format('Y-m-d H:i:s'), PDO::PARAM_STR, 19); 109 108 $q->bindParam(':member', $_member, PDO::PARAM_STR, 6); 110 $q->bindParam(':avatar',$_avatar, PDO::PARAM_STR, 17);111 109 $q->execute(); 112 110 $q = $C->query('SELECT MAX(memberid) AS id FROM ' . $SETTINGS['dbtableprefix'] . 'members'); … … 117 115 // set group membership to 'Member' 118 116 $q = $C->prepare('SELECT id FROM ' . $SETTINGS['dbtableprefix'] . 'usergroups WHERE name=:member'); 119 $q->bindParam(':member', $_member, PDO::PARAM_STR,6);117 $q->bindParam(':member', $_member, PDO::PARAM_STR, 6); 120 118 $q->execute(); 121 119 $row2 = $q->fetchObject(); 122 120 $q = $C->prepare('INSERT INTO ' . $SETTINGS['dbtableprefix'] . 'groupmemberships (member, usergroup) VALUES (:member, :group)'); 123 $q->bindParam(':member', $row->id, PDO::PARAM_INT, 12);124 $q->bindParam(':group', $row2->id, PDO::PARAM_INT, 12);121 $q->bindParam(':member', $row->id, PDO::PARAM_INT, 12); 122 $q->bindParam(':group', $row2->id, PDO::PARAM_INT, 12); 125 123 $q->execute(); 126 124 // send e-mail trunk/db/spamboard.sql
r9 r11 411 411 memberemailhidden INTEGER NOT NULL DEFAULT 0, 412 412 memberhomepage VARCHAR(255) NULL, 413 memberavatar VARCHAR(255) NOT NULL ,413 memberavatar VARCHAR(255) NOT NULL DEFAULT 'images/spacer.gif', 414 414 memberpassword TEXT NOT NULL, 415 415 memberstatus VARCHAR(255) NOT NULL, … … 421 421 signature VARCHAR(255) NULL, 422 422 lastvisit DATETIME NOT NULL, 423 boardstyle VARCHAR(32) N OT NULL,424 addressbook TEXT ,423 boardstyle VARCHAR(32) NULL, 424 addressbook TEXT NULL, 425 425 birthday DATE DEFAULT NULL, 426 426 messagenotification_email INTEGER NOT NULL DEFAULT 0, 427 427 messagenotification_popup INTEGER NOT NULL DEFAULT 1, 428 428 registered DATETIME NOT NULL, 429 salt VARCHAR(16) N OT NULL,430 lang VARCHAR(16) N OT NULL,431 offset INTEGER N OT NULL,429 salt VARCHAR(16) NULL, 430 lang VARCHAR(16) NULL, 431 offset INTEGER NULL, 432 432 PRIMARY KEY (memberid) 433 433 ); trunk/includes/config/crypt.tmpl
r1 r11 9 9 10 10 // cipher key (512 bytes); randomized on install time 11 $CIPHER['key'] = ' ';11 $CIPHER['key'] = '%key%'; 12 12 13 13 // padding for password hashes (512 bytes); randomized on install time 14 $HASH['padding'] = ' ';14 $HASH['padding'] = '%padding%'; 15 15 16 16 $HASH['salt_length'] = 8; trunk/includes/config/settings.tmpl
r8 r11 19 19 $SETTINGS['slogan'] = 'The Tastiest Forum on Earth!'; // displayed in browser's title 20 20 $SETTINGS['forumlogo'] = 'logo.png'; // has to be placed in the images directory 21 $SETTINGS['sitename'] = ' '; // name of the site the forum should link back to22 $SETTINGS['siteurl'] = ' '; // URL of the site the forum should link back to21 $SETTINGS['sitename'] = 'Spam Board Website'; // name of the site the forum should link back to 22 $SETTINGS['siteurl'] = 'http://www.spamboard.net'; // URL of the site the forum should link back to 23 23 $SETTINGS['forumadmin'] = ''; // The admin's name. This'll be used to 'sign' all outgoing e-mail. 24 24 $SETTINGS['forumadminemail'] = ''; // e-mail address for outgoing mail trunk/includes/lang/en.php
r9 r11 306 306 $LANG['Webserver_Path'] = 'Webserver Path'; 307 307 $LANG['New_Subscription'] = 'New Subscription'; 308 $LANG['Spam_Board_Installer'] = 'Spam Board Installer'; 309 $LANG['Start_Over'] = 'Start Over'; 310 $LANG['Next_Page'] = 'Next Page'; 311 $LANG['Set_Permissions'] = 'Set Permissions?'; 308 312 309 313 /* actual sentences */ … … 379 383 $LANG['subscriptions_updated'] = 'Your subscriptions have been updated successfully.'; 380 384 $LANG['group_memberships_updated'] = 'Your group memberships have been updated successfully.'; 385 $LANG['installer_intro'] = 'Hello and welcome to the Spam Board installer script! You are about to install version ' . $VERSION . " of this forum.<br /><br />We will ask you a few questions now. Don't worry, nothing will be committed before you had a chance to review all the options again. Please don't use your browser's back and forward buttons, as they'll break things. If you feel the need to change anything, you can start over at any time by using the respective button."; 386 $LANG['installer_permissions'] = "To function properly, the board needs write permissions on certain directories and files. If your webserver runs on a UNIX-ish system, the script can attempt to set these permissions automatically for you. However, if you've just downloaded a release archive from the official website and extracted it directly on your webserver, this isn't necessary, as everything should already be set up correctly. If, however, you extracted the archive on another system (e.g. Microsoft Windows) first and uploaded the files to your webspace from there, the permissions have been lost. Check the box below if you want the script to set the permissions again."; 387 $LANG['installer_database'] = "Now please enter some information about the database system you're going to use. If you select SQLite, you don't have to enter a username and password. For other database systems, the database you enter here already has to exist. The table prefix is put in front of the name of each table the board will create. This enabled you to run the board within a database which also contains other tables."; 388 $LANG['installer_pathes'] = "Please enter two pathes which define the location you're installing the board to. The file system path is the board root in respect to the filesystem root. The web path is the directory tree after the top level domain (.com, .net, .org) to the board root. The installer script has already tried to guess them and entered these values into the respective fields. Usually, this should be correct. Only change these values if you know what you're doing."; 389 $LANG['installer_board'] = "As you can see, it's getting less critical with every page. What you need to enter now is some general information about your forum and the site it should link back to."; 390 $LANG['installer_admin_account'] = "This is the last page of the setup. You have to create an initial administrator account which you can use in the post-setup phase to customize everything even more. This account (including its e-mail address) will also be used to sign all outgoing mail. Of course, you can change these settings again later on. Finally, you have to select the hash algorithm which should be used to 'encrypt' the passwords. In case you don't know what that is, RIPEMD or SHA (greater 1) are common choices.<br /><br />After this page, you'll see all the settings you've chosen again and then you can choose whether to commit them or not."; 391 $LANG['installer_overview'] = "Here's everything you entered once again. <i>Everything should have a value, with the exception of SQL username and password if you've selected SQLite!</i> If you've confirmed everything to be correct, proceed."; 392 $LANG['installer_rewrite'] = "If you are running a webserver which is capable of URL rewriting, you can take advantage of that by using shorter URLs than otherwise. The installer script can set this up for you automatically if your webserver is Apache (requires mod_rewrite). Lighttpd can also rewrite your URLs, but you have to set up the rules for that webserver by hand for now. If you're unsure, don't select this, the board will run anyway then."; 393 $LANG['installer_permissions_success'] = 'The file permissions have been set successfully.'; 394 $LANG['installer_rewriting_success'] = 'URL Rewriting has been set up successfully.'; 395 $LANG['installer_config_success'] = 'The configuration files have been set up successfully.'; 396 $LANG['installer_database_success'] = 'The database has been set up successfully.'; 397 $LANG['installer_overall_success'] = "Congratulations! Your Spam Board has been fully set up. If you didn't see any error messages or warnings, it should now be fully functional.<br /><br />You still have some work to do, of course:<ol><li>delete this installer script</li><li>go to %boardurl%</li><li>log in with the admin account you just created</li><li></li></ol>"; 381 398 382 399 /* error messages */ … … 429 446 $LANG['error_avatar_filename'] = "Error: A file with the same name as the one you tried to upload already exists among the avatars. Please rename it and try again."; 430 447 $LANG['error_avatar_move'] = "Error: Something unforseen went wrong with the upload. Please try again. If this error persists, contact the administrators."; 448 $LANG['error_installer_permissions'] = "Error: Couldn't set file permissions. Please do it manually. Aborting."; 449 $LANG['error_installer_rewriting'] = "Error: URL Rewriting couldn't be set up. Please do it manually or restart the installation without it. Aborting."; 450 $LANG['error_installer_config'] = "Error: The configuration files couldn't be set up correctly. Aborting."; 451 $LANG['error_installer_database'] = "Error: The database couldn't be set up correctly. Aborting."; 431 452 432 453 ?>
