diff --git a/upload/admin_bans.php b/upload/admin_bans.php index 9a1fdc8..b49a40c 100644 --- a/upload/admin_bans.php +++ b/upload/admin_bans.php @@ -1,27 +1,12 @@ " />
- Supplement ban with IP and e-mail + Supplement ban with IP and email
@@ -125,17 +110,17 @@ if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban'])) - + - +
IP-adressesIP-addresses The IP or IP-ranges you wish to ban (e.g. 150.11.110.1 or 150.11.110). Separate addresses with spaces. If an IP is entered already it is the last known IP of this user in the database.here to see IP statistics for this user.' ?>
E-mail/domainEmail/domain - The e-mail or e-mail domain you wish to ban (e.g. someone@somewhere.com or somewhere.com). See "Allow banned e-mail addresses" in Permissions for more info. + The email or email domain you wish to ban (e.g. someone@somewhere.com or somewhere.com). See "Allow banned email addresses" in Permissions for more info.
@@ -190,7 +175,7 @@ else if (isset($_POST['add_edit_ban'])) $ban_expire = trim($_POST['ban_expire']); if ($ban_user == '' && $ban_ip == '' && $ban_email == '') - message('You must enter either a username, an IP address or an e-mail address (at least).'); + message('You must enter either a username, an IP address or an email address (at least).'); else if (strtolower($ban_user) == 'guest') message('The guest user cannot be banned.'); @@ -199,11 +184,11 @@ else if (isset($_POST['add_edit_ban'])) { $ban_ip = preg_replace('/[\s]{2,}/', ' ', $ban_ip); $addresses = explode(' ', $ban_ip); - $addresses = array_map('trim', $addresses); + $addresses = array_map('pun_trim', $addresses); for ($i = 0; $i < count($addresses); ++$i) { - if (strpos($addresses[$i], ':') !== false) + if (strpos($addresses[$i], ':') !== false) { $octets = explode(':', $addresses[$i]); @@ -242,7 +227,7 @@ else if (isset($_POST['add_edit_ban'])) if ($ban_email != '' && !is_valid_email($ban_email)) { if (!preg_match('/^[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/', $ban_email)) - message('The e-mail address (e.g. user@domain.com) or partial e-mail address domain (e.g. domain.com) you entered is invalid.'); + message('The email address (e.g. user@domain.com) or partial email address domain (e.g. domain.com) you entered is invalid.'); } if ($ban_expire != '' && $ban_expire != 'Never') @@ -316,7 +301,7 @@ generate_admin_menu('bans'); Username
- The username to ban (case insensitive). The next page will let you enter a custom IP and e-mail. If you just want to ban a specific IP/IP-range or e-mail just leave it blank. + The username to ban (case-insensitive). The next page will let you enter a custom IP and email. If you just want to ban a specific IP/IP-range or email just leave it blank. @@ -349,7 +334,7 @@ if ($db->num_rows($result)) - E-mail + Email diff --git a/upload/admin_categories.php b/upload/admin_categories.php index 8325620..e752c6d 100644 --- a/upload/admin_categories.php +++ b/upload/admin_categories.php @@ -1,27 +1,12 @@ query('DELETE FROM '.$db->prefix.'categories WHERE id='.$cat_to_delete) or error('Unable to delete category', __FILE__, __LINE__, $db->error()); - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -100,7 +85,7 @@ else if (isset($_POST['del_cat']) || isset($_POST['del_cat_comply'])) redirect('admin_categories.php', 'Category deleted. Redirecting …'); } - else // If the user hasn't comfirmed the delete + else // If the user hasn't comfirmed the delete { $result = $db->query('SELECT cat_name FROM '.$db->prefix.'categories WHERE id='.$cat_to_delete) or error('Unable to fetch category info', __FILE__, __LINE__, $db->error()); $cat_name = $db->result($result); @@ -138,7 +123,7 @@ else if (isset($_POST['del_cat']) || isset($_POST['del_cat_comply'])) } -else if (isset($_POST['update'])) // Change position and name of the categories +else if (isset($_POST['update'])) // Change position and name of the categories { confirm_referrer('admin_categories.php'); @@ -161,7 +146,7 @@ else if (isset($_POST['update'])) // Change position and name of the categories $db->query('UPDATE '.$db->prefix.'categories SET cat_name=\''.$db->escape($cat_name[$i]).'\', disp_position='.$cat_order[$i].' WHERE id='.$cat_id) or error('Unable to update category', __FILE__, __LINE__, $db->error()); } - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -186,12 +171,12 @@ generate_admin_menu('categories'); ?>
-

Add/remove/edit categories

+

Add categories

- Add/delete categories + Add categories
@@ -201,7 +186,22 @@ generate_admin_menu('categories'); The name of the new category you want to add. You can edit the name of the category later (see below). Go to Forums to add forums to your new category. - +
+
+
+
+
+
+ +

Remove categories

+
+
+
+
+ Delete categories +
+ + -
Delete a category
+
-
+ +
+ + +

Edit categories

+
+
+
Edit categories
@@ -252,9 +259,9 @@ generate_admin_menu('categories');
-
+
-
+
Add word
-

Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive. Censor words must be enabled in Options for this to have any effect.

- +

Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case-insensitive. Censor words must be enabled in Options for this to have any effect.

+
diff --git a/upload/admin_forums.php b/upload/admin_forums.php index 158c945..559995c 100644 --- a/upload/admin_forums.php +++ b/upload/admin_forums.php @@ -1,27 +1,12 @@ query('INSERT INTO '.$db->prefix.'forums (cat_id) VALUES('.$add_to_cat.')') or error('Unable to create forum', __FILE__, __LINE__, $db->error()); - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -65,7 +50,7 @@ else if (isset($_GET['del_forum'])) if ($forum_id < 1) message($lang_common['Bad request']); - if (isset($_POST['del_forum_comply'])) // Delete a forum with all posts + if (isset($_POST['del_forum_comply'])) // Delete a forum with all posts { @set_time_limit(0); @@ -88,7 +73,7 @@ else if (isset($_GET['del_forum'])) $db->query('DELETE FROM '.$db->prefix.'forums WHERE id='.$forum_id) or error('Unable to delete forum', __FILE__, __LINE__, $db->error()); $db->query('DELETE FROM '.$db->prefix.'forum_perms WHERE forum_id='.$forum_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $db->error()); - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -147,7 +132,7 @@ else if (isset($_POST['update_positions'])) $db->query('UPDATE '.$db->prefix.'forums SET disp_position='.$disp_position.' WHERE id='.intval($forum_id)) or error('Unable to update forum', __FILE__, __LINE__, $db->error()); } - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -213,7 +198,7 @@ else if (isset($_GET['edit_forum'])) } } - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -227,7 +212,7 @@ else if (isset($_GET['edit_forum'])) $db->query('DELETE FROM '.$db->prefix.'forum_perms WHERE forum_id='.$forum_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $db->error()); - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -328,7 +313,7 @@ else if (isset($_GET['edit_forum'])) $post_replies = (($cur_perm['g_post_replies'] == '0' && $cur_perm['post_replies'] == '1') || ($cur_perm['g_post_replies'] == '1' && $cur_perm['post_replies'] != '0')) ? true : false; $post_topics = (($cur_perm['g_post_topics'] == '0' && $cur_perm['post_topics'] == '1') || ($cur_perm['g_post_topics'] == '1' && $cur_perm['post_topics'] != '0')) ? true : false; - // Determine if the current sittings differ from the default or not + // Determine if the current settings differ from the default or not $read_forum_def = ($cur_perm['read_forum'] == '0') ? false : true; $post_replies_def = (($post_replies && $cur_perm['g_post_replies'] == '0') || (!$post_replies && ($cur_perm['g_post_replies'] == '' || $cur_perm['g_post_replies'] == '1'))) ? false : true; $post_topics_def = (($post_topics && $cur_perm['g_post_topics'] == '0') || (!$post_topics && ($cur_perm['g_post_topics'] == '' || $cur_perm['g_post_topics'] == '1'))) ? false : true; @@ -434,7 +419,7 @@ $tabindex_count = 4; $cur_category = 0; while ($cur_forum = $db->fetch_assoc($result)) { - if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? + if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? { if ($cur_category != 0) echo "\t\t\t\t\t\t\t".'
Censored word
'."\n\t\t\t\t\t\t".'
'."\n\t\t\t\t\t".'
'."\n\t\t\t\t".''."\n"; diff --git a/upload/admin_groups.php b/upload/admin_groups.php index 512b0b2..9f56a6d 100644 --- a/upload/admin_groups.php +++ b/upload/admin_groups.php @@ -1,27 +1,12 @@ Email flood interval - Number of seconds that users in this group have to wait between e-mails. Set to 0 to disable. + Number of seconds that users in this group have to wait between emails. Set to 0 to disable. @@ -306,7 +291,7 @@ else if (isset($_POST['add_edit_group'])) $db->query('UPDATE '.$db->prefix.'groups SET g_title=\''.$db->escape($title).'\', g_user_title='.$user_title.', g_moderator='.$moderator.', g_mod_edit_users='.$mod_edit_users.', g_mod_rename_users='.$mod_rename_users.', g_mod_change_passwords='.$mod_change_passwords.', g_mod_ban_users='.$mod_ban_users.', g_read_board='.$read_board.', g_view_users='.$view_users.', g_post_replies='.$post_replies.', g_post_topics='.$post_topics.', g_edit_posts='.$edit_posts.', g_delete_posts='.$delete_posts.', g_delete_topics='.$delete_topics.', g_set_title='.$set_title.', g_search='.$search.', g_search_users='.$search_users.', g_send_email='.$send_email.', g_post_flood='.$post_flood.', g_search_flood='.$search_flood.', g_email_flood='.$email_flood.' WHERE g_id='.intval($_POST['group_id'])) or error('Unable to update group', __FILE__, __LINE__, $db->error()); } - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -375,7 +360,7 @@ else if (isset($_GET['del_group'])) $db->query('DELETE FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to delete group', __FILE__, __LINE__, $db->error()); $db->query('DELETE FROM '.$db->prefix.'forum_perms WHERE group_id='.$group_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $db->error()); - // Regenerate the quickjump cache + // Regenerate the quick jump cache if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) require PUN_ROOT.'include/cache.php'; @@ -445,7 +430,7 @@ else if (isset($_GET['del_group'])) while ($cur_group = $db->fetch_assoc($result)) { - if ($cur_group['g_id'] == PUN_MEMBER) // Pre-select the pre-defined Members group + if ($cur_group['g_id'] == PUN_MEMBER) // Pre-select the pre-defined Members group echo "\t\t\t\t\t\t\t\t\t\t".''."\n"; else echo "\t\t\t\t\t\t\t\t\t\t".''."\n"; diff --git a/upload/admin_index.php b/upload/admin_index.php index 8a05ade..7fd075c 100644 --- a/upload/admin_index.php +++ b/upload/admin_index.php @@ -1,27 +1,12 @@ = $latest_version) + if (version_compare($pun_config['o_cur_version'], $latest_version, '>=')) message('You are running the latest version of FluxBB.'); else message('A new version of FluxBB has been released. You can download the latest version at FluxBB.org.'); @@ -119,7 +95,7 @@ if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || } -// Check for the existance of various PHP opcode caches/optimizers +// Check for the existence of various PHP opcode caches/optimizers if (function_exists('mmcache')) $php_accelerator = 'Turck MMCache'; else if (isset($_PHPA)) @@ -131,7 +107,7 @@ else if (ini_get('zend_optimizer.optimization_level')) else if (ini_get('eaccelerator.enable')) $php_accelerator = 'eAccelerator'; else if (ini_get('xcache.cacher')) - $php_accelerator = 'XCache'; + $php_accelerator = 'XCache'; else $php_accelerator = 'N/A'; diff --git a/upload/admin_loader.php b/upload/admin_loader.php index 39463b8..133d848 100644 --- a/upload/admin_loader.php +++ b/upload/admin_loader.php @@ -1,27 +1,12 @@ '.$cur_post[1].' in topic '.$cur_post[0].'
'."\n"; - if ($cur_post[1] == $first_post) // This is the "topic post" so we have to index the subject as well + if ($cur_post[1] == $first_post) // This is the "topic post" so we have to index the subject as well update_search_index('post', $cur_post[1], $cur_post[2], $subject); else update_search_index('post', $cur_post[1], $cur_post[2]); @@ -159,11 +144,11 @@ generate_admin_menu('maintenance'); Topics per cycle - The number of topics to process per pageview. E.g. if you were to enter 100, one hundred topics would be processed and then the page would refresh. This is to prevent the script from timing out during the rebuild process. + The number of topics to process per page view. E.g. if you were to enter 100, one hundred topics would be processed and then the page would refresh. This is to prevent the script from timing out during the rebuild process. - Starting Topic ID + Starting topic ID The topic ID to start rebuilding at. The default value is the first available ID in the database. Normally you wouldn't want to change this. diff --git a/upload/admin_options.php b/upload/admin_options.php index 56937e0..fc51df5 100644 --- a/upload/admin_options.php +++ b/upload/admin_options.php @@ -1,27 +1,12 @@ - Default timezone + Default time zone - The default timezone for guests and users attempting to register for the board. + The default time zone for guests and users attempting to register for the board. @@ -358,7 +343,7 @@ generate_admin_menu('options'); User info in posts /> Yes    /> No - Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (e-mail and URL). + Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (email and URL). @@ -522,8 +507,8 @@ generate_admin_menu('options'); Report method - /> Internal    /> E-mail    /> Both - Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, e-mailed to the addresses on the mailing list (see below) or both. + /> Internal    /> Email    /> Both + Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, emailed to the addresses on the mailing list (see below) or both. @@ -583,35 +568,35 @@ generate_admin_menu('options');
- E-mail + Email
- + - + @@ -655,7 +640,7 @@ generate_admin_menu('options'); @@ -680,12 +665,12 @@ generate_admin_menu('options'); - +
Admin e-mailAdmin email - The e-mail address of the forum administrator. + The email address of the forum administrator.
Webmaster e-mailWebmaster email - This is the address that all e-mails sent by the forum will be addressed from. + This is the address that all emails sent by the forum will be addressed from.
Subscriptions /> Yes    /> No - Enable users to subscribe to topics (receive e-mail when someone replies). + Enable users to subscribe to topics (receive email when someone replies).
SMTP server address - The address of an external SMTP server to send e-mails with. You can specify a custom port number if the SMTP server doesn't run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program. + The address of an external SMTP server to send emails with. You can specify a custom port number if the SMTP server doesn't run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program.
Verify registrations /> Yes    /> No - When enabled, users are e-mailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new e-mail addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" e-mail addresses in their profiles. + When enabled, users are emailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new email addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" email addresses in their profiles.
Default e-mail settingDefault email setting Choose the default privacy setting for new user registrations. - /> Display e-mail address to other users.
- /> Hide e-mail address but allow form e-mail.
- /> Hide e-mail address and disallow form e-mail.
+ /> Display email address to other users.
+ /> Hide email address but allow form email.
+ /> Hide email address and disallow form email.
diff --git a/upload/admin_permissions.php b/upload/admin_permissions.php index 3410130..b03f0b2 100644 --- a/upload/admin_permissions.php +++ b/upload/admin_permissions.php @@ -1,27 +1,12 @@ - Require guest e-mail + Require guest email /> Yes    /> No - Require guests to supply an e-mail address when posting. + Require guests to supply an email address when posting. @@ -163,17 +148,17 @@ generate_admin_menu('permissions');
- + - +
Allow banned e-mail addressesAllow banned email addresses /> Yes    /> No - Allow users to register with or change to a banned e-mail address/domain. If left at its default setting (yes) this action will be allowed, but an alert e-mail will be sent to the mailing list (an effective way of detecting multiple registrations). + Allow users to register with or change to a banned email address/domain. If left at its default setting (yes) this action will be allowed, but an alert email will be sent to the mailing list (an effective way of detecting multiple registrations).
Allow duplicate e-mail addressesAllow duplicate email addresses /> Yes    /> No - Controls whether users should be allowed to register with an e-mail address that another user already has. If allowed, an alert e-mail will be sent to the mailing list if a duplicate is detected. + Controls whether users should be allowed to register with an email address that another user already has. If allowed, an alert email will be sent to the mailing list if a duplicate is detected.
diff --git a/upload/admin_prune.php b/upload/admin_prune.php index ecc4224..c5d3fb6 100644 --- a/upload/admin_prune.php +++ b/upload/admin_prune.php @@ -1,27 +1,12 @@ result($result, $i); - prune($fid, $_POST['prune_sticky'], $prune_date); + prune($fid, $prune_sticky, $prune_date); update_forum($fid); } } else { $prune_from = intval($prune_from); - prune($prune_from, $_POST['prune_sticky'], $prune_date); + prune($prune_from, $prune_sticky, $prune_date); update_forum($prune_from); } @@ -90,10 +76,10 @@ if (isset($_GET['action']) || isset($_POST['prune']) || isset($_POST['prune_comp $prune_date = time() - ($prune_days*86400); $prune_from = $_POST['prune_from']; - // Concatenate together the query for counting number or topics to prune + // Concatenate together the query for counting number of topics to prune $sql = 'SELECT COUNT(id) FROM '.$db->prefix.'topics WHERE last_post<'.$prune_date.' AND moved_to IS NULL'; - if ($_POST['prune_sticky'] == '0') + if (!$prune_sticky) $sql .= ' AND sticky=\'0\''; if ($prune_from != 'all') @@ -127,7 +113,7 @@ if (isset($_GET['action']) || isset($_POST['prune']) || isset($_POST['prune_comp
- +
Confirm prune posts @@ -195,7 +181,7 @@ else $cur_category = 0; while ($forum = $db->fetch_assoc($result)) { - if ($forum['cid'] != $cur_category) // Are we still in the same category? + if ($forum['cid'] != $cur_category) // Are we still in the same category? { if ($cur_category) echo "\t\t\t\t\t\t\t\t\t\t\t".''."\n"; diff --git a/upload/admin_ranks.php b/upload/admin_ranks.php index 3cb5f91..ed63dab 100644 --- a/upload/admin_ranks.php +++ b/upload/admin_ranks.php @@ -1,27 +1,12 @@ Add rank

Enter a rank and the minimum number of posts that a user has to have to aquire the rank. Different ranks cannot have the same value for minimum posts. If a title is set for a user, the title will be displayed instead of any rank. User ranks must be enabled in Options for this to have any effect.

- +
@@ -164,7 +149,7 @@ if ($db->num_rows($result)) { ?> -
Rank title
+
diff --git a/upload/admin_reports.php b/upload/admin_reports.php index 4d5ed26..20179a5 100644 --- a/upload/admin_reports.php +++ b/upload/admin_reports.php @@ -1,27 +1,12 @@ - + @@ -216,7 +201,7 @@ else if (isset($_POST['find_user'])) $form['username'] = $_POST['username']; // trim() all elements in $form - $form = array_map('trim', $form); + $form = array_map('pun_trim', $form); $conditions = array(); $posts_greater = trim($_POST['posts_greater']); @@ -291,7 +276,7 @@ else if (isset($_POST['find_user'])) - + @@ -367,13 +352,13 @@ else Enter search criteria

Search for users in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted.

-
Rank title
UsernameE-mailEmail Title/Status Posts Admin note
UsernameE-mailEmail Title/Status Posts Admin note
+
- + @@ -449,7 +434,7 @@ else @@ -393,7 +396,7 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' // Start by updating the database structure case 'start': - // Make all e-mail fields VARCHAR(80) + // Make all email fields VARCHAR(80) $db->alter_field('bans', 'email', 'VARCHAR(80)', true); $db->alter_field('posts', 'poster_email', 'VARCHAR(80)', true); $db->alter_field('users', 'email', 'VARCHAR(80)', false, ''); @@ -426,47 +429,125 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' // Drop g_edit_subjects_interval column from groups table $db->drop_field('groups', 'g_edit_subjects_interval'); - $new_config = array(); - // Add database revision number if (!array_key_exists('o_database_revision', $pun_config)) - $new_config[] = '\'o_database_revision\', \'0\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_database_revision\', \'0\')') or error('Unable to insert config value \'o_database_revision\'', __FILE__, __LINE__, $db->error()); // Add default email setting option if (!array_key_exists('o_default_email_setting', $pun_config)) - $new_config[] = '\'o_default_email_setting\', \'1\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_default_email_setting\', \'1\')') or error('Unable to insert config value \'o_default_email_setting\'', __FILE__, __LINE__, $db->error()); // Make sure we have o_additional_navlinks (was added in 1.2.1) if (!array_key_exists('o_additional_navlinks', $pun_config)) - $new_config[] = '\'o_additional_navlinks\', \'\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_additional_navlinks\', \'\')') or error('Unable to insert config value \'o_additional_navlinks\'', __FILE__, __LINE__, $db->error()); // Insert new config option o_topic_views if (!array_key_exists('o_topic_views', $pun_config)) - $new_config[] = '\'o_topic_views\', \'1\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_topic_views\', \'1\')') or error('Unable to insert config value \'o_topic_views\'', __FILE__, __LINE__, $db->error()); // Insert new config option o_signatures if (!array_key_exists('o_signatures', $pun_config)) - $new_config[] = '\'o_signatures\', \'1\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_signatures\', \'1\')') or error('Unable to insert config value \'o_signatures\'', __FILE__, __LINE__, $db->error()); // Insert new config option o_smtp_ssl if (!array_key_exists('o_smtp_ssl', $pun_config)) - $new_config[] = '\'o_smtp_ssl\', \'0\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_smtp_ssl\', \'0\')') or error('Unable to insert config value \'o_smtp_ssl\'', __FILE__, __LINE__, $db->error()); // Insert new config option o_default_dst if (!array_key_exists('o_default_dst', $pun_config)) - $new_config[] = '\'o_default_dst\', \'0\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_default_dst\', \'0\')') or error('Unable to insert config value \'o_default_dst\'', __FILE__, __LINE__, $db->error()); + // Insert new config option o_quote_depth if (!array_key_exists('o_quote_depth', $pun_config)) - $new_config[] = '\'o_quote_depth\', \'3\''; + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_quote_depth\', \'3\')') or error('Unable to insert config value \'o_quote_depth\'', __FILE__, __LINE__, $db->error()); + + // Insert config option o_base_url which was removed in 1.3 + if (!array_key_exists('o_base_url', $pun_config)) + { + // If it isn't in $pun_config['o_base_url'] it should be in $base_url, but just in-case it isn't we can make a guess at it + if (!isset($base_url)) + $base_url = 'http://'.$_SERVER['SERVER_NAME'].str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])); + + $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES (\'o_base_url\', \''.$db->escape($base_url).'\')') or error('Unable to insert config value \'o_quote_depth\'', __FILE__, __LINE__, $db->error()); + } + + if (strpos($cur_version, '1.2') === 0) + { + // Groups are almost the same as 1.2: + // unverified: 32000 -> 0 - if (!empty($new_config)) - $db->query('INSERT INTO '.$db->prefix.'config (conf_name, conf_value) VALUES ('.implode('), (', $new_config).')') or error('Unable to insert config values', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = 0 WHERE group_id = 32000') or error('Unable to update unverified users', __FILE__, __LINE__, $db->error()); + } + else if (strpos($cur_version, '1.3') === 0) + { + // Groups have changed quite a lot from 1.3: + // unverified: 0 -> 0 + // admin: 1 -> 1 + // mod: ? -> 2 + // guest: 2 -> 3 + // member: ? -> 4 - unset($new_config); + $result = $db->query('SELECT MAX(g_id) + 1 FROM '.$db->prefix.'groups') or error('Unable to select temp group ID', __FILE__, __LINE__, $db->error()); + $temp_id = $db->result($result); + + $result = $db->query('SELECT g_id FROM '.$db->prefix.'groups WHERE g_moderator = 1 AND g_id > 1 LIMIT 1') or error('Unable to select moderator group', __FILE__, __LINE__, $db->error()); + if ($db->num_rows($result)) + $mod_gid = $db->result($result); + else + { + $db->query('INSERT INTO '.$db->prefix.'groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood) VALUES('."'Moderators', 'Moderator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $db->error()); + $mod_gid = $db->insert_id(); + } + + $member_gid = $pun_config['o_default_user_group']; + + // move the mod group to a temp place + $db->query('UPDATE '.$db->prefix.'groups SET g_id = '.$temp_id.' WHERE g_id = '.$mod_gid) or error('Unable to update group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = '.$temp_id.' WHERE group_id = '.$mod_gid) or error('Unable to update users group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'forum_perms SET group_id = '.$temp_id.' WHERE group_id = '.$mod_gid) or error('Unable to forum_perms group ID', __FILE__, __LINE__, $db->error()); + if ($member_gid == $mod_gid) $member_gid = $temp_id; + + // move whoever is in 3 to a spare slot + $db->query('UPDATE '.$db->prefix.'groups SET g_id = '.$mod_gid.' WHERE g_id = 3') or error('Unable to update group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = '.$mod_gid.' WHERE group_id = 3') or error('Unable to update users group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'forum_perms SET group_id = '.$mod_gid.' WHERE group_id = 3') or error('Unable to forum_perms group ID', __FILE__, __LINE__, $db->error()); + if ($member_gid == 3) $member_gid = $mod_gid; + + // move guest to 3 + $db->query('UPDATE '.$db->prefix.'groups SET g_id = 3 WHERE g_id = 2') or error('Unable to update group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = 3 WHERE group_id = 2') or error('Unable to update users group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'forum_perms SET group_id = 3 WHERE group_id = 2') or error('Unable to forum_perms group ID', __FILE__, __LINE__, $db->error()); + if ($member_gid == 2) $member_gid = 3; + + // move mod group in temp place to 2 + $db->query('UPDATE '.$db->prefix.'groups SET g_id = 2 WHERE g_id = '.$temp_id) or error('Unable to update group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = 2 WHERE group_id = '.$temp_id) or error('Unable to update users group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'forum_perms SET group_id = 2 WHERE group_id = '.$temp_id) or error('Unable to forum_perms group ID', __FILE__, __LINE__, $db->error()); + if ($member_gid == $temp_id) $member_gid = 2; + + // Only move stuff around if it isn't already in the right place + if ($member_gid != $mod_gid || $member_gid != 4) + { + // move members to temp place + $db->query('UPDATE '.$db->prefix.'groups SET g_id = '.$temp_id.' WHERE g_id = '.$member_gid) or error('Unable to update group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = '.$temp_id.' WHERE group_id = '.$member_gid) or error('Unable to update users group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'forum_perms SET group_id = '.$temp_id.' WHERE group_id = '.$member_gid) or error('Unable to forum_perms group ID', __FILE__, __LINE__, $db->error()); + + // move whoever is in 4 to members place + $db->query('UPDATE '.$db->prefix.'groups SET g_id = '.$member_gid.' WHERE g_id = 4') or error('Unable to update group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = '.$member_gid.' WHERE group_id = 4') or error('Unable to update users group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'forum_perms SET group_id = '.$member_gid.' WHERE group_id = 4') or error('Unable to forum_perms group ID', __FILE__, __LINE__, $db->error()); + + // move members in temp place to 4 + $db->query('UPDATE '.$db->prefix.'groups SET g_id = 4 WHERE g_id = '.$temp_id) or error('Unable to update group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET group_id = 4 WHERE group_id = '.$temp_id) or error('Unable to update users group ID', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'forum_perms SET group_id = 4 WHERE group_id = '.$temp_id) or error('Unable to forum_perms group ID', __FILE__, __LINE__, $db->error()); + } + } - // Server timezone is now simply the default timezone + // Server time zone is now simply the default time zone if (!array_key_exists('o_default_timezone', $pun_config)) - $db->query('UPDATE '.$db->prefix.'config SET conf_name = \'o_default_timezone\' WHERE conf_name = \'o_server_timezone\'') or error('Unable to update timezone config', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'config SET conf_name = \'o_default_timezone\' WHERE conf_name = \'o_server_timezone\'') or error('Unable to update time zone config', __FILE__, __LINE__, $db->error()); // Increase visit timeout to 30 minutes (only if it hasn't been changed from the default) if (!array_key_exists('o_database_revision', $pun_config) && $pun_config['o_timeout_visit'] == '600') @@ -563,10 +644,10 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' break; } - // Add an index to logged on the online table + // Add an index to logged in the online table $db->add_index('online', 'logged_idx', array('logged')); - // Add an index on last_post in the topics table + // Add an index to last_post in the topics table $db->add_index('topics', 'last_post_idx', array('last_post')); // Add g_view_users field to groups table @@ -591,7 +672,7 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' $db->add_field('topics', 'first_post_id', 'INT(10) UNSIGNED', false, 0, 'posted'); $db->add_index('topics', 'first_post_id_idx', array('first_post_id')); - // Now that we've added the column and indexed it, we need to give it correct data\ + // Now that we've added the column and indexed it, we need to give it correct data $result = $db->query('SELECT MIN(id) AS first_post, topic_id FROM '.$db->prefix.'posts GROUP BY topic_id') or error('Unable to fetch first_post_id', __FILE__, __LINE__, $db->error()); while ($cur_post = $db->fetch_assoc($result)) @@ -607,12 +688,12 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' $db->add_field('bans', 'ban_creator', 'INT(10) UNSIGNED', false, 0); // Add the time/date format settings to the user table - $db->add_field('users', 'time_format', 'INT(10) UNSIGNED', false, 0, 'dst'); - $db->add_field('users', 'date_format', 'INT(10) UNSIGNED', false, 0, 'dst'); + $db->add_field('users', 'time_format', 'TINYINT(1)', false, 0, 'dst'); + $db->add_field('users', 'date_format', 'TINYINT(1)', false, 0, 'dst'); // Should we do charset conversion or not? if (strpos($cur_version, '1.2') === 0 && isset($_GET['convert_charset'])) - $query_str = '?stage=conv_misc&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; + $query_str = '?stage=conv_misc&req_old_charset='.$old_charset; else $query_str = '?stage=conv_tables'; break; @@ -709,7 +790,7 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' } } - $query_str = '?stage=conv_reports&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; + $query_str = '?stage=conv_reports&req_old_charset='.$old_charset; break; @@ -747,9 +828,9 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' $result = $db->query('SELECT id FROM '.$db->prefix.'reports WHERE id >= '.$end_at.' ORDER BY id LIMIT 1') or error('Unable to fetch next ID', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) - $query_str = '?stage=conv_reports&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE.'&start_at='.$db->result($result); + $query_str = '?stage=conv_reports&req_old_charset='.$old_charset.'&start_at='.$db->result($result); else - $query_str = '?stage=conv_search_words&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; + $query_str = '?stage=conv_search_words&req_old_charset='.$old_charset; break; @@ -788,9 +869,9 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' $result = $db->query('SELECT id FROM '.$db->prefix.'search_words WHERE id >= '.$end_at.' ORDER BY id LIMIT 1') or error('Unable to fetch next ID', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) - $query_str = '?stage=conv_search_words&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE.'&start_at='.$db->result($result); + $query_str = '?stage=conv_search_words&req_old_charset='.$old_charset.'&start_at='.$db->result($result); else - $query_str = '?stage=conv_users&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; + $query_str = '?stage=conv_users&req_old_charset='.$old_charset; break; @@ -830,9 +911,9 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' $result = $db->query('SELECT id FROM '.$db->prefix.'users WHERE id >= '.$end_at.' ORDER BY id LIMIT 1') or error('Unable to fetch next ID', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) - $query_str = '?stage=conv_users&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE.'&start_at='.$db->result($result); + $query_str = '?stage=conv_users&req_old_charset='.$old_charset.'&start_at='.$db->result($result); else - $query_str = '?stage=conv_topics&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; + $query_str = '?stage=conv_topics&req_old_charset='.$old_charset; break; @@ -871,9 +952,9 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' $result = $db->query('SELECT id FROM '.$db->prefix.'topics WHERE id >= '.$end_at.' ORDER BY id LIMIT 1') or error('Unable to fetch next ID', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) - $query_str = '?stage=conv_topics&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE.'&start_at='.$db->result($result); + $query_str = '?stage=conv_topics&req_old_charset='.$old_charset.'&start_at='.$db->result($result); else - $query_str = '?stage=conv_posts&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; + $query_str = '?stage=conv_posts&req_old_charset='.$old_charset; break; @@ -914,7 +995,7 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE id >= '.$end_at.' ORDER BY id LIMIT 1') or error('Unable to fetch next ID', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) - $query_str = '?stage=conv_posts&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE.'&start_at='.$db->result($result); + $query_str = '?stage=conv_posts&req_old_charset='.$old_charset.'&start_at='.$db->result($result); else $query_str = '?stage=conv_tables'; break; @@ -922,8 +1003,8 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' // Convert table columns to utf8 (MySQL only) case 'conv_tables': - // Do the cumbersome charset conversion of MySQL tables/columns - if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') + // Do the cumbersome charset conversion of MySQL tables/columns (if required - i.e. running 1.2) + if (strpos($cur_version, '1.2') === 0 && ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb')) { echo 'Converting table '.$db->prefix.'bans …
'."\n"; flush(); convert_table_utf8($db->prefix.'bans'); @@ -961,8 +1042,80 @@ if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force' convert_table_utf8($db->prefix.'users'); } - $query_str = '?stage=finish'; + $query_str = '?stage=preparse_posts'; + break; + + + // Preparse posts + case 'preparse_posts': + require PUN_ROOT.'include/parser.php'; + + // Now we're definitely using UTF-8, so we convert the output properly + $db->set_names('utf8'); + + // Determine where to start + if ($start_at == 0) + { + // Get the first post ID from the db + $result = $db->query('SELECT id FROM '.$db->prefix.'posts ORDER BY id LIMIT 1') or error('Unable to fetch first post ID', __FILE__, __LINE__, $db->error()); + + if ($db->num_rows($result)) + $start_at = $db->result($result); + } + $end_at = $start_at + PER_PAGE; + + // Fetch posts to process this cycle + $result = $db->query('SELECT id, message FROM '.$db->prefix.'posts WHERE id >= '.$start_at.' AND id < '.$end_at.' ORDER BY id') or error('Unable to fetch posts', __FILE__, __LINE__, $db->error()); + + $temp = array(); + while ($cur_item = $db->fetch_assoc($result)) + { + echo 'Preparsing post '.$cur_item['id'].' …
'."\n"; + $db->query('UPDATE '.$db->prefix.'posts SET message = \''.$db->escape(preparse_bbcode($cur_item['message'], $temp)).'\' WHERE id = '.$cur_item['id']) or error('Unable to update post', __FILE__, __LINE__, $db->error()); + } + + // Check if there is more work to do + $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE id >= '.$end_at.' ORDER BY id LIMIT 1') or error('Unable to fetch next ID', __FILE__, __LINE__, $db->error()); + + if ($db->num_rows($result)) + $query_str = '?stage=preparse_posts&start_at='.$db->result($result); + else + $query_str = '?stage=preparse_sigs'; + break; + + + // Preparse signatures + case 'preparse_sigs': + require PUN_ROOT.'include/parser.php'; + + // Now we're definitely using UTF-8, so we convert the output properly + $db->set_names('utf8'); + + // Determine where to start + if ($start_at == 0) + $start_at = 2; + + $end_at = $start_at + PER_PAGE; + + // Fetch users to process this cycle + $result = $db->query('SELECT id, signature FROM '.$db->prefix.'users WHERE id >= '.$start_at.' AND id < '.$end_at.' ORDER BY id') or error('Unable to fetch users', __FILE__, __LINE__, $db->error()); + + $temp = array(); + while ($cur_item = $db->fetch_assoc($result)) + { + echo 'Preparsing signature '.$cur_item['id'].' …
'."\n"; + $db->query('UPDATE '.$db->prefix.'users SET signature = \''.$db->escape(preparse_bbcode($cur_item['signature'], $temp, true)).'\' WHERE id = '.$cur_item['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error()); + } + + // Check if there is more work to do + $result = $db->query('SELECT id FROM '.$db->prefix.'users WHERE id >= '.$end_at.' ORDER BY id LIMIT 1') or error('Unable to fetch next ID', __FILE__, __LINE__, $db->error()); + + if ($db->num_rows($result)) + $query_str = '?stage=preparse_sigs&start_at='.$db->result($result); + else + $query_str = '?stage=finish'; break; + // Show results page case 'finish': diff --git a/upload/delete.php b/upload/delete.php index 36767d4..6c3cfe2 100644 --- a/upload/delete.php +++ b/upload/delete.php @@ -1,27 +1,12 @@
-
  •  » 
  •  » 
+
    +
  • +
  • » 
  • +
  • » 
  • +
@@ -104,17 +93,16 @@ $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smili
-
- -
-
-

:

- -
+

+

:

+

:

+
+
+
-
+
-

+

diff --git a/upload/edit.php b/upload/edit.php index 880aae4..308044e 100644 --- a/upload/edit.php +++ b/upload/edit.php @@ -1,27 +1,12 @@ 70) $errors[] = $lang_post['Too long subject']; - else if ($pun_config['p_subject_all_caps'] == '0' && strtoupper($subject) == $subject && !$pun_user['is_admmod']) - $subject = ucwords(strtolower($subject)); + else if ($pun_config['p_subject_all_caps'] == '0' && is_all_uppercase($subject) && !$pun_user['is_admmod']) + $errors[] = $lang_post['All caps subject']; } // Clean up message from POST @@ -87,11 +72,11 @@ if (isset($_POST['form_sent'])) $errors[] = $lang_post['No message']; else if (strlen($message) > 65535) $errors[] = $lang_post['Too long message']; - else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && !$pun_user['is_admmod']) - $message = ucwords(strtolower($message)); + else if ($pun_config['p_message_all_caps'] == '0' && is_all_uppercase($message) && !$pun_user['is_admmod']) + $errors[] = $lang_post['All caps message']; // Validate BBCode syntax - if ($pun_config['p_message_bbcode'] == '1' && strpos($message, '[') !== false && strpos($message, ']') !== false) + if ($pun_config['p_message_bbcode'] == '1') { require PUN_ROOT.'include/parser.php'; $message = preparse_bbcode($message, $errors); @@ -119,7 +104,7 @@ if (isset($_POST['form_sent'])) update_search_index('edit', $id, $message); // Update the post - $db->query('UPDATE '.$db->prefix.'posts SET message=\''.$db->escape($message).'\', hide_smilies=\''.$hide_smilies.'\''.$edited_sql.' WHERE id='.$id) or error('Unable to update post', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'posts SET message=\''.$db->escape($message).'\', hide_smilies='.$hide_smilies.$edited_sql.' WHERE id='.$id) or error('Unable to update post', __FILE__, __LINE__, $db->error()); redirect('viewtopic.php?pid='.$id.'#p'.$id, $lang_post['Edit redirect']); } @@ -137,7 +122,11 @@ $cur_index = 1; ?>
-
  •  » 
  •  » 
+
    +
  • +
  • » 
  • +
  • » 
  • +
@@ -177,9 +166,11 @@ else if (isset($_POST['preview']))

-
-
- +
+
+
+ +
@@ -250,7 +241,7 @@ if (!empty($checkboxes)) ?>
-

+

diff --git a/upload/extern.php b/upload/extern.php index 3543272..714b617 100644 --- a/upload/extern.php +++ b/upload/extern.php @@ -1,16 +1,14 @@ 's) - fid: One or more forum ID's (comma-separated). If ignored, + fid: One or more forum IDs (comma-separated). If ignored, topics from all readable forums will be pulled. - nfid: One or more forum ID's (comma-separated) that are to be + nfid: One or more forum IDs (comma-separated) that are to be excluded. E.g. the ID of a a test forum. tid: A topic ID from which to show posts. If a tid is supplied, @@ -56,8 +54,7 @@ posted - show topics ordered by when they were first posted, giving information about the original post. - -/***********************************************************************/ +-----------------------------------------------------------------------------*/ define('PUN_QUIET_VISIT', 1); @@ -67,7 +64,7 @@ require PUN_ROOT.'include/common.php'; // The length at which topic subjects will be truncated (for HTML output) if (!defined('FORUM_EXTERN_MAX_SUBJECT_LENGTH')) - define('FORUM_EXTERN_MAX_SUBJECT_LENGTH', 30); + define('FORUM_EXTERN_MAX_SUBJECT_LENGTH', 30); // If we're a guest and we've sent a username/pass, we can try to authenticate using those details if ($pun_user['is_guest'] && isset($_SERVER['PHP_AUTH_USER'])) @@ -267,6 +264,8 @@ function output_html($feed) // Show recent discussions if ($action == 'feed') { + require PUN_ROOT.'include/parser.php'; + // Determine what type of feed to output $type = isset($_GET['type']) && in_array($_GET['type'], array('html', 'rss', 'atom', 'xml')) ? $_GET['type'] : 'html'; @@ -302,11 +301,10 @@ if ($action == 'feed') ); // Fetch $show posts - $result = $db->query('SELECT p.id, p.poster, p.message, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id WHERE p.topic_id='.$tid.' ORDER BY p.posted DESC LIMIT '.$show) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); + $result = $db->query('SELECT p.id, p.poster, p.message, p.hide_smilies, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id WHERE p.topic_id='.$tid.' ORDER BY p.posted DESC LIMIT '.$show) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); while ($cur_post = $db->fetch_assoc($result)) { - if ($pun_config['o_censoring'] == '1') - $cur_post['message'] = censor_words($cur_post['message']); + $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); $item = array( 'id' => $cur_post['id'], @@ -340,8 +338,8 @@ if ($action == 'feed') $order_posted = isset($_GET['order']) && $_GET['order'] == 'posted'; $forum_name = ''; $forum_sql = ''; - - // Were any forum ID's supplied? + + // Were any forum IDs supplied? if (isset($_GET['fid']) && is_scalar($_GET['fid']) && $_GET['fid'] != '') { $fids = explode(',', pun_trim($_GET['fid'])); @@ -355,11 +353,11 @@ if ($action == 'feed') // Fetch forum name $result = $db->query('SELECT f.forum_name FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fids[0]) or error('Unable to fetch forum name', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) - $forum_name = $lang_common['Title separator'].$db->result($result); + $forum_name = ' '.$db->result($result); } } - // Any forum ID's to exclude? + // Any forum IDs to exclude? if (isset($_GET['nfid']) && is_scalar($_GET['nfid']) && $_GET['nfid'] != '') { $nfids = explode(',', pun_trim($_GET['nfid'])); @@ -373,26 +371,25 @@ if ($action == 'feed') $feed = array( 'title' => $pun_config['o_board_title'].$forum_name, 'link' => $pun_config['o_base_url'].'/index.php', - 'description' => sprintf($lang_common['RSS description'], $pun_config['o_board_title']), + 'description' => sprintf($lang_common['RSS description'], $pun_config['o_board_title']), 'items' => array(), 'type' => 'topics' ); // Fetch $show topics - $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_poster, p.message, u.email_setting, u.email, p.poster_id, p.poster_email FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON p.id='.($order_posted ? 't.first_post_id' : 't.last_post_id').' INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.($order_posted ? 't.posted' : 't.last_post').' DESC LIMIT '.$show) or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error()); + $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_poster, p.message, p.hide_smilies, u.email_setting, u.email, p.poster_id, p.poster_email FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON p.id='.($order_posted ? 't.first_post_id' : 't.last_post_id').' INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.($order_posted ? 't.posted' : 't.last_post').' DESC LIMIT '.$show) or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error()); while ($cur_topic = $db->fetch_assoc($result)) { + $cur_topic['message'] = parse_message($cur_topic['message'], $cur_topic['hide_smilies']); + if ($pun_config['o_censoring'] == '1') - { $cur_topic['subject'] = censor_words($cur_topic['subject']); - $cur_topic['message'] = censor_words($cur_topic['message']); - } $item = array( 'id' => $cur_topic['id'], 'title' => $cur_topic['subject'], 'link' => $pun_config['o_base_url'].($order_posted ? '/viewtopic.php?id='.$cur_topic['id'] : '/viewtopic.php?id='.$cur_topic['id'].'&action=new'), - 'description' => $cur_topic['message'], + 'description' => $cur_topic['message'], 'author' => array( 'name' => $order_posted ? $cur_topic['poster'] : $cur_topic['last_poster'] ), @@ -430,7 +427,7 @@ else if ($action == 'online' || $action == 'online_full') $users = array(); $result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error()); - + while ($pun_user_online = $db->fetch_assoc($result)) { if ($pun_user_online['user_id'] > 1) @@ -447,7 +444,7 @@ else if ($action == 'online' || $action == 'online_full') header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); - + echo $lang_index['Guests online'].': '.forum_number_format($num_guests).'
'."\n"; if ($action == 'online_full' && !empty($users)) @@ -473,7 +470,7 @@ else if ($action == 'stats') $result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error()); list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result); - + // Send the Content-type header in case the web server is setup to send something else header('Content-type: text/html; charset=utf-8'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -484,7 +481,7 @@ else if ($action == 'stats') echo $lang_index['Newest user'].': '.(($pun_user['g_view_users'] == '1') ? ''.pun_htmlspecialchars($stats['last_user']['username']).'' : pun_htmlspecialchars($stats['last_user']['username'])).'
'."\n"; echo $lang_index['No of topics'].': '.forum_number_format($stats['total_topics']).'
'."\n"; echo $lang_index['No of posts'].': '.forum_number_format($stats['total_posts']).'
'."\n"; - + exit; } diff --git a/upload/footer.php b/upload/footer.php index 4952ec1..4184d8d 100644 --- a/upload/footer.php +++ b/upload/footer.php @@ -1,27 +1,12 @@ '."\n\t\t\t\t".'
'.$lang_common['Search links'].'
'."\n\t\t\t\t".'
'.$lang_common['Show recent posts'].'
'."\n"; + echo "\t\t\t".' - +
Username
E-mail addressEmail address
Current character set: -
+
Accept default for English forums otherwise the character set of the primary langauge pack.
diff --git a/upload/include/parser.php b/upload/include/parser.php index 8ecac90..1659182 100644 --- a/upload/include/parser.php +++ b/upload/include/parser.php @@ -1,33 +1,19 @@ 'smile.png', '=)' => 'smile.png', @@ -59,8 +45,8 @@ function preparse_bbcode($text, &$errors, $is_signature = false) { global $lang_profile; - if (preg_match('%\[/?(?:quote|code|list)\b[^\]]*\]%i', $text)) - $errors[] = $lang_profile['Signature quote/code/list']; + if (preg_match('%\[/?(?:quote|code|list|h)\b[^\]]*\]%i', $text)) + $errors[] = $lang_profile['Signature quote/code/list/h']; } // If the message contains a code tag we have to split it up (text within [code][/code] shouldn't be touched) @@ -131,7 +117,7 @@ function preparse_tags($text, &$errors, $is_signature = false) $tags_opened = $tags; // and tags we need to check are closed (the same as above, added it just in case) $tags_closed = $tags; - // Tags we can nest and the depth they can be nested to (only quotes ) + // Tags we can nest and the depth they can be nested to (only quotes) $tags_nested = array('quote' => $pun_config['o_quote_depth'], 'list' => 5, '*' => 5); // Tags to ignore the contents of completely (just code) $tags_ignore = array('code'); @@ -173,7 +159,7 @@ function preparse_tags($text, &$errors, $is_signature = false) // Are we dealing with a tag? if (substr($current, 0, 1) != '[' || substr($current, -1, 1) != ']') { - // Its not a bbcode tag so we put it on the end and continue + // It's not a bbcode tag so we put it on the end and continue // If we are nested too deeply don't add to the end if ($current_nest) @@ -261,14 +247,14 @@ function preparse_tags($text, &$errors, $is_signature = false) // Is the tag defined? if (!in_array($current_tag, $tags)) { - // Its not a bbcode tag so we put it on the end and continue + // It's not a bbcode tag so we put it on the end and continue if (!$current_nest) $new_text .= $current; continue; } - // We definitely have a bbcode tag. + // We definitely have a bbcode tag // Make the tag string lower case if ($equalpos = strpos($current,'=')) @@ -277,7 +263,7 @@ function preparse_tags($text, &$errors, $is_signature = false) if (strlen(substr($current, $equalpos)) == 2) { // Empty tag argument - $errors[] = sprintf($lang_common['BBCode error 6'], $current_tag); + $errors[] = sprintf($lang_common['BBCode error empty attribute'], $current_tag); return false; } $current = strtolower(substr($current, 0, $equalpos)).substr($current, $equalpos); @@ -285,7 +271,7 @@ function preparse_tags($text, &$errors, $is_signature = false) else $current = strtolower($current); - //This is if we are currently in a tag which escapes other bbcode such as code + // This is if we are currently in a tag which escapes other bbcode such as code if ($current_ignore) { if ('[/'.$current_ignore.']' == $current) @@ -302,7 +288,7 @@ function preparse_tags($text, &$errors, $is_signature = false) if ($current_nest) { - // We are currently too deeply nested so lets see if we are closing the tag or not. + // We are currently too deeply nested so lets see if we are closing the tag or not if ($current_tag != $current_nest) continue; @@ -320,20 +306,20 @@ function preparse_tags($text, &$errors, $is_signature = false) // Check the current tag is allowed here if (!in_array($current_tag, $limit_bbcode) && $current_tag != $open_tags[$opened_tag]) { - $errors[] = sprintf($lang_common['BBCode error 3'], $current_tag, $open_tags[$opened_tag]); + $errors[] = sprintf($lang_common['BBCode error invalid nesting'], $current_tag, $open_tags[$opened_tag]); return false; } if (substr($current, 1, 1) == '/') { - //This is if we are closing a tag + // This is if we are closing a tag if ($opened_tag == 0 || !in_array($current_tag, $open_tags)) { - //We tried to close a tag which is not open + // We tried to close a tag which is not open if (in_array($current_tag, $tags_opened)) { - $errors[] = sprintf($lang_common['BBCode error 1'], $current_tag); + $errors[] = sprintf($lang_common['BBCode error no opening tag'], $current_tag); return false; } } @@ -367,7 +353,7 @@ function preparse_tags($text, &$errors, $is_signature = false) if (!in_array($temp_tag, $tags_fix)) { // We couldn't fix nesting - $errors[] = sprintf($lang_common['BBCode error 5'], array_pop($temp_opened)); + $errors[] = sprintf($lang_common['BBCode error no closing tag'], array_pop($temp_opened)); return false; } array_push($temp_opened, $temp_tag); @@ -401,7 +387,7 @@ function preparse_tags($text, &$errors, $is_signature = false) else { // We couldn't fix nesting - $errors[] = sprintf($lang_common['BBCode error 1'], $current_tag); + $errors[] = sprintf($lang_common['BBCode error no opening tag'], $current_tag); return false; } } @@ -442,13 +428,13 @@ function preparse_tags($text, &$errors, $is_signature = false) if (in_array($current_tag, $tags_block) && !in_array($open_tags[$opened_tag], $tags_block) && $opened_tag != 0) { // We tried to open a block tag within a non-block tag - $errors[] = sprintf($lang_common['BBCode error 3'], $current_tag, $open_tags[$opened_tag]); + $errors[] = sprintf($lang_common['BBCode error invalid nesting'], $current_tag, $open_tags[$opened_tag]); return false; } if (in_array($current_tag, $tags_ignore)) { - // Its an ignore tag so we don't need to worry about whats inside it, + // It's an ignore tag so we don't need to worry about what's inside it $current_ignore = $current_tag; $new_text .= $current; continue; @@ -458,7 +444,7 @@ function preparse_tags($text, &$errors, $is_signature = false) if (in_array($current_tag, $open_tags) && !in_array($current_tag, array_keys($tags_nested))) { // We nested a tag we shouldn't - $errors[] = sprintf($lang_common['BBCode error 4'], $current_tag); + $errors[] = sprintf($lang_common['BBCode error invalid self-nesting'], $current_tag); return false; } else if (in_array($current_tag, array_keys($tags_nested))) @@ -501,7 +487,7 @@ function preparse_tags($text, &$errors, $is_signature = false) if (in_array($check, $open_tags)) { // We left an important tag open - $errors[] = sprintf($lang_common['BBCode error 5'], $check); + $errors[] = sprintf($lang_common['BBCode error no closing tag'], $check); return false; } } @@ -509,7 +495,7 @@ function preparse_tags($text, &$errors, $is_signature = false) if ($current_ignore) { // We left an ignore tag open - $errors[] = sprintf($lang_common['BBCode error 5'], $current_ignore); + $errors[] = sprintf($lang_common['BBCode error no closing tag'], $current_ignore); return false; } @@ -587,12 +573,13 @@ function split_text($text, $start, $end, &$errors, $retab = true) // function handle_url_tag($url, $link = '', $bbcode = false) { + $url = pun_trim($url); $full_url = str_replace(array(' ', '\'', '`', '"'), array('%20', '', '', ''), $url); - if (strpos($url, 'www.') === 0) // If it starts with www, we add http:// + if (strpos($url, 'www.') === 0) // If it starts with www, we add http:// $full_url = 'http://'.$full_url; - else if (strpos($url, 'ftp.') === 0) // Else if it starts with ftp, we add ftp:// + else if (strpos($url, 'ftp.') === 0) // Else if it starts with ftp, we add ftp:// $full_url = 'ftp://'.$full_url; - else if (!preg_match('#^([a-z0-9]{3,6})://#', $url)) // Else if it doesn't start with abcdef://, we add http:// + else if (!preg_match('#^([a-z0-9]{3,6})://#', $url)) // Else if it doesn't start with abcdef://, we add http:// $full_url = 'http://'.$full_url; // Ok, not very pretty :-) @@ -647,7 +634,7 @@ function handle_list_tag($content, $type = '*') $content = preg_replace($pattern, $replace, $content); } - $content = preg_replace('#\s*\[\*\](.*?)\[/\*\]\s*#s', '
  • $1
  • ', pun_trim($content)); + $content = preg_replace('#\s*\[\*\](.*?)\[/\*\]\s*#s', '
  • $1

  • ', pun_trim($content)); if ($type == '*') $content = '
      '.$content.'
    '; @@ -745,14 +732,14 @@ function do_clickable($text) // function do_smilies($text) { - global $pun_config, $base_url, $smilies; + global $pun_config, $smilies; $text = ' '.$text.' '; foreach ($smilies as $smiley_text => $smiley_img) { if (strpos($text, $smiley_text) !== false) - $text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", ''.substr($smiley_img, 0, strrpos($smiley_img, '.')).'', $text); + $text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", ''.substr($smiley_img, 0, strrpos($smiley_img, '.')).'', $text); } return substr($text, 1, -1); @@ -802,7 +789,11 @@ function parse_message($text, $hide_smilies) { $text .= $outside[$i]; if (isset($inside[$i])) - $text .= '

    '.pun_trim($inside[$i], "\n\r").'

    '; + // $text .= '

    '.pun_trim($inside[$i], "\n\r").'

    '; + { + $num_lines = (substr_count($inside[$i], "\n")); + $text .= '

    28) ? ' class="vscroll"' : '').'>'.pun_trim($inside[$i], "\n\r").'

    '; + } } } diff --git a/upload/include/search_idx.php b/upload/include/search_idx.php index 1a9a24f..2f787b1 100644 --- a/upload/include/search_idx.php +++ b/upload/include/search_idx.php @@ -1,30 +1,15 @@ - + diff --git a/upload/include/template/main.tpl b/upload/include/template/main.tpl index 33f25c9..e964f4d 100644 --- a/upload/include/template/main.tpl +++ b/upload/include/template/main.tpl @@ -1,6 +1,6 @@ - + diff --git a/upload/include/template/maintenance.tpl b/upload/include/template/maintenance.tpl index 6224b93..ce59c42 100644 --- a/upload/include/template/maintenance.tpl +++ b/upload/include/template/maintenance.tpl @@ -1,6 +1,6 @@ - + diff --git a/upload/include/template/redirect.tpl b/upload/include/template/redirect.tpl index 85b8380..418c00b 100644 --- a/upload/include/template/redirect.tpl +++ b/upload/include/template/redirect.tpl @@ -1,6 +1,6 @@ - + diff --git a/upload/include/utf8/mbstring/core.php b/upload/include/utf8/mbstring/core.php index 3541ee0..2063f88 100644 --- a/upload/include/utf8/mbstring/core.php +++ b/upload/include/utf8/mbstring/core.php @@ -1,4 +1,5 @@ 1 ) { - return utf8_strlen($ar[0]); - } - return FALSE; - - } else { - - if ( !is_int($offset) ) { - trigger_error('utf8_strpos: Offset must be an integer',E_USER_ERROR); - return FALSE; - } - - $str = utf8_substr($str, $offset); - - if ( FALSE !== ( $pos = utf8_strpos($str, $needle) ) ) { - return $pos + $offset; - } - - return FALSE; - } - +function utf8_strpos($str, $needle, $offset = null) +{ + if (is_null($offset)) + { + $ar = explode($needle, $str, 2); + + if (count($ar) > 1) + return utf8_strlen($ar[0]); + + return false; + } + else + { + if (!is_int($offset)) + { + trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR); + return false; + } + + $str = utf8_substr($str, $offset); + + if (false !== ($pos = utf8_strpos($str, $needle))) + return $pos + $offset; + + return false; + } } -//-------------------------------------------------------------------- /** * UTF-8 aware alternative to strrpos * Find position of last occurrence of a char in a string @@ -95,39 +92,39 @@ function utf8_strpos($str, $needle, $offset = NULL) { * @package utf8 * @subpackage strings */ -function utf8_strrpos($str, $needle, $offset = NULL) { - - if ( is_null($offset) ) { - - $ar = explode($needle, $str); - - if ( count($ar) > 1 ) { - // Pop off the end of the string where the last match was made - array_pop($ar); - $str = join($needle,$ar); - return utf8_strlen($str); - } - return FALSE; - - } else { - - if ( !is_int($offset) ) { - trigger_error('utf8_strrpos expects parameter 3 to be long',E_USER_WARNING); - return FALSE; - } - - $str = utf8_substr($str, $offset); - - if ( FALSE !== ( $pos = utf8_strrpos($str, $needle) ) ) { - return $pos + $offset; - } - - return FALSE; - } - +function utf8_strrpos($str, $needle, $offset = null) +{ + if (is_null($offset)) + { + $ar = explode($needle, $str); + + if (count($ar) > 1) + { + // Pop off the end of the string where the last match was made + array_pop($ar); + $str = join($needle,$ar); + return utf8_strlen($str); + } + + return false; + } + else + { + if (!is_int($offset)) + { + trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_WARNING); + return false; + } + + $str = utf8_substr($str, $offset); + + if (false !== ($pos = utf8_strrpos($str, $needle))) + return $pos + $offset; + + return false; + } } -//-------------------------------------------------------------------- /** * UTF-8 aware alternative to substr * Return part of a string given character offset (and optionally length) @@ -157,111 +154,96 @@ function utf8_strrpos($str, $needle, $offset = NULL) { * @package utf8 * @subpackage strings */ -function utf8_substr($str, $offset, $length = NULL) { - - // generates E_NOTICE - // for PHP4 objects, but not PHP5 objects - $str = (string)$str; - $offset = (int)$offset; - if (!is_null($length)) $length = (int)$length; - - // handle trivial cases - if ($length === 0) return ''; - if ($offset < 0 && $length < 0 && $length < $offset) - return ''; - - // normalise negative offsets (we could use a tail - // anchored pattern, but they are horribly slow!) - if ($offset < 0) { - - // see notes - $strlen = strlen(utf8_decode($str)); - $offset = $strlen + $offset; - if ($offset < 0) $offset = 0; - - } - - $Op = ''; - $Lp = ''; - - // establish a pattern for offset, a - // non-captured group equal in length to offset - if ($offset > 0) { - - $Ox = (int)($offset/65535); - $Oy = $offset%65535; - - if ($Ox) { - $Op = '(?:.{65535}){'.$Ox.'}'; - } - - $Op = '^(?:'.$Op.'.{'.$Oy.'})'; - - } else { - - // offset == 0; just anchor the pattern - $Op = '^'; - - } - - // establish a pattern for length - if (is_null($length)) { - - // the rest of the string - $Lp = '(.*)$'; - - } else { - - if (!isset($strlen)) { - // see notes - $strlen = strlen(utf8_decode($str)); - } - - // another trivial case - if ($offset > $strlen) return ''; - - if ($length > 0) { - - // reduce any length that would - // go passed the end of the string - $length = min($strlen-$offset, $length); - - $Lx = (int)( $length / 65535 ); - $Ly = $length % 65535; - - // negative length requires a captured group - // of length characters - if ($Lx) $Lp = '(?:.{65535}){'.$Lx.'}'; - $Lp = '('.$Lp.'.{'.$Ly.'})'; - - } else if ($length < 0) { - - if ( $length < ($offset - $strlen) ) { - return ''; - } - - $Lx = (int)((-$length)/65535); - $Ly = (-$length)%65535; - - // negative length requires ... capture everything - // except a group of -length characters - // anchored at the tail-end of the string - if ($Lx) $Lp = '(?:.{65535}){'.$Lx.'}'; - $Lp = '(.*)(?:'.$Lp.'.{'.$Ly.'})$'; - - } - - } - - if (!preg_match( '#'.$Op.$Lp.'#us',$str, $match )) { - return ''; - } - - return $match[1]; - +function utf8_substr($str, $offset, $length = null) +{ + // Generates E_NOTICE for PHP4 objects, but not PHP5 objects + $str = (string) $str; + $offset = (int) $offset; + if (!is_null($length)) $length = (int) $length; + + // Handle trivial cases + if ($length === 0) return ''; + if ($offset < 0 && $length < 0 && $length < $offset) + return ''; + + // Normalise negative offsets (we could use a tail + // anchored pattern, but they are horribly slow!) + if ($offset < 0) + { + // See notes + $strlen = strlen(utf8_decode($str)); + $offset = $strlen + $offset; + if ($offset < 0) $offset = 0; + } + + $Op = ''; + $Lp = ''; + + // Establish a pattern for offset, a + // non-captured group equal in length to offset + if ($offset > 0) + { + $Ox = (int) ($offset / 65535); + $Oy = $offset % 65535; + + if ($Ox) + $Op = '(?:.{65535}){'.$Ox.'}'; + + $Op = '^(?:'.$Op.'.{'.$Oy.'})'; + } + else + $Op = '^'; + + + // Establish a pattern for length + if (is_null($length)) + { + // The rest of the string + $Lp = '(.*)$'; + } + else + { + // See notes + if (!isset($strlen)) + $strlen = strlen(utf8_decode($str)); + + // Another trivial case + if ($offset > $strlen) return ''; + + if ($length > 0) + { + // Reduce any length that would go passed the end of the string + $length = min($strlen-$offset, $length); + + $Lx = (int)( $length / 65535 ); + $Ly = $length % 65535; + + // Negative length requires a captured group of length characters + if ($Lx) $Lp = '(?:.{65535}){'.$Lx.'}'; + $Lp = '('.$Lp.'.{'.$Ly.'})'; + } + else if ($length < 0) + { + + if ($length < ($offset - $strlen)) + return ''; + + $Lx = (int)((-$length)/65535); + $Ly = (-$length)%65535; + + // Negative length requires ... capture everything except a group of + // -length characters anchored at the tail-end of the string + if ($Lx) $Lp = '(?:.{65535}){'.$Lx.'}'; + $Lp = '(.*)(?:'.$Lp.'.{'.$Ly.'})$'; + } + } + + if (!preg_match( '#'.$Op.$Lp.'#us',$str, $match )) + return ''; + + return $match[1]; } -//--------------------------------------------------------------- /** * UTF-8 aware alternative to strtolower * Make a string lowercase @@ -281,75 +263,72 @@ function utf8_substr($str, $offset, $length = NULL) { * @package utf8 * @subpackage strings */ -function utf8_strtolower($string){ - - static $UTF8_UPPER_TO_LOWER = NULL; - - if ( is_null($UTF8_UPPER_TO_LOWER) ) { - $UTF8_UPPER_TO_LOWER = array( - 0x0041=>0x0061, 0x03A6=>0x03C6, 0x0162=>0x0163, 0x00C5=>0x00E5, 0x0042=>0x0062, - 0x0139=>0x013A, 0x00C1=>0x00E1, 0x0141=>0x0142, 0x038E=>0x03CD, 0x0100=>0x0101, - 0x0490=>0x0491, 0x0394=>0x03B4, 0x015A=>0x015B, 0x0044=>0x0064, 0x0393=>0x03B3, - 0x00D4=>0x00F4, 0x042A=>0x044A, 0x0419=>0x0439, 0x0112=>0x0113, 0x041C=>0x043C, - 0x015E=>0x015F, 0x0143=>0x0144, 0x00CE=>0x00EE, 0x040E=>0x045E, 0x042F=>0x044F, - 0x039A=>0x03BA, 0x0154=>0x0155, 0x0049=>0x0069, 0x0053=>0x0073, 0x1E1E=>0x1E1F, - 0x0134=>0x0135, 0x0427=>0x0447, 0x03A0=>0x03C0, 0x0418=>0x0438, 0x00D3=>0x00F3, - 0x0420=>0x0440, 0x0404=>0x0454, 0x0415=>0x0435, 0x0429=>0x0449, 0x014A=>0x014B, - 0x0411=>0x0431, 0x0409=>0x0459, 0x1E02=>0x1E03, 0x00D6=>0x00F6, 0x00D9=>0x00F9, - 0x004E=>0x006E, 0x0401=>0x0451, 0x03A4=>0x03C4, 0x0423=>0x0443, 0x015C=>0x015D, - 0x0403=>0x0453, 0x03A8=>0x03C8, 0x0158=>0x0159, 0x0047=>0x0067, 0x00C4=>0x00E4, - 0x0386=>0x03AC, 0x0389=>0x03AE, 0x0166=>0x0167, 0x039E=>0x03BE, 0x0164=>0x0165, - 0x0116=>0x0117, 0x0108=>0x0109, 0x0056=>0x0076, 0x00DE=>0x00FE, 0x0156=>0x0157, - 0x00DA=>0x00FA, 0x1E60=>0x1E61, 0x1E82=>0x1E83, 0x00C2=>0x00E2, 0x0118=>0x0119, - 0x0145=>0x0146, 0x0050=>0x0070, 0x0150=>0x0151, 0x042E=>0x044E, 0x0128=>0x0129, - 0x03A7=>0x03C7, 0x013D=>0x013E, 0x0422=>0x0442, 0x005A=>0x007A, 0x0428=>0x0448, - 0x03A1=>0x03C1, 0x1E80=>0x1E81, 0x016C=>0x016D, 0x00D5=>0x00F5, 0x0055=>0x0075, - 0x0176=>0x0177, 0x00DC=>0x00FC, 0x1E56=>0x1E57, 0x03A3=>0x03C3, 0x041A=>0x043A, - 0x004D=>0x006D, 0x016A=>0x016B, 0x0170=>0x0171, 0x0424=>0x0444, 0x00CC=>0x00EC, - 0x0168=>0x0169, 0x039F=>0x03BF, 0x004B=>0x006B, 0x00D2=>0x00F2, 0x00C0=>0x00E0, - 0x0414=>0x0434, 0x03A9=>0x03C9, 0x1E6A=>0x1E6B, 0x00C3=>0x00E3, 0x042D=>0x044D, - 0x0416=>0x0436, 0x01A0=>0x01A1, 0x010C=>0x010D, 0x011C=>0x011D, 0x00D0=>0x00F0, - 0x013B=>0x013C, 0x040F=>0x045F, 0x040A=>0x045A, 0x00C8=>0x00E8, 0x03A5=>0x03C5, - 0x0046=>0x0066, 0x00DD=>0x00FD, 0x0043=>0x0063, 0x021A=>0x021B, 0x00CA=>0x00EA, - 0x0399=>0x03B9, 0x0179=>0x017A, 0x00CF=>0x00EF, 0x01AF=>0x01B0, 0x0045=>0x0065, - 0x039B=>0x03BB, 0x0398=>0x03B8, 0x039C=>0x03BC, 0x040C=>0x045C, 0x041F=>0x043F, - 0x042C=>0x044C, 0x00DE=>0x00FE, 0x00D0=>0x00F0, 0x1EF2=>0x1EF3, 0x0048=>0x0068, - 0x00CB=>0x00EB, 0x0110=>0x0111, 0x0413=>0x0433, 0x012E=>0x012F, 0x00C6=>0x00E6, - 0x0058=>0x0078, 0x0160=>0x0161, 0x016E=>0x016F, 0x0391=>0x03B1, 0x0407=>0x0457, - 0x0172=>0x0173, 0x0178=>0x00FF, 0x004F=>0x006F, 0x041B=>0x043B, 0x0395=>0x03B5, - 0x0425=>0x0445, 0x0120=>0x0121, 0x017D=>0x017E, 0x017B=>0x017C, 0x0396=>0x03B6, - 0x0392=>0x03B2, 0x0388=>0x03AD, 0x1E84=>0x1E85, 0x0174=>0x0175, 0x0051=>0x0071, - 0x0417=>0x0437, 0x1E0A=>0x1E0B, 0x0147=>0x0148, 0x0104=>0x0105, 0x0408=>0x0458, - 0x014C=>0x014D, 0x00CD=>0x00ED, 0x0059=>0x0079, 0x010A=>0x010B, 0x038F=>0x03CE, - 0x0052=>0x0072, 0x0410=>0x0430, 0x0405=>0x0455, 0x0402=>0x0452, 0x0126=>0x0127, - 0x0136=>0x0137, 0x012A=>0x012B, 0x038A=>0x03AF, 0x042B=>0x044B, 0x004C=>0x006C, - 0x0397=>0x03B7, 0x0124=>0x0125, 0x0218=>0x0219, 0x00DB=>0x00FB, 0x011E=>0x011F, - 0x041E=>0x043E, 0x1E40=>0x1E41, 0x039D=>0x03BD, 0x0106=>0x0107, 0x03AB=>0x03CB, - 0x0426=>0x0446, 0x00DE=>0x00FE, 0x00C7=>0x00E7, 0x03AA=>0x03CA, 0x0421=>0x0441, - 0x0412=>0x0432, 0x010E=>0x010F, 0x00D8=>0x00F8, 0x0057=>0x0077, 0x011A=>0x011B, - 0x0054=>0x0074, 0x004A=>0x006A, 0x040B=>0x045B, 0x0406=>0x0456, 0x0102=>0x0103, - 0x039B=>0x03BB, 0x00D1=>0x00F1, 0x041D=>0x043D, 0x038C=>0x03CC, 0x00C9=>0x00E9, - 0x00D0=>0x00F0, 0x0407=>0x0457, 0x0122=>0x0123, - ); - } - - $uni = utf8_to_unicode($string); - - if ( !$uni ) { - return FALSE; - } - - $cnt = count($uni); - for ($i=0; $i < $cnt; $i++){ - if ( isset($UTF8_UPPER_TO_LOWER[$uni[$i]]) ) { - $uni[$i] = $UTF8_UPPER_TO_LOWER[$uni[$i]]; - } - } - - return utf8_from_unicode($uni); +function utf8_strtolower($string) +{ + static $UTF8_UPPER_TO_LOWER = null; + + if (is_null($UTF8_UPPER_TO_LOWER)) + { + $UTF8_UPPER_TO_LOWER = array( + 0x0041=>0x0061, 0x03A6=>0x03C6, 0x0162=>0x0163, 0x00C5=>0x00E5, 0x0042=>0x0062, + 0x0139=>0x013A, 0x00C1=>0x00E1, 0x0141=>0x0142, 0x038E=>0x03CD, 0x0100=>0x0101, + 0x0490=>0x0491, 0x0394=>0x03B4, 0x015A=>0x015B, 0x0044=>0x0064, 0x0393=>0x03B3, + 0x00D4=>0x00F4, 0x042A=>0x044A, 0x0419=>0x0439, 0x0112=>0x0113, 0x041C=>0x043C, + 0x015E=>0x015F, 0x0143=>0x0144, 0x00CE=>0x00EE, 0x040E=>0x045E, 0x042F=>0x044F, + 0x039A=>0x03BA, 0x0154=>0x0155, 0x0049=>0x0069, 0x0053=>0x0073, 0x1E1E=>0x1E1F, + 0x0134=>0x0135, 0x0427=>0x0447, 0x03A0=>0x03C0, 0x0418=>0x0438, 0x00D3=>0x00F3, + 0x0420=>0x0440, 0x0404=>0x0454, 0x0415=>0x0435, 0x0429=>0x0449, 0x014A=>0x014B, + 0x0411=>0x0431, 0x0409=>0x0459, 0x1E02=>0x1E03, 0x00D6=>0x00F6, 0x00D9=>0x00F9, + 0x004E=>0x006E, 0x0401=>0x0451, 0x03A4=>0x03C4, 0x0423=>0x0443, 0x015C=>0x015D, + 0x0403=>0x0453, 0x03A8=>0x03C8, 0x0158=>0x0159, 0x0047=>0x0067, 0x00C4=>0x00E4, + 0x0386=>0x03AC, 0x0389=>0x03AE, 0x0166=>0x0167, 0x039E=>0x03BE, 0x0164=>0x0165, + 0x0116=>0x0117, 0x0108=>0x0109, 0x0056=>0x0076, 0x00DE=>0x00FE, 0x0156=>0x0157, + 0x00DA=>0x00FA, 0x1E60=>0x1E61, 0x1E82=>0x1E83, 0x00C2=>0x00E2, 0x0118=>0x0119, + 0x0145=>0x0146, 0x0050=>0x0070, 0x0150=>0x0151, 0x042E=>0x044E, 0x0128=>0x0129, + 0x03A7=>0x03C7, 0x013D=>0x013E, 0x0422=>0x0442, 0x005A=>0x007A, 0x0428=>0x0448, + 0x03A1=>0x03C1, 0x1E80=>0x1E81, 0x016C=>0x016D, 0x00D5=>0x00F5, 0x0055=>0x0075, + 0x0176=>0x0177, 0x00DC=>0x00FC, 0x1E56=>0x1E57, 0x03A3=>0x03C3, 0x041A=>0x043A, + 0x004D=>0x006D, 0x016A=>0x016B, 0x0170=>0x0171, 0x0424=>0x0444, 0x00CC=>0x00EC, + 0x0168=>0x0169, 0x039F=>0x03BF, 0x004B=>0x006B, 0x00D2=>0x00F2, 0x00C0=>0x00E0, + 0x0414=>0x0434, 0x03A9=>0x03C9, 0x1E6A=>0x1E6B, 0x00C3=>0x00E3, 0x042D=>0x044D, + 0x0416=>0x0436, 0x01A0=>0x01A1, 0x010C=>0x010D, 0x011C=>0x011D, 0x00D0=>0x00F0, + 0x013B=>0x013C, 0x040F=>0x045F, 0x040A=>0x045A, 0x00C8=>0x00E8, 0x03A5=>0x03C5, + 0x0046=>0x0066, 0x00DD=>0x00FD, 0x0043=>0x0063, 0x021A=>0x021B, 0x00CA=>0x00EA, + 0x0399=>0x03B9, 0x0179=>0x017A, 0x00CF=>0x00EF, 0x01AF=>0x01B0, 0x0045=>0x0065, + 0x039B=>0x03BB, 0x0398=>0x03B8, 0x039C=>0x03BC, 0x040C=>0x045C, 0x041F=>0x043F, + 0x042C=>0x044C, 0x00DE=>0x00FE, 0x00D0=>0x00F0, 0x1EF2=>0x1EF3, 0x0048=>0x0068, + 0x00CB=>0x00EB, 0x0110=>0x0111, 0x0413=>0x0433, 0x012E=>0x012F, 0x00C6=>0x00E6, + 0x0058=>0x0078, 0x0160=>0x0161, 0x016E=>0x016F, 0x0391=>0x03B1, 0x0407=>0x0457, + 0x0172=>0x0173, 0x0178=>0x00FF, 0x004F=>0x006F, 0x041B=>0x043B, 0x0395=>0x03B5, + 0x0425=>0x0445, 0x0120=>0x0121, 0x017D=>0x017E, 0x017B=>0x017C, 0x0396=>0x03B6, + 0x0392=>0x03B2, 0x0388=>0x03AD, 0x1E84=>0x1E85, 0x0174=>0x0175, 0x0051=>0x0071, + 0x0417=>0x0437, 0x1E0A=>0x1E0B, 0x0147=>0x0148, 0x0104=>0x0105, 0x0408=>0x0458, + 0x014C=>0x014D, 0x00CD=>0x00ED, 0x0059=>0x0079, 0x010A=>0x010B, 0x038F=>0x03CE, + 0x0052=>0x0072, 0x0410=>0x0430, 0x0405=>0x0455, 0x0402=>0x0452, 0x0126=>0x0127, + 0x0136=>0x0137, 0x012A=>0x012B, 0x038A=>0x03AF, 0x042B=>0x044B, 0x004C=>0x006C, + 0x0397=>0x03B7, 0x0124=>0x0125, 0x0218=>0x0219, 0x00DB=>0x00FB, 0x011E=>0x011F, + 0x041E=>0x043E, 0x1E40=>0x1E41, 0x039D=>0x03BD, 0x0106=>0x0107, 0x03AB=>0x03CB, + 0x0426=>0x0446, 0x00DE=>0x00FE, 0x00C7=>0x00E7, 0x03AA=>0x03CA, 0x0421=>0x0441, + 0x0412=>0x0432, 0x010E=>0x010F, 0x00D8=>0x00F8, 0x0057=>0x0077, 0x011A=>0x011B, + 0x0054=>0x0074, 0x004A=>0x006A, 0x040B=>0x045B, 0x0406=>0x0456, 0x0102=>0x0103, + 0x039B=>0x03BB, 0x00D1=>0x00F1, 0x041D=>0x043D, 0x038C=>0x03CC, 0x00C9=>0x00E9, + 0x00D0=>0x00F0, 0x0407=>0x0457, 0x0122=>0x0123); + } + + $uni = utf8_to_unicode($string); + + if (!$uni) + return false; + + $cnt = count($uni); + + for ($i=0; $i < $cnt; $i++) + if (isset($UTF8_UPPER_TO_LOWER[$uni[$i]])) + $uni[$i] = $UTF8_UPPER_TO_LOWER[$uni[$i]]; + + return utf8_from_unicode($uni); } -//--------------------------------------------------------------- /** * UTF-8 aware alternative to strtoupper * Make a string uppercase @@ -369,70 +348,68 @@ function utf8_strtolower($string){ * @package utf8 * @subpackage strings */ -function utf8_strtoupper($string){ - - static $UTF8_LOWER_TO_UPPER = NULL; - - if ( is_null($UTF8_LOWER_TO_UPPER) ) { - $UTF8_LOWER_TO_UPPER = array( - 0x0061=>0x0041, 0x03C6=>0x03A6, 0x0163=>0x0162, 0x00E5=>0x00C5, 0x0062=>0x0042, - 0x013A=>0x0139, 0x00E1=>0x00C1, 0x0142=>0x0141, 0x03CD=>0x038E, 0x0101=>0x0100, - 0x0491=>0x0490, 0x03B4=>0x0394, 0x015B=>0x015A, 0x0064=>0x0044, 0x03B3=>0x0393, - 0x00F4=>0x00D4, 0x044A=>0x042A, 0x0439=>0x0419, 0x0113=>0x0112, 0x043C=>0x041C, - 0x015F=>0x015E, 0x0144=>0x0143, 0x00EE=>0x00CE, 0x045E=>0x040E, 0x044F=>0x042F, - 0x03BA=>0x039A, 0x0155=>0x0154, 0x0069=>0x0049, 0x0073=>0x0053, 0x1E1F=>0x1E1E, - 0x0135=>0x0134, 0x0447=>0x0427, 0x03C0=>0x03A0, 0x0438=>0x0418, 0x00F3=>0x00D3, - 0x0440=>0x0420, 0x0454=>0x0404, 0x0435=>0x0415, 0x0449=>0x0429, 0x014B=>0x014A, - 0x0431=>0x0411, 0x0459=>0x0409, 0x1E03=>0x1E02, 0x00F6=>0x00D6, 0x00F9=>0x00D9, - 0x006E=>0x004E, 0x0451=>0x0401, 0x03C4=>0x03A4, 0x0443=>0x0423, 0x015D=>0x015C, - 0x0453=>0x0403, 0x03C8=>0x03A8, 0x0159=>0x0158, 0x0067=>0x0047, 0x00E4=>0x00C4, - 0x03AC=>0x0386, 0x03AE=>0x0389, 0x0167=>0x0166, 0x03BE=>0x039E, 0x0165=>0x0164, - 0x0117=>0x0116, 0x0109=>0x0108, 0x0076=>0x0056, 0x00FE=>0x00DE, 0x0157=>0x0156, - 0x00FA=>0x00DA, 0x1E61=>0x1E60, 0x1E83=>0x1E82, 0x00E2=>0x00C2, 0x0119=>0x0118, - 0x0146=>0x0145, 0x0070=>0x0050, 0x0151=>0x0150, 0x044E=>0x042E, 0x0129=>0x0128, - 0x03C7=>0x03A7, 0x013E=>0x013D, 0x0442=>0x0422, 0x007A=>0x005A, 0x0448=>0x0428, - 0x03C1=>0x03A1, 0x1E81=>0x1E80, 0x016D=>0x016C, 0x00F5=>0x00D5, 0x0075=>0x0055, - 0x0177=>0x0176, 0x00FC=>0x00DC, 0x1E57=>0x1E56, 0x03C3=>0x03A3, 0x043A=>0x041A, - 0x006D=>0x004D, 0x016B=>0x016A, 0x0171=>0x0170, 0x0444=>0x0424, 0x00EC=>0x00CC, - 0x0169=>0x0168, 0x03BF=>0x039F, 0x006B=>0x004B, 0x00F2=>0x00D2, 0x00E0=>0x00C0, - 0x0434=>0x0414, 0x03C9=>0x03A9, 0x1E6B=>0x1E6A, 0x00E3=>0x00C3, 0x044D=>0x042D, - 0x0436=>0x0416, 0x01A1=>0x01A0, 0x010D=>0x010C, 0x011D=>0x011C, 0x00F0=>0x00D0, - 0x013C=>0x013B, 0x045F=>0x040F, 0x045A=>0x040A, 0x00E8=>0x00C8, 0x03C5=>0x03A5, - 0x0066=>0x0046, 0x00FD=>0x00DD, 0x0063=>0x0043, 0x021B=>0x021A, 0x00EA=>0x00CA, - 0x03B9=>0x0399, 0x017A=>0x0179, 0x00EF=>0x00CF, 0x01B0=>0x01AF, 0x0065=>0x0045, - 0x03BB=>0x039B, 0x03B8=>0x0398, 0x03BC=>0x039C, 0x045C=>0x040C, 0x043F=>0x041F, - 0x044C=>0x042C, 0x00FE=>0x00DE, 0x00F0=>0x00D0, 0x1EF3=>0x1EF2, 0x0068=>0x0048, - 0x00EB=>0x00CB, 0x0111=>0x0110, 0x0433=>0x0413, 0x012F=>0x012E, 0x00E6=>0x00C6, - 0x0078=>0x0058, 0x0161=>0x0160, 0x016F=>0x016E, 0x03B1=>0x0391, 0x0457=>0x0407, - 0x0173=>0x0172, 0x00FF=>0x0178, 0x006F=>0x004F, 0x043B=>0x041B, 0x03B5=>0x0395, - 0x0445=>0x0425, 0x0121=>0x0120, 0x017E=>0x017D, 0x017C=>0x017B, 0x03B6=>0x0396, - 0x03B2=>0x0392, 0x03AD=>0x0388, 0x1E85=>0x1E84, 0x0175=>0x0174, 0x0071=>0x0051, - 0x0437=>0x0417, 0x1E0B=>0x1E0A, 0x0148=>0x0147, 0x0105=>0x0104, 0x0458=>0x0408, - 0x014D=>0x014C, 0x00ED=>0x00CD, 0x0079=>0x0059, 0x010B=>0x010A, 0x03CE=>0x038F, - 0x0072=>0x0052, 0x0430=>0x0410, 0x0455=>0x0405, 0x0452=>0x0402, 0x0127=>0x0126, - 0x0137=>0x0136, 0x012B=>0x012A, 0x03AF=>0x038A, 0x044B=>0x042B, 0x006C=>0x004C, - 0x03B7=>0x0397, 0x0125=>0x0124, 0x0219=>0x0218, 0x00FB=>0x00DB, 0x011F=>0x011E, - 0x043E=>0x041E, 0x1E41=>0x1E40, 0x03BD=>0x039D, 0x0107=>0x0106, 0x03CB=>0x03AB, - 0x0446=>0x0426, 0x00FE=>0x00DE, 0x00E7=>0x00C7, 0x03CA=>0x03AA, 0x0441=>0x0421, - 0x0432=>0x0412, 0x010F=>0x010E, 0x00F8=>0x00D8, 0x0077=>0x0057, 0x011B=>0x011A, - 0x0074=>0x0054, 0x006A=>0x004A, 0x045B=>0x040B, 0x0456=>0x0406, 0x0103=>0x0102, - 0x03BB=>0x039B, 0x00F1=>0x00D1, 0x043D=>0x041D, 0x03CC=>0x038C, 0x00E9=>0x00C9, - 0x00F0=>0x00D0, 0x0457=>0x0407, 0x0123=>0x0122, - ); - } - - $uni = utf8_to_unicode($string); - - if ( !$uni ) { - return FALSE; - } - - $cnt = count($uni); - for ($i=0; $i < $cnt; $i++){ - if( isset($UTF8_LOWER_TO_UPPER[$uni[$i]]) ) { - $uni[$i] = $UTF8_LOWER_TO_UPPER[$uni[$i]]; - } - } - - return utf8_from_unicode($uni); +function utf8_strtoupper($string) +{ + static $UTF8_LOWER_TO_UPPER = NULL; + + if (is_null($UTF8_LOWER_TO_UPPER)) + { + $UTF8_LOWER_TO_UPPER = array( + 0x0061=>0x0041, 0x03C6=>0x03A6, 0x0163=>0x0162, 0x00E5=>0x00C5, 0x0062=>0x0042, + 0x013A=>0x0139, 0x00E1=>0x00C1, 0x0142=>0x0141, 0x03CD=>0x038E, 0x0101=>0x0100, + 0x0491=>0x0490, 0x03B4=>0x0394, 0x015B=>0x015A, 0x0064=>0x0044, 0x03B3=>0x0393, + 0x00F4=>0x00D4, 0x044A=>0x042A, 0x0439=>0x0419, 0x0113=>0x0112, 0x043C=>0x041C, + 0x015F=>0x015E, 0x0144=>0x0143, 0x00EE=>0x00CE, 0x045E=>0x040E, 0x044F=>0x042F, + 0x03BA=>0x039A, 0x0155=>0x0154, 0x0069=>0x0049, 0x0073=>0x0053, 0x1E1F=>0x1E1E, + 0x0135=>0x0134, 0x0447=>0x0427, 0x03C0=>0x03A0, 0x0438=>0x0418, 0x00F3=>0x00D3, + 0x0440=>0x0420, 0x0454=>0x0404, 0x0435=>0x0415, 0x0449=>0x0429, 0x014B=>0x014A, + 0x0431=>0x0411, 0x0459=>0x0409, 0x1E03=>0x1E02, 0x00F6=>0x00D6, 0x00F9=>0x00D9, + 0x006E=>0x004E, 0x0451=>0x0401, 0x03C4=>0x03A4, 0x0443=>0x0423, 0x015D=>0x015C, + 0x0453=>0x0403, 0x03C8=>0x03A8, 0x0159=>0x0158, 0x0067=>0x0047, 0x00E4=>0x00C4, + 0x03AC=>0x0386, 0x03AE=>0x0389, 0x0167=>0x0166, 0x03BE=>0x039E, 0x0165=>0x0164, + 0x0117=>0x0116, 0x0109=>0x0108, 0x0076=>0x0056, 0x00FE=>0x00DE, 0x0157=>0x0156, + 0x00FA=>0x00DA, 0x1E61=>0x1E60, 0x1E83=>0x1E82, 0x00E2=>0x00C2, 0x0119=>0x0118, + 0x0146=>0x0145, 0x0070=>0x0050, 0x0151=>0x0150, 0x044E=>0x042E, 0x0129=>0x0128, + 0x03C7=>0x03A7, 0x013E=>0x013D, 0x0442=>0x0422, 0x007A=>0x005A, 0x0448=>0x0428, + 0x03C1=>0x03A1, 0x1E81=>0x1E80, 0x016D=>0x016C, 0x00F5=>0x00D5, 0x0075=>0x0055, + 0x0177=>0x0176, 0x00FC=>0x00DC, 0x1E57=>0x1E56, 0x03C3=>0x03A3, 0x043A=>0x041A, + 0x006D=>0x004D, 0x016B=>0x016A, 0x0171=>0x0170, 0x0444=>0x0424, 0x00EC=>0x00CC, + 0x0169=>0x0168, 0x03BF=>0x039F, 0x006B=>0x004B, 0x00F2=>0x00D2, 0x00E0=>0x00C0, + 0x0434=>0x0414, 0x03C9=>0x03A9, 0x1E6B=>0x1E6A, 0x00E3=>0x00C3, 0x044D=>0x042D, + 0x0436=>0x0416, 0x01A1=>0x01A0, 0x010D=>0x010C, 0x011D=>0x011C, 0x00F0=>0x00D0, + 0x013C=>0x013B, 0x045F=>0x040F, 0x045A=>0x040A, 0x00E8=>0x00C8, 0x03C5=>0x03A5, + 0x0066=>0x0046, 0x00FD=>0x00DD, 0x0063=>0x0043, 0x021B=>0x021A, 0x00EA=>0x00CA, + 0x03B9=>0x0399, 0x017A=>0x0179, 0x00EF=>0x00CF, 0x01B0=>0x01AF, 0x0065=>0x0045, + 0x03BB=>0x039B, 0x03B8=>0x0398, 0x03BC=>0x039C, 0x045C=>0x040C, 0x043F=>0x041F, + 0x044C=>0x042C, 0x00FE=>0x00DE, 0x00F0=>0x00D0, 0x1EF3=>0x1EF2, 0x0068=>0x0048, + 0x00EB=>0x00CB, 0x0111=>0x0110, 0x0433=>0x0413, 0x012F=>0x012E, 0x00E6=>0x00C6, + 0x0078=>0x0058, 0x0161=>0x0160, 0x016F=>0x016E, 0x03B1=>0x0391, 0x0457=>0x0407, + 0x0173=>0x0172, 0x00FF=>0x0178, 0x006F=>0x004F, 0x043B=>0x041B, 0x03B5=>0x0395, + 0x0445=>0x0425, 0x0121=>0x0120, 0x017E=>0x017D, 0x017C=>0x017B, 0x03B6=>0x0396, + 0x03B2=>0x0392, 0x03AD=>0x0388, 0x1E85=>0x1E84, 0x0175=>0x0174, 0x0071=>0x0051, + 0x0437=>0x0417, 0x1E0B=>0x1E0A, 0x0148=>0x0147, 0x0105=>0x0104, 0x0458=>0x0408, + 0x014D=>0x014C, 0x00ED=>0x00CD, 0x0079=>0x0059, 0x010B=>0x010A, 0x03CE=>0x038F, + 0x0072=>0x0052, 0x0430=>0x0410, 0x0455=>0x0405, 0x0452=>0x0402, 0x0127=>0x0126, + 0x0137=>0x0136, 0x012B=>0x012A, 0x03AF=>0x038A, 0x044B=>0x042B, 0x006C=>0x004C, + 0x03B7=>0x0397, 0x0125=>0x0124, 0x0219=>0x0218, 0x00FB=>0x00DB, 0x011F=>0x011E, + 0x043E=>0x041E, 0x1E41=>0x1E40, 0x03BD=>0x039D, 0x0107=>0x0106, 0x03CB=>0x03AB, + 0x0446=>0x0426, 0x00FE=>0x00DE, 0x00E7=>0x00C7, 0x03CA=>0x03AA, 0x0441=>0x0421, + 0x0432=>0x0412, 0x010F=>0x010E, 0x00F8=>0x00D8, 0x0077=>0x0057, 0x011B=>0x011A, + 0x0074=>0x0054, 0x006A=>0x004A, 0x045B=>0x040B, 0x0456=>0x0406, 0x0103=>0x0102, + 0x03BB=>0x039B, 0x00F1=>0x00D1, 0x043D=>0x041D, 0x03CC=>0x038C, 0x00E9=>0x00C9, + 0x00F0=>0x00D0, 0x0457=>0x0407, 0x0123=>0x0122); + } + + $uni = utf8_to_unicode($string); + + if (!$uni) + return false; + + $cnt = count($uni); + + for ($i=0; $i < $cnt; $i++) + if(isset($UTF8_LOWER_TO_UPPER[$uni[$i]])) + $uni[$i] = $UTF8_LOWER_TO_UPPER[$uni[$i]]; + + return utf8_from_unicode($uni); } diff --git a/upload/include/utf8/ord.php b/upload/include/utf8/ord.php index 79f13dc..0b2a069 100644 --- a/upload/include/utf8/ord.php +++ b/upload/include/utf8/ord.php @@ -1,11 +1,11 @@ = 0 && $ord0 <= 127 ) { - return $ord0; - } - - if ( !isset($chr{1}) ) { - trigger_error('Short sequence - at least 2 bytes expected, only 1 seen'); - return FALSE; - } - - $ord1 = ord($chr{1}); - if ( $ord0 >= 192 && $ord0 <= 223 ) { - return ( $ord0 - 192 ) * 64 - + ( $ord1 - 128 ); - } - - if ( !isset($chr{2}) ) { - trigger_error('Short sequence - at least 3 bytes expected, only 2 seen'); - return FALSE; - } - $ord2 = ord($chr{2}); - if ( $ord0 >= 224 && $ord0 <= 239 ) { - return ($ord0-224)*4096 - + ($ord1-128)*64 - + ($ord2-128); - } - - if ( !isset($chr{3}) ) { - trigger_error('Short sequence - at least 4 bytes expected, only 3 seen'); - return FALSE; - } - $ord3 = ord($chr{3}); - if ($ord0>=240 && $ord0<=247) { - return ($ord0-240)*262144 - + ($ord1-128)*4096 - + ($ord2-128)*64 - + ($ord3-128); - - } - - if ( !isset($chr{4}) ) { - trigger_error('Short sequence - at least 5 bytes expected, only 4 seen'); - return FALSE; - } - $ord4 = ord($chr{4}); - if ($ord0>=248 && $ord0<=251) { - return ($ord0-248)*16777216 - + ($ord1-128)*262144 - + ($ord2-128)*4096 - + ($ord3-128)*64 - + ($ord4-128); - } - - if ( !isset($chr{5}) ) { - trigger_error('Short sequence - at least 6 bytes expected, only 5 seen'); - return FALSE; - } - if ($ord0>=252 && $ord0<=253) { - return ($ord0-252) * 1073741824 - + ($ord1-128)*16777216 - + ($ord2-128)*262144 - + ($ord3-128)*4096 - + ($ord4-128)*64 - + (ord($c{5})-128); - } - - if ( $ord0 >= 254 && $ord0 <= 255 ) { - trigger_error('Invalid UTF-8 with surrogate ordinal '.$ord0); - return FALSE; - } - -} +function utf8_ord($chr) +{ + $ord0 = ord($chr); + + if ($ord0 >= 0 && $ord0 <= 127) + return $ord0; + + if (!isset($chr[1])) + { + trigger_error('Short sequence - at least 2 bytes expected, only 1 seen'); + return false; + } + + $ord1 = ord($chr[1]); + if ($ord0 >= 192 && $ord0 <= 223) + return ($ord0 - 192) * 64 + ($ord1 - 128); + + if (!isset($chr[2])) + { + trigger_error('Short sequence - at least 3 bytes expected, only 2 seen'); + return false; + } + + $ord2 = ord($chr[2]); + if ($ord0 >= 224 && $ord0 <= 239) + return ($ord0-224)*4096 + ($ord1-128)*64 + ($ord2-128); + if (!isset($chr[3])) + { + trigger_error('Short sequence - at least 4 bytes expected, only 3 seen'); + return false; + } + + $ord3 = ord($chr[3]); + if ($ord0>=240 && $ord0<=247) + return ($ord0-240)*262144 + ($ord1-128)*4096 + ($ord2-128)*64 + ($ord3-128); + + if (!isset($chr[4])) + { + trigger_error('Short sequence - at least 5 bytes expected, only 4 seen'); + return false; + } + + $ord4 = ord($chr[4]); + if ($ord0 >= 248 && $ord0 <= 251) + return ($ord0-248)*16777216 + ($ord1-128)*262144 + ($ord2-128)*4096 + ($ord3-128)*64 + ($ord4-128); + + if (!isset($chr[5])) + { + trigger_error('Short sequence - at least 6 bytes expected, only 5 seen'); + return false; + } + + if ($ord0 >= 252 && $ord0 <= 253) + return ($ord0-252) * 1073741824 + ($ord1-128)*16777216 + ($ord2-128)*262144 + ($ord3-128)*4096 + ($ord4-128)*64 + (ord($c{5})-128); + + if ($ord0 >= 254 && $ord0 <= 255) + { + trigger_error('Invalid UTF-8 with surrogate ordinal '.$ord0); + return false; + } +} diff --git a/upload/include/utf8/str_ireplace.php b/upload/include/utf8/str_ireplace.php index 4e4bae4..7257b0a 100644 --- a/upload/include/utf8/str_ireplace.php +++ b/upload/include/utf8/str_ireplace.php @@ -1,11 +1,11 @@ -* +* * @param string * @return boolean TRUE if it's all ASCII * @package utf8 * @subpackage ascii * @see utf8_is_ascii_ctrl */ -function utf8_is_ascii($str) { - // Search for any bytes which are outside the ASCII range... - return (preg_match('/(?:[^\x00-\x7F])/',$str) !== 1); +function utf8_is_ascii($str) +{ + // Search for any bytes which are outside the ASCII range... + return (preg_match('/(?:[^\x00-\x7F])/', $str) !== 1); } -//-------------------------------------------------------------------- /** * Tests whether a string contains only 7bit ASCII bytes with device * control codes omitted. The device control codes can be found on the * second table here: http://www.w3schools.com/tags/ref_ascii.asp -* +* * @param string * @return boolean TRUE if it's all ASCII without device control codes * @package utf8 * @subpackage ascii * @see utf8_is_ascii */ -function utf8_is_ascii_ctrl($str) { - if ( strlen($str) > 0 ) { - // Search for any bytes which are outside the ASCII range, - // or are device control codes - return (preg_match('/[^\x09\x0A\x0D\x20-\x7E]/',$str) !== 1); - } - return FALSE; +function utf8_is_ascii_ctrl($str) +{ + // Search for any bytes which are outside the ASCII range, or are device control codes + if (strlen($str) > 0) + return (preg_match('/[^\x09\x0A\x0D\x20-\x7E]/', $str) !== 1); + + return false; } -//-------------------------------------------------------------------- /** * Strip out all non-7bit ASCII bytes * If you need to transmit a string to system which you know can only @@ -65,22 +64,24 @@ function utf8_is_ascii_ctrl($str) { * @subpackage ascii * @see utf8_strip_non_ascii_ctrl */ -function utf8_strip_non_ascii($str) { - ob_start(); - while ( preg_match( - '/^([\x00-\x7F]+)|([^\x00-\x7F]+)/S', - $str, $matches) ) { - if ( !isset($matches[2]) ) { - echo $matches[0]; - } - $str = substr($str, strlen($matches[0])); - } - $result = ob_get_contents(); - ob_end_clean(); - return $result; +function utf8_strip_non_ascii($str) +{ + ob_start(); + + while (preg_match('/^([\x00-\x7F]+)|([^\x00-\x7F]+)/S', $str, $matches)) + { + if (!isset($matches[2])) + echo $matches[0]; + + $str = substr($str, strlen($matches[0])); + } + + $result = ob_get_contents(); + ob_end_clean(); + + return $result; } -//-------------------------------------------------------------------- /** * Strip out device control codes in the ASCII range * which are not permitted in XML. Note that this leaves @@ -90,48 +91,52 @@ function utf8_strip_non_ascii($str) { * @param string * @return string control codes removed */ -function utf8_strip_ascii_ctrl($str) { - ob_start(); - while ( preg_match( - '/^([^\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+)|([\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+)/S', - $str, $matches) ) { - if ( !isset($matches[2]) ) { - echo $matches[0]; - } - $str = substr($str, strlen($matches[0])); - } - $result = ob_get_contents(); - ob_end_clean(); - return $result; +function utf8_strip_ascii_ctrl($str) +{ + ob_start(); + + while (preg_match('/^([^\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+)|([\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+)/S', $str, $matches)) + { + if (!isset($matches[2])) + echo $matches[0]; + + $str = substr($str, strlen($matches[0])); + } + + $result = ob_get_contents(); + ob_end_clean(); + + return $result; } -//-------------------------------------------------------------------- /** * Strip out all non 7bit ASCII bytes and ASCII device control codes. * For a list of ASCII device control codes see the 2nd table here: * http://www.w3schools.com/tags/ref_ascii.asp -* +* * @param string * @return boolean TRUE if it's all ASCII * @package utf8 * @subpackage ascii */ -function utf8_strip_non_ascii_ctrl($str) { - ob_start(); - while ( preg_match( - '/^([\x09\x0A\x0D\x20-\x7E]+)|([^\x09\x0A\x0D\x20-\x7E]+)/S', - $str, $matches) ) { - if ( !isset($matches[2]) ) { - echo $matches[0]; - } - $str = substr($str, strlen($matches[0])); - } - $result = ob_get_contents(); - ob_end_clean(); - return $result; +function utf8_strip_non_ascii_ctrl($str) +{ + ob_start(); + + while (preg_match( '/^([\x09\x0A\x0D\x20-\x7E]+)|([^\x09\x0A\x0D\x20-\x7E]+)/S', $str, $matches)) + { + if (!isset($matches[2])) + echo $matches[0]; + + $str = substr($str, strlen($matches[0])); + } + + $result = ob_get_contents(); + ob_end_clean(); + + return $result; } -//--------------------------------------------------------------- /** * Replace accented UTF-8 characters by unaccented ASCII-7 "equivalents". * The purpose of this function is to replace characters commonly found in Latin @@ -154,67 +159,63 @@ function utf8_strip_non_ascii_ctrl($str) { * @package utf8 * @subpackage ascii */ -function utf8_accents_to_ascii( $str, $case=0 ){ - - static $UTF8_LOWER_ACCENTS = NULL; - static $UTF8_UPPER_ACCENTS = NULL; - - if($case <= 0){ - - if ( is_null($UTF8_LOWER_ACCENTS) ) { - $UTF8_LOWER_ACCENTS = array( - 'à' => 'a', 'ô' => 'o', 'ď' => 'd', 'ḟ' => 'f', 'ë' => 'e', 'š' => 's', 'ơ' => 'o', - 'ß' => 'ss', 'ă' => 'a', 'ř' => 'r', 'ț' => 't', 'ň' => 'n', 'ā' => 'a', 'ķ' => 'k', - 'ŝ' => 's', 'ỳ' => 'y', 'ņ' => 'n', 'ĺ' => 'l', 'ħ' => 'h', 'ṗ' => 'p', 'ó' => 'o', - 'ú' => 'u', 'ě' => 'e', 'é' => 'e', 'ç' => 'c', 'ẁ' => 'w', 'ċ' => 'c', 'õ' => 'o', - 'ṡ' => 's', 'ø' => 'o', 'ģ' => 'g', 'ŧ' => 't', 'ș' => 's', 'ė' => 'e', 'ĉ' => 'c', - 'ś' => 's', 'î' => 'i', 'ű' => 'u', 'ć' => 'c', 'ę' => 'e', 'ŵ' => 'w', 'ṫ' => 't', - 'ū' => 'u', 'č' => 'c', 'ö' => 'oe', 'è' => 'e', 'ŷ' => 'y', 'ą' => 'a', 'ł' => 'l', - 'ų' => 'u', 'ů' => 'u', 'ş' => 's', 'ğ' => 'g', 'ļ' => 'l', 'ƒ' => 'f', 'ž' => 'z', - 'ẃ' => 'w', 'ḃ' => 'b', 'å' => 'a', 'ì' => 'i', 'ï' => 'i', 'ḋ' => 'd', 'ť' => 't', - 'ŗ' => 'r', 'ä' => 'ae', 'í' => 'i', 'ŕ' => 'r', 'ê' => 'e', 'ü' => 'ue', 'ò' => 'o', - 'ē' => 'e', 'ñ' => 'n', 'ń' => 'n', 'ĥ' => 'h', 'ĝ' => 'g', 'đ' => 'd', 'ĵ' => 'j', - 'ÿ' => 'y', 'ũ' => 'u', 'ŭ' => 'u', 'ư' => 'u', 'ţ' => 't', 'ý' => 'y', 'ő' => 'o', - 'â' => 'a', 'ľ' => 'l', 'ẅ' => 'w', 'ż' => 'z', 'ī' => 'i', 'ã' => 'a', 'ġ' => 'g', - 'ṁ' => 'm', 'ō' => 'o', 'ĩ' => 'i', 'ù' => 'u', 'į' => 'i', 'ź' => 'z', 'á' => 'a', - 'û' => 'u', 'þ' => 'th', 'ð' => 'dh', 'æ' => 'ae', 'µ' => 'u', 'ĕ' => 'e', - ); - } - - $str = str_replace( - array_keys($UTF8_LOWER_ACCENTS), - array_values($UTF8_LOWER_ACCENTS), - $str - ); - } - - if($case >= 0){ - if ( is_null($UTF8_UPPER_ACCENTS) ) { - $UTF8_UPPER_ACCENTS = array( - 'À' => 'A', 'Ô' => 'O', 'Ď' => 'D', 'Ḟ' => 'F', 'Ë' => 'E', 'Š' => 'S', 'Ơ' => 'O', - 'Ă' => 'A', 'Ř' => 'R', 'Ț' => 'T', 'Ň' => 'N', 'Ā' => 'A', 'Ķ' => 'K', - 'Ŝ' => 'S', 'Ỳ' => 'Y', 'Ņ' => 'N', 'Ĺ' => 'L', 'Ħ' => 'H', 'Ṗ' => 'P', 'Ó' => 'O', - 'Ú' => 'U', 'Ě' => 'E', 'É' => 'E', 'Ç' => 'C', 'Ẁ' => 'W', 'Ċ' => 'C', 'Õ' => 'O', - 'Ṡ' => 'S', 'Ø' => 'O', 'Ģ' => 'G', 'Ŧ' => 'T', 'Ș' => 'S', 'Ė' => 'E', 'Ĉ' => 'C', - 'Ś' => 'S', 'Î' => 'I', 'Ű' => 'U', 'Ć' => 'C', 'Ę' => 'E', 'Ŵ' => 'W', 'Ṫ' => 'T', - 'Ū' => 'U', 'Č' => 'C', 'Ö' => 'Oe', 'È' => 'E', 'Ŷ' => 'Y', 'Ą' => 'A', 'Ł' => 'L', - 'Ų' => 'U', 'Ů' => 'U', 'Ş' => 'S', 'Ğ' => 'G', 'Ļ' => 'L', 'Ƒ' => 'F', 'Ž' => 'Z', - 'Ẃ' => 'W', 'Ḃ' => 'B', 'Å' => 'A', 'Ì' => 'I', 'Ï' => 'I', 'Ḋ' => 'D', 'Ť' => 'T', - 'Ŗ' => 'R', 'Ä' => 'Ae', 'Í' => 'I', 'Ŕ' => 'R', 'Ê' => 'E', 'Ü' => 'Ue', 'Ò' => 'O', - 'Ē' => 'E', 'Ñ' => 'N', 'Ń' => 'N', 'Ĥ' => 'H', 'Ĝ' => 'G', 'Đ' => 'D', 'Ĵ' => 'J', - 'Ÿ' => 'Y', 'Ũ' => 'U', 'Ŭ' => 'U', 'Ư' => 'U', 'Ţ' => 'T', 'Ý' => 'Y', 'Ő' => 'O', - 'Â' => 'A', 'Ľ' => 'L', 'Ẅ' => 'W', 'Ż' => 'Z', 'Ī' => 'I', 'Ã' => 'A', 'Ġ' => 'G', - 'Ṁ' => 'M', 'Ō' => 'O', 'Ĩ' => 'I', 'Ù' => 'U', 'Į' => 'I', 'Ź' => 'Z', 'Á' => 'A', - 'Û' => 'U', 'Þ' => 'Th', 'Ð' => 'Dh', 'Æ' => 'Ae', 'Ĕ' => 'E', - ); - } - $str = str_replace( - array_keys($UTF8_UPPER_ACCENTS), - array_values($UTF8_UPPER_ACCENTS), - $str - ); - } - - return $str; - +function utf8_accents_to_ascii($str, $case=0) +{ + static $UTF8_LOWER_ACCENTS = null; + static $UTF8_UPPER_ACCENTS = null; + + if($case <= 0) + { + + if (is_null($UTF8_LOWER_ACCENTS)) + { + $UTF8_LOWER_ACCENTS = array( + 'à' => 'a', 'ô' => 'o', 'ď' => 'd', 'ḟ' => 'f', 'ë' => 'e', 'š' => 's', 'ơ' => 'o', + 'ß' => 'ss', 'ă' => 'a', 'ř' => 'r', 'ț' => 't', 'ň' => 'n', 'ā' => 'a', 'ķ' => 'k', + 'ŝ' => 's', 'ỳ' => 'y', 'ņ' => 'n', 'ĺ' => 'l', 'ħ' => 'h', 'ṗ' => 'p', 'ó' => 'o', + 'ú' => 'u', 'ě' => 'e', 'é' => 'e', 'ç' => 'c', 'ẁ' => 'w', 'ċ' => 'c', 'õ' => 'o', + 'ṡ' => 's', 'ø' => 'o', 'ģ' => 'g', 'ŧ' => 't', 'ș' => 's', 'ė' => 'e', 'ĉ' => 'c', + 'ś' => 's', 'î' => 'i', 'ű' => 'u', 'ć' => 'c', 'ę' => 'e', 'ŵ' => 'w', 'ṫ' => 't', + 'ū' => 'u', 'č' => 'c', 'ö' => 'oe', 'è' => 'e', 'ŷ' => 'y', 'ą' => 'a', 'ł' => 'l', + 'ų' => 'u', 'ů' => 'u', 'ş' => 's', 'ğ' => 'g', 'ļ' => 'l', 'ƒ' => 'f', 'ž' => 'z', + 'ẃ' => 'w', 'ḃ' => 'b', 'å' => 'a', 'ì' => 'i', 'ï' => 'i', 'ḋ' => 'd', 'ť' => 't', + 'ŗ' => 'r', 'ä' => 'ae', 'í' => 'i', 'ŕ' => 'r', 'ê' => 'e', 'ü' => 'ue', 'ò' => 'o', + 'ē' => 'e', 'ñ' => 'n', 'ń' => 'n', 'ĥ' => 'h', 'ĝ' => 'g', 'đ' => 'd', 'ĵ' => 'j', + 'ÿ' => 'y', 'ũ' => 'u', 'ŭ' => 'u', 'ư' => 'u', 'ţ' => 't', 'ý' => 'y', 'ő' => 'o', + 'â' => 'a', 'ľ' => 'l', 'ẅ' => 'w', 'ż' => 'z', 'ī' => 'i', 'ã' => 'a', 'ġ' => 'g', + 'ṁ' => 'm', 'ō' => 'o', 'ĩ' => 'i', 'ù' => 'u', 'į' => 'i', 'ź' => 'z', 'á' => 'a', + 'û' => 'u', 'þ' => 'th', 'ð' => 'dh', 'æ' => 'ae', 'µ' => 'u', 'ĕ' => 'e', + ); + } + + $str = str_replace(array_keys($UTF8_LOWER_ACCENTS), array_values($UTF8_LOWER_ACCENTS), $str); + } + + if($case >= 0) + { + if (is_null($UTF8_UPPER_ACCENTS)) + { + $UTF8_UPPER_ACCENTS = array( + 'À' => 'A', 'Ô' => 'O', 'Ď' => 'D', 'Ḟ' => 'F', 'Ë' => 'E', 'Š' => 'S', 'Ơ' => 'O', + 'Ă' => 'A', 'Ř' => 'R', 'Ț' => 'T', 'Ň' => 'N', 'Ā' => 'A', 'Ķ' => 'K', + 'Ŝ' => 'S', 'Ỳ' => 'Y', 'Ņ' => 'N', 'Ĺ' => 'L', 'Ħ' => 'H', 'Ṗ' => 'P', 'Ó' => 'O', + 'Ú' => 'U', 'Ě' => 'E', 'É' => 'E', 'Ç' => 'C', 'Ẁ' => 'W', 'Ċ' => 'C', 'Õ' => 'O', + 'Ṡ' => 'S', 'Ø' => 'O', 'Ģ' => 'G', 'Ŧ' => 'T', 'Ș' => 'S', 'Ė' => 'E', 'Ĉ' => 'C', + 'Ś' => 'S', 'Î' => 'I', 'Ű' => 'U', 'Ć' => 'C', 'Ę' => 'E', 'Ŵ' => 'W', 'Ṫ' => 'T', + 'Ū' => 'U', 'Č' => 'C', 'Ö' => 'Oe', 'È' => 'E', 'Ŷ' => 'Y', 'Ą' => 'A', 'Ł' => 'L', + 'Ų' => 'U', 'Ů' => 'U', 'Ş' => 'S', 'Ğ' => 'G', 'Ļ' => 'L', 'Ƒ' => 'F', 'Ž' => 'Z', + 'Ẃ' => 'W', 'Ḃ' => 'B', 'Å' => 'A', 'Ì' => 'I', 'Ï' => 'I', 'Ḋ' => 'D', 'Ť' => 'T', + 'Ŗ' => 'R', 'Ä' => 'Ae', 'Í' => 'I', 'Ŕ' => 'R', 'Ê' => 'E', 'Ü' => 'Ue', 'Ò' => 'O', + 'Ē' => 'E', 'Ñ' => 'N', 'Ń' => 'N', 'Ĥ' => 'H', 'Ĝ' => 'G', 'Đ' => 'D', 'Ĵ' => 'J', + 'Ÿ' => 'Y', 'Ũ' => 'U', 'Ŭ' => 'U', 'Ư' => 'U', 'Ţ' => 'T', 'Ý' => 'Y', 'Ő' => 'O', + 'Â' => 'A', 'Ľ' => 'L', 'Ẅ' => 'W', 'Ż' => 'Z', 'Ī' => 'I', 'Ã' => 'A', 'Ġ' => 'G', + 'Ṁ' => 'M', 'Ō' => 'O', 'Ĩ' => 'I', 'Ù' => 'U', 'Į' => 'I', 'Ź' => 'Z', 'Á' => 'A', + 'Û' => 'U', 'Þ' => 'Th', 'Ð' => 'Dh', 'Æ' => 'Ae', 'Ĕ' => 'E', + ); + } + + $str = str_replace(array_keys($UTF8_UPPER_ACCENTS), array_values($UTF8_UPPER_ACCENTS), $str); + } + + return $str; } diff --git a/upload/include/utf8/utils/bad.php b/upload/include/utf8/utils/bad.php index 52f1aee..c461251 100644 --- a/upload/include/utf8/utils/bad.php +++ b/upload/include/utf8/utils/bad.php @@ -1,4 +1,5 @@ 0 ) { - return $badList; - } - return FALSE; +function utf8_bad_findall($str) +{ + $UTF8_BAD = + '([\x00-\x7F]'. # ASCII (including control chars) + '|[\xC2-\xDF][\x80-\xBF]'. # Non-overlong 2-byte + '|\xE0[\xA0-\xBF][\x80-\xBF]'. # Excluding overlongs + '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'. # Straight 3-byte + '|\xED[\x80-\x9F][\x80-\xBF]'. # Excluding surrogates + '|\xF0[\x90-\xBF][\x80-\xBF]{2}'. # Planes 1-3 + '|[\xF1-\xF3][\x80-\xBF]{3}'. # Planes 4-15 + '|\xF4[\x80-\x8F][\x80-\xBF]{2}'. # Plane 16 + '|(.{1}))'; # Invalid byte + $pos = 0; + $badList = array(); + + while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) + { + $bytes = strlen($matches[0]); + + if (isset($matches[2])) + $badList[] = $pos; + + $pos += $bytes; + $str = substr($str,$bytes); + } + + if (count($badList) > 0) + return $badList; + + return false; } -//-------------------------------------------------------------------- /** * Strips out any bad bytes from a UTF-8 string and returns the rest * PCRE Pattern to locate bad bytes in a UTF-8 string @@ -106,30 +114,35 @@ function utf8_bad_findall($str) { * @package utf8 * @subpackage bad */ -function utf8_bad_strip($str) { - $UTF8_BAD = - '([\x00-\x7F]'. # ASCII (including control chars) - '|[\xC2-\xDF][\x80-\xBF]'. # non-overlong 2-byte - '|\xE0[\xA0-\xBF][\x80-\xBF]'. # excluding overlongs - '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'. # straight 3-byte - '|\xED[\x80-\x9F][\x80-\xBF]'. # excluding surrogates - '|\xF0[\x90-\xBF][\x80-\xBF]{2}'. # planes 1-3 - '|[\xF1-\xF3][\x80-\xBF]{3}'. # planes 4-15 - '|\xF4[\x80-\x8F][\x80-\xBF]{2}'. # plane 16 - '|(.{1}))'; # invalid byte - ob_start(); - while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) { - if ( !isset($matches[2])) { - echo $matches[0]; - } - $str = substr($str,strlen($matches[0])); - } - $result = ob_get_contents(); - ob_end_clean(); - return $result; +function utf8_bad_strip($str) +{ + $UTF8_BAD = + '([\x00-\x7F]'. # ASCII (including control chars) + '|[\xC2-\xDF][\x80-\xBF]'. # Non-overlong 2-byte + '|\xE0[\xA0-\xBF][\x80-\xBF]'. # Excluding overlongs + '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'. # Straight 3-byte + '|\xED[\x80-\x9F][\x80-\xBF]'. # Excluding surrogates + '|\xF0[\x90-\xBF][\x80-\xBF]{2}'. # Planes 1-3 + '|[\xF1-\xF3][\x80-\xBF]{3}'. # Planes 4-15 + '|\xF4[\x80-\x8F][\x80-\xBF]{2}'. # Plane 16 + '|(.{1}))'; # Invalid byte + + ob_start(); + + while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) + { + if (!isset($matches[2])) + echo $matches[0]; + + $str = substr($str, strlen($matches[0])); + } + + $result = ob_get_contents(); + ob_end_clean(); + + return $result; } -//-------------------------------------------------------------------- /** * Replace bad bytes with an alternative character - ASCII character * recommended is replacement char @@ -143,32 +156,37 @@ function utf8_bad_strip($str) { * @package utf8 * @subpackage bad */ -function utf8_bad_replace($str, $replace = '?') { - $UTF8_BAD = - '([\x00-\x7F]'. # ASCII (including control chars) - '|[\xC2-\xDF][\x80-\xBF]'. # non-overlong 2-byte - '|\xE0[\xA0-\xBF][\x80-\xBF]'. # excluding overlongs - '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'. # straight 3-byte - '|\xED[\x80-\x9F][\x80-\xBF]'. # excluding surrogates - '|\xF0[\x90-\xBF][\x80-\xBF]{2}'. # planes 1-3 - '|[\xF1-\xF3][\x80-\xBF]{3}'. # planes 4-15 - '|\xF4[\x80-\x8F][\x80-\xBF]{2}'. # plane 16 - '|(.{1}))'; # invalid byte - ob_start(); - while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) { - if ( !isset($matches[2])) { - echo $matches[0]; - } else { - echo $replace; - } - $str = substr($str,strlen($matches[0])); - } - $result = ob_get_contents(); - ob_end_clean(); - return $result; +function utf8_bad_replace($str, $replace='?') +{ + $UTF8_BAD = + '([\x00-\x7F]'. # ASCII (including control chars) + '|[\xC2-\xDF][\x80-\xBF]'. # Non-overlong 2-byte + '|\xE0[\xA0-\xBF][\x80-\xBF]'. # Excluding overlongs + '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'. # Straight 3-byte + '|\xED[\x80-\x9F][\x80-\xBF]'. # Excluding surrogates + '|\xF0[\x90-\xBF][\x80-\xBF]{2}'. # Planes 1-3 + '|[\xF1-\xF3][\x80-\xBF]{3}'. # Planes 4-15 + '|\xF4[\x80-\x8F][\x80-\xBF]{2}'. # Plane 16 + '|(.{1}))'; # Invalid byte + + ob_start(); + + while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) + { + if (!isset($matches[2])) + echo $matches[0]; + else + echo $replace; + + $str = substr($str, strlen($matches[0])); + } + + $result = ob_get_contents(); + ob_end_clean(); + + return $result; } -//-------------------------------------------------------------------- /** * Return code from utf8_bad_identify() when a five octet sequence is detected. * Note: 5 octets sequences are valid UTF-8 but are not supported by Unicode so @@ -177,7 +195,7 @@ function utf8_bad_replace($str, $replace = '?') { * @package utf8 * @subpackage bad */ -define('UTF8_BAD_5OCTET',1); +define('UTF8_BAD_5OCTET', 1); /** * Return code from utf8_bad_identify() when a six octet sequence is detected. @@ -187,7 +205,7 @@ define('UTF8_BAD_5OCTET',1); * @package utf8 * @subpackage bad */ -define('UTF8_BAD_6OCTET',2); +define('UTF8_BAD_6OCTET', 2); /** * Return code from utf8_bad_identify(). @@ -196,7 +214,7 @@ define('UTF8_BAD_6OCTET',2); * @package utf8 * @subpackage bad */ -define('UTF8_BAD_SEQID',3); +define('UTF8_BAD_SEQID', 3); /** * Return code from utf8_bad_identify(). @@ -205,7 +223,7 @@ define('UTF8_BAD_SEQID',3); * @package utf8 * @subpackage bad */ -define('UTF8_BAD_NONSHORT',4); +define('UTF8_BAD_NONSHORT', 4); /** * Return code from utf8_bad_identify(). @@ -214,7 +232,7 @@ define('UTF8_BAD_NONSHORT',4); * @package utf8 * @subpackage bad */ -define('UTF8_BAD_SURROGATE',5); +define('UTF8_BAD_SURROGATE', 5); /** * Return code from utf8_bad_identify(). @@ -223,7 +241,7 @@ define('UTF8_BAD_SURROGATE',5); * @package utf8 * @subpackage bad */ -define('UTF8_BAD_UNIOUTRANGE',6); +define('UTF8_BAD_UNIOUTRANGE', 6); /** * Return code from utf8_bad_identify(). @@ -233,9 +251,8 @@ define('UTF8_BAD_UNIOUTRANGE',6); * @package utf8 * @subpackage bad */ -define('UTF8_BAD_SEQINCOMPLETE',7); +define('UTF8_BAD_SEQINCOMPLETE', 7); -//-------------------------------------------------------------------- /** * Reports on the type of bad byte found in a UTF-8 string. Returns a * status code on the first bad byte found @@ -247,131 +264,129 @@ define('UTF8_BAD_SEQINCOMPLETE',7); * @package utf8 * @subpackage bad */ -function utf8_bad_identify($str, &$i) { - - $mState = 0; // cached expected number of octets after the current octet - // until the beginning of the next UTF8 character sequence - $mUcs4 = 0; // cached Unicode character - $mBytes = 1; // cached expected number of octets in the current sequence - - $len = strlen($str); - - for($i = 0; $i < $len; $i++) { - - $in = ord($str{$i}); - - if ( $mState == 0) { - - // When mState is zero we expect either a US-ASCII character or a - // multi-octet sequence. - if (0 == (0x80 & ($in))) { - // US-ASCII, pass straight through. - $mBytes = 1; - - } else if (0xC0 == (0xE0 & ($in))) { - // First octet of 2 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x1F) << 6; - $mState = 1; - $mBytes = 2; - - } else if (0xE0 == (0xF0 & ($in))) { - // First octet of 3 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x0F) << 12; - $mState = 2; - $mBytes = 3; - - } else if (0xF0 == (0xF8 & ($in))) { - // First octet of 4 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x07) << 18; - $mState = 3; - $mBytes = 4; - - } else if (0xF8 == (0xFC & ($in))) { - - /* First octet of 5 octet sequence. - * - * This is illegal because the encoded codepoint must be either - * (a) not the shortest form or - * (b) outside the Unicode range of 0-0x10FFFF. - */ - - return UTF8_BAD_5OCTET; - - } else if (0xFC == (0xFE & ($in))) { - - // First octet of 6 octet sequence, see comments for 5 octet sequence. - return UTF8_BAD_6OCTET; - - } else { - // Current octet is neither in the US-ASCII range nor a legal first - // octet of a multi-octet sequence. - return UTF8_BAD_SEQID; - - } - - } else { - - // When mState is non-zero, we expect a continuation of the multi-octet - // sequence - if (0x80 == (0xC0 & ($in))) { - - // Legal continuation. - $shift = ($mState - 1) * 6; - $tmp = $in; - $tmp = ($tmp & 0x0000003F) << $shift; - $mUcs4 |= $tmp; - - /** - * End of the multi-octet sequence. mUcs4 now contains the final - * Unicode codepoint to be output - */ - if (0 == --$mState) { - - // From Unicode 3.1, non-shortest form is illegal - if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || - ((3 == $mBytes) && ($mUcs4 < 0x0800)) || - ((4 == $mBytes) && ($mUcs4 < 0x10000)) ) { - return UTF8_BAD_NONSHORT; - - // From Unicode 3.2, surrogate characters are illegal - } else if (($mUcs4 & 0xFFFFF800) == 0xD800) { - return UTF8_BAD_SURROGATE; - - // Codepoints outside the Unicode range are illegal - } else if ($mUcs4 > 0x10FFFF) { - return UTF8_BAD_UNIOUTRANGE; - } - - //initialize UTF8 cache - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - } - - } else { - // ((0xC0 & (*in) != 0x80) && (mState != 0)) - // Incomplete multi-octet sequence. - $i--; - return UTF8_BAD_SEQINCOMPLETE; - } - } - } - - if ( $mState != 0 ) { - // Incomplete multi-octet sequence. - $i--; - return UTF8_BAD_SEQINCOMPLETE; - } - - // No bad octets found - $i = NULL; - return FALSE; +function utf8_bad_identify($str, &$i) +{ + $mState = 0; // Cached expected number of octets after the current octet + // until the beginning of the next UTF8 character sequence + $mUcs4 = 0; // Cached Unicode character + $mBytes = 1; // Cached expected number of octets in the current sequence + + $len = strlen($str); + + for($i=0; $i < $len; $i++) + { + $in = ord($str{$i}); + + if ( $mState == 0) + { + // When mState is zero we expect either a US-ASCII character or a multi-octet sequence. + if (0 == (0x80 & ($in))) + { + // US-ASCII, pass straight through. + $mBytes = 1; + } + else if (0xC0 == (0xE0 & ($in))) + { + // First octet of 2 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x1F) << 6; + $mState = 1; + $mBytes = 2; + } + else if (0xE0 == (0xF0 & ($in))) + { + // First octet of 3 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x0F) << 12; + $mState = 2; + $mBytes = 3; + } + else if (0xF0 == (0xF8 & ($in))) + { + // First octet of 4 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x07) << 18; + $mState = 3; + $mBytes = 4; + } + else if (0xF8 == (0xFC & ($in))) + { + /* First octet of 5 octet sequence. + * + * This is illegal because the encoded codepoint must be either + * (a) not the shortest form or + * (b) outside the Unicode range of 0-0x10FFFF. + */ + return UTF8_BAD_5OCTET; + } + else if (0xFC == (0xFE & ($in))) + { + // First octet of 6 octet sequence, see comments for 5 octet sequence. + return UTF8_BAD_6OCTET; + } + else + { + // Current octet is neither in the US-ASCII range nor a legal first + // octet of a multi-octet sequence. + return UTF8_BAD_SEQID; + } + } + else + { + // When mState is non-zero, we expect a continuation of the multi-octet sequence + if (0x80 == (0xC0 & ($in))) + { + // Legal continuation. + $shift = ($mState - 1) * 6; + $tmp = $in; + $tmp = ($tmp & 0x0000003F) << $shift; + $mUcs4 |= $tmp; + + /** + * End of the multi-octet sequence. mUcs4 now contains the final + * Unicode codepoint to be output + */ + if (0 == --$mState) + { + // From Unicode 3.1, non-shortest form is illegal + if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || + ((3 == $mBytes) && ($mUcs4 < 0x0800)) || + ((4 == $mBytes) && ($mUcs4 < 0x10000)) ) + return UTF8_BAD_NONSHORT; + else if (($mUcs4 & 0xFFFFF800) == 0xD800) // From Unicode 3.2, surrogate characters are illegal + return UTF8_BAD_SURROGATE; + else if ($mUcs4 > 0x10FFFF) // Codepoints outside the Unicode range are illegal + return UTF8_BAD_UNIOUTRANGE; + + // Initialize UTF8 cache + $mState = 0; + $mUcs4 = 0; + $mBytes = 1; + } + + } + else + { + // ((0xC0 & (*in) != 0x80) && (mState != 0)) + // Incomplete multi-octet sequence. + $i--; + return UTF8_BAD_SEQINCOMPLETE; + } + } + } + + // Incomplete multi-octet sequence + if ($mState != 0) + { + $i--; + return UTF8_BAD_SEQINCOMPLETE; + } + + // No bad octets found + $i = null; + return false; } -//-------------------------------------------------------------------- /** * Takes a return code from utf8_bad_identify() are returns a message * (in English) explaining what the problem is. @@ -381,41 +396,40 @@ function utf8_bad_identify($str, &$i) { * @package utf8 * @subpackage bad */ -function utf8_bad_explain($code) { - - switch ($code) { - - case UTF8_BAD_5OCTET: - return 'Five octet sequences are valid UTF-8 but are not supported by Unicode'; - break; - - case UTF8_BAD_6OCTET: - return 'Six octet sequences are valid UTF-8 but are not supported by Unicode'; - break; - - case UTF8_BAD_SEQID: - return 'Invalid octet for use as start of multi-byte UTF-8 sequence'; - break; - - case UTF8_BAD_NONSHORT: - return 'From Unicode 3.1, non-shortest form is illegal'; - break; - - case UTF8_BAD_SURROGATE: - return 'From Unicode 3.2, surrogate characters are illegal'; - break; - - case UTF8_BAD_UNIOUTRANGE: - return 'Codepoints outside the Unicode range are illegal'; - break; - - case UTF8_BAD_SEQINCOMPLETE: - return 'Incomplete multi-octet sequence'; - break; - - } - - trigger_error('Unknown error code: '.$code,E_USER_WARNING); - return FALSE; - +function utf8_bad_explain($code) +{ + switch ($code) + { + case UTF8_BAD_5OCTET: + return 'Five octet sequences are valid UTF-8 but are not supported by Unicode'; + break; + + case UTF8_BAD_6OCTET: + return 'Six octet sequences are valid UTF-8 but are not supported by Unicode'; + break; + + case UTF8_BAD_SEQID: + return 'Invalid octet for use as start of multi-byte UTF-8 sequence'; + break; + + case UTF8_BAD_NONSHORT: + return 'From Unicode 3.1, non-shortest form is illegal'; + break; + + case UTF8_BAD_SURROGATE: + return 'From Unicode 3.2, surrogate characters are illegal'; + break; + + case UTF8_BAD_UNIOUTRANGE: + return 'Codepoints outside the Unicode range are illegal'; + break; + + case UTF8_BAD_SEQINCOMPLETE: + return 'Incomplete multi-octet sequence'; + break; + } + + trigger_error('Unknown error code: '.$code, E_USER_WARNING); + + return false; } diff --git a/upload/include/utf8/utils/patterns.php b/upload/include/utf8/utils/patterns.php index a3dee6a..5a85a4f 100644 --- a/upload/include/utf8/utils/patterns.php +++ b/upload/include/utf8/utils/patterns.php @@ -1,4 +1,5 @@ byte indexes into $str - $i = utf8_locate_next_chr($str, 300); - - // $c -> character offset into $str - $c = strlen(utf8_decode(substr($str,0,$i))); - - // deal with arguments from lowest to highest - sort($args); - - foreach ($args as $offset) { - // sanity checks FIXME - - // 0 is an easy check - if ($offset == 0) { $result[] = 0; continue; } - - // ensure no endless looping - $safety_valve = 50; - - do { - - if ( ($c - $prev[1]) == 0 ) { - // Hack: gone past end of string - $error = 0; - $i = strlen($str); - break; - } - - $j = $i + (int)(($offset-$c) * ($i - $prev[0]) / ($c - $prev[1])); - - // correct to utf8 character boundary - $j = utf8_locate_next_chr($str, $j); - - // save the index, offset for use next iteration - $prev = array($i,$c); - - if ($j > $i) { - // determine new character offset - $c += strlen(utf8_decode(substr($str,$i,$j-$i))); - } else { - // ditto - $c -= strlen(utf8_decode(substr($str,$j,$i-$j))); - } - - $error = abs($c-$offset); - - // ready for next time around - $i = $j; - - // from 7 it is faster to iterate over the string - } while ( ($error > 7) && --$safety_valve) ; - - if ($error && $error <= 7) { - - if ($c < $offset) { - // move up - while ($error--) { $i = utf8_locate_next_chr($str,++$i); } - } else { - // move down - while ($error--) { $i = utf8_locate_current_chr($str,--$i); } - } - - // ready for next arg - $c = $offset; - } - $result[] = $i; - } - - if ( count($result) == 1 ) { - return $result[0]; - } - - return $result; +function utf8_byte_position() +{ + $args = func_get_args(); + $str =& array_shift($args); + + if (!is_string($str)) + return false; + + $result = array(); + $prev = array(0, 0); // Trivial byte index, character offset pair + $i = utf8_locate_next_chr($str, 300); // Use a short piece of str to estimate bytes per character. $i (& $j) -> byte indexes into $str + $c = strlen(utf8_decode(substr($str, 0, $i))); // $c -> character offset into $str + + // Deal with arguments from lowest to highest + sort($args); + + foreach ($args as $offset) + { + // Sanity checks FIXME + + // 0 is an easy check + if ($offset == 0) + { + $result[] = 0; continue; + } + + // Ensure no endless looping + $safety_valve = 50; + + do + { + if (($c - $prev[1]) == 0) + { + // Hack: gone past end of string + $error = 0; + $i = strlen($str); + break; + } + + $j = $i + (int)(($offset-$c) * ($i - $prev[0]) / ($c - $prev[1])); + $j = utf8_locate_next_chr($str, $j); // Correct to utf8 character boundary + $prev = array($i,$c); // Save the index, offset for use next iteration + + if ($j > $i) + $c += strlen(utf8_decode(substr($str, $i, $j-$i))); // Determine new character offset + else + $c -= strlen(utf8_decode(substr($str, $j, $i-$j))); // Ditto + + $error = abs($c-$offset); + $i = $j; // Ready for next time around + } + while (($error > 7) && --$safety_valve); // From 7 it is faster to iterate over the string + + if ($error && $error <= 7) + { + if ($c < $offset) + { + // Move up + while ($error--) + $i = utf8_locate_next_chr($str, ++$i); + } + else + { + // Move down + while ($error--) + $i = utf8_locate_current_chr($str, --$i); + } + + // Ready for next arg + $c = $offset; + } + + $result[] = $i; + } + + if (count($result) == 1) + return $result[0]; + + return $result; } -//-------------------------------------------------------------------- /** * Given a string and any byte index, returns the byte index * of the start of the current UTF-8 character, relative to supplied @@ -128,22 +122,24 @@ function utf8_byte_position() { * @package utf8 * @subpackage position */ -function utf8_locate_current_chr( &$str, $idx ) { - - if ($idx <= 0) return 0; - - $limit = strlen($str); - if ($idx >= $limit) return $limit; - - // Binary value for any byte after the first in a multi-byte UTF-8 character - // will be like 10xxxxxx so & 0xC0 can be used to detect this kind - // of byte - assuming well formed UTF-8 - while ($idx && ((ord($str[$idx]) & 0xC0) == 0x80)) $idx--; - - return $idx; +function utf8_locate_current_chr( &$str, $idx ) +{ + if ($idx <= 0) + return 0; + + $limit = strlen($str); + if ($idx >= $limit) + return $limit; + + // Binary value for any byte after the first in a multi-byte UTF-8 character + // will be like 10xxxxxx so & 0xC0 can be used to detect this kind + // of byte - assuming well formed UTF-8 + while ($idx && ((ord($str[$idx]) & 0xC0) == 0x80)) + $idx--; + + return $idx; } -//-------------------------------------------------------------------- /** * Given a string and any byte index, returns the byte index * of the start of the next UTF-8 character, relative to supplied @@ -156,18 +152,20 @@ function utf8_locate_current_chr( &$str, $idx ) { * @package utf8 * @subpackage position */ -function utf8_locate_next_chr( &$str, $idx ) { - - if ($idx <= 0) return 0; - - $limit = strlen($str); - if ($idx >= $limit) return $limit; - - // Binary value for any byte after the first in a multi-byte UTF-8 character - // will be like 10xxxxxx so & 0xC0 can be used to detect this kind - // of byte - assuming well formed UTF-8 - while (($idx < $limit) && ((ord($str[$idx]) & 0xC0) == 0x80)) $idx++; - - return $idx; -} +function utf8_locate_next_chr(&$str, $idx) +{ + if ($idx <= 0) + return 0; + + $limit = strlen($str); + if ($idx >= $limit) + return $limit; + // Binary value for any byte after the first in a multi-byte UTF-8 character + // will be like 10xxxxxx so & 0xC0 can be used to detect this kind + // of byte - assuming well formed UTF-8 + while (($idx < $limit) && ((ord($str[$idx]) & 0xC0) == 0x80)) + $idx++; + + return $idx; +} diff --git a/upload/include/utf8/utils/specials.php b/upload/include/utf8/utils/specials.php index 30613ee..69219dc 100644 --- a/upload/include/utf8/utils/specials.php +++ b/upload/include/utf8/utils/specials.php @@ -1,4 +1,5 @@ 0xFFFF. Occurrances of the BOM are ignored. Surrogates * are not allowed. @@ -34,161 +34,145 @@ * @package utf8 * @subpackage unicode */ -function utf8_to_unicode($str) { - $mState = 0; // cached expected number of octets after the current octet - // until the beginning of the next UTF8 character sequence - $mUcs4 = 0; // cached Unicode character - $mBytes = 1; // cached expected number of octets in the current sequence - - $out = array(); - - $len = strlen($str); - - for($i = 0; $i < $len; $i++) { - - $in = ord($str{$i}); - - if ( $mState == 0) { - - // When mState is zero we expect either a US-ASCII character or a - // multi-octet sequence. - if (0 == (0x80 & ($in))) { - // US-ASCII, pass straight through. - $out[] = $in; - $mBytes = 1; - - } else if (0xC0 == (0xE0 & ($in))) { - // First octet of 2 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x1F) << 6; - $mState = 1; - $mBytes = 2; - - } else if (0xE0 == (0xF0 & ($in))) { - // First octet of 3 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x0F) << 12; - $mState = 2; - $mBytes = 3; - - } else if (0xF0 == (0xF8 & ($in))) { - // First octet of 4 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x07) << 18; - $mState = 3; - $mBytes = 4; - - } else if (0xF8 == (0xFC & ($in))) { - /* First octet of 5 octet sequence. - * - * This is illegal because the encoded codepoint must be either - * (a) not the shortest form or - * (b) outside the Unicode range of 0-0x10FFFF. - * Rather than trying to resynchronize, we will carry on until the end - * of the sequence and let the later error handling code catch it. - */ - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x03) << 24; - $mState = 4; - $mBytes = 5; - - } else if (0xFC == (0xFE & ($in))) { - // First octet of 6 octet sequence, see comments for 5 octet sequence. - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 1) << 30; - $mState = 5; - $mBytes = 6; - - } else { - /* Current octet is neither in the US-ASCII range nor a legal first - * octet of a multi-octet sequence. - */ - trigger_error( - 'utf8_to_unicode: Illegal sequence identifier '. - 'in UTF-8 at byte '.$i, - E_USER_WARNING - ); - return FALSE; - - } - - } else { - - // When mState is non-zero, we expect a continuation of the multi-octet - // sequence - if (0x80 == (0xC0 & ($in))) { - - // Legal continuation. - $shift = ($mState - 1) * 6; - $tmp = $in; - $tmp = ($tmp & 0x0000003F) << $shift; - $mUcs4 |= $tmp; - - /** - * End of the multi-octet sequence. mUcs4 now contains the final - * Unicode codepoint to be output - */ - if (0 == --$mState) { - - /* - * Check for illegal sequences and codepoints. - */ - // From Unicode 3.1, non-shortest form is illegal - if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || - ((3 == $mBytes) && ($mUcs4 < 0x0800)) || - ((4 == $mBytes) && ($mUcs4 < 0x10000)) || - (4 < $mBytes) || - // From Unicode 3.2, surrogate characters are illegal - (($mUcs4 & 0xFFFFF800) == 0xD800) || - // Codepoints outside the Unicode range are illegal - ($mUcs4 > 0x10FFFF)) { - - trigger_error( - 'utf8_to_unicode: Illegal sequence or codepoint '. - 'in UTF-8 at byte '.$i, - E_USER_WARNING - ); - - return FALSE; - - } - - if (0xFEFF != $mUcs4) { - // BOM is legal but we don't want to output it - $out[] = $mUcs4; - } - - //initialize UTF8 cache - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - } - - } else { - /** - *((0xC0 & (*in) != 0x80) && (mState != 0)) - * Incomplete multi-octet sequence. - */ - trigger_error( - 'utf8_to_unicode: Incomplete multi-octet '. - ' sequence in UTF-8 at byte '.$i, - E_USER_WARNING - ); - - return FALSE; - } - } - } - return $out; +function utf8_to_unicode($str) +{ + $mState = 0; // Cached expected number of octets after the current octet + // until the beginning of the next UTF8 character sequence + $mUcs4 = 0; // Cached Unicode character + $mBytes = 1; // Cached expected number of octets in the current sequence + + $out = array(); + $len = strlen($str); + + for($i = 0; $i < $len; $i++) + { + $in = ord($str{$i}); + + if ($mState == 0) + { + // When mState is zero we expect either a US-ASCII character or a multi-octet sequence. + if (0 == (0x80 & ($in))) + { + // US-ASCII, pass straight through. + $out[] = $in; + $mBytes = 1; + } + else if (0xC0 == (0xE0 & ($in))) + { + // First octet of 2 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x1F) << 6; + $mState = 1; + $mBytes = 2; + } + else if (0xE0 == (0xF0 & ($in))) + { + // First octet of 3 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x0F) << 12; + $mState = 2; + $mBytes = 3; + } + else if (0xF0 == (0xF8 & ($in))) + { + // First octet of 4 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x07) << 18; + $mState = 3; + $mBytes = 4; + } + else if (0xF8 == (0xFC & ($in))) + { + /* First octet of 5 octet sequence. + * + * This is illegal because the encoded codepoint must be either + * (a) not the shortest form or + * (b) outside the Unicode range of 0-0x10FFFF. + * Rather than trying to resynchronize, we will carry on until the end + * of the sequence and let the later error handling code catch it. + */ + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x03) << 24; + $mState = 4; + $mBytes = 5; + } + else if (0xFC == (0xFE & ($in))) + { + // First octet of 6 octet sequence, see comments for 5 octet sequence. + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 1) << 30; + $mState = 5; + $mBytes = 6; + } + else + { + /* Current octet is neither in the US-ASCII range nor a legal first octet of a multi-octet sequence. */ + trigger_error('utf8_to_unicode: Illegal sequence identifier in UTF-8 at byte '.$i, E_USER_WARNING); + return false; + } + } + else + { + // When mState is non-zero, we expect a continuation of the multi-octet sequence + if (0x80 == (0xC0 & ($in))) + { + // Legal continuation. + $shift = ($mState - 1) * 6; + $tmp = $in; + $tmp = ($tmp & 0x0000003F) << $shift; + $mUcs4 |= $tmp; + + /** + * End of the multi-octet sequence. mUcs4 now contains the final + * Unicode codepoint to be output + */ + if (0 == --$mState) + { + /* + * Check for illegal sequences and codepoints. + */ + // From Unicode 3.1, non-shortest form is illegal + if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || ((3 == $mBytes) && ($mUcs4 < 0x0800)) || + ((4 == $mBytes) && ($mUcs4 < 0x10000)) || (4 < $mBytes) || + // From Unicode 3.2, surrogate characters are illegal + (($mUcs4 & 0xFFFFF800) == 0xD800) || + // Codepoints outside the Unicode range are illegal + ($mUcs4 > 0x10FFFF)) + { + trigger_error('utf8_to_unicode: Illegal sequence or codepoint in UTF-8 at byte '.$i, E_USER_WARNING); + return false; + } + + // BOM is legal but we don't want to output it + if (0xFEFF != $mUcs4) + $out[] = $mUcs4; + + // Initialize UTF8 cache + $mState = 0; + $mUcs4 = 0; + $mBytes = 1; + } + + } + else + { + /* ((0xC0 & (*in) != 0x80) && (mState != 0)) + Incomplete multi-octet sequence. */ + trigger_error('utf8_to_unicode: Incomplete multi-octet sequence in UTF-8 at byte '.$i, E_USER_WARNING); + return false; + } + } + } + + return $out; } -//-------------------------------------------------------------------- /** -* Takes an array of ints representing the Unicode characters and returns +* Takes an array of ints representing the Unicode characters and returns * a UTF-8 string. Astral planes are supported ie. the ints in the * input can be > 0xFFFF. Occurrances of the BOM are ignored. Surrogates * are not allowed. -* Returns false if the input array contains ints that represent +* Returns false if the input array contains ints that represent * surrogates or are outside the Unicode range * and raises a PHP error at level E_USER_WARNING * Note: this function has been modified slightly in this library to use @@ -202,68 +186,55 @@ function utf8_to_unicode($str) { * @package utf8 * @subpackage unicode */ -function utf8_from_unicode($arr) { - ob_start(); - - foreach (array_keys($arr) as $k) { - - # ASCII range (including control chars) - if ( ($arr[$k] >= 0) && ($arr[$k] <= 0x007f) ) { - - echo chr($arr[$k]); - - # 2 byte sequence - } else if ($arr[$k] <= 0x07ff) { - - echo chr(0xc0 | ($arr[$k] >> 6)); - echo chr(0x80 | ($arr[$k] & 0x003f)); - - # Byte order mark (skip) - } else if($arr[$k] == 0xFEFF) { - - // nop -- zap the BOM - - # Test for illegal surrogates - } else if ($arr[$k] >= 0xD800 && $arr[$k] <= 0xDFFF) { - - // found a surrogate - trigger_error( - 'utf8_from_unicode: Illegal surrogate '. - 'at index: '.$k.', value: '.$arr[$k], - E_USER_WARNING - ); - - return FALSE; - - # 3 byte sequence - } else if ($arr[$k] <= 0xffff) { - - echo chr(0xe0 | ($arr[$k] >> 12)); - echo chr(0x80 | (($arr[$k] >> 6) & 0x003f)); - echo chr(0x80 | ($arr[$k] & 0x003f)); - - # 4 byte sequence - } else if ($arr[$k] <= 0x10ffff) { - - echo chr(0xf0 | ($arr[$k] >> 18)); - echo chr(0x80 | (($arr[$k] >> 12) & 0x3f)); - echo chr(0x80 | (($arr[$k] >> 6) & 0x3f)); - echo chr(0x80 | ($arr[$k] & 0x3f)); - - } else { - - trigger_error( - 'utf8_from_unicode: Codepoint out of Unicode range '. - 'at index: '.$k.', value: '.$arr[$k], - E_USER_WARNING - ); - - // out of range - return FALSE; - } - } - - $result = ob_get_contents(); - ob_end_clean(); - return $result; +function utf8_from_unicode($arr) +{ + ob_start(); + + foreach (array_keys($arr) as $k) + { + if ( ($arr[$k] >= 0) && ($arr[$k] <= 0x007f) ) // ASCII range (including control chars) + { + echo chr($arr[$k]); + } + else if ($arr[$k] <= 0x07ff) //2 byte sequence + { + echo chr(0xc0 | ($arr[$k] >> 6)); + echo chr(0x80 | ($arr[$k] & 0x003f)); + } + else if($arr[$k] == 0xFEFF) // Byte order mark (skip) + { + // Nop -- zap the BOM + } + else if ($arr[$k] >= 0xD800 && $arr[$k] <= 0xDFFF) // Test for illegal surrogates + { + // Found a surrogate + trigger_error('utf8_from_unicode: Illegal surrogate at index: '.$k.', value: '.$arr[$k], E_USER_WARNING); + + return false; + } + else if ($arr[$k] <= 0xffff) // 3 byte sequence + { + echo chr(0xe0 | ($arr[$k] >> 12)); + echo chr(0x80 | (($arr[$k] >> 6) & 0x003f)); + echo chr(0x80 | ($arr[$k] & 0x003f)); + } + else if ($arr[$k] <= 0x10ffff) // 4 byte sequence + { + echo chr(0xf0 | ($arr[$k] >> 18)); + echo chr(0x80 | (($arr[$k] >> 12) & 0x3f)); + echo chr(0x80 | (($arr[$k] >> 6) & 0x3f)); + echo chr(0x80 | ($arr[$k] & 0x3f)); + } + else + { + trigger_error('utf8_from_unicode: Codepoint out of Unicode range at index: '.$k.', value: '.$arr[$k], E_USER_WARNING); + + // Out of range + return false; + } + } + + $result = ob_get_contents(); + ob_end_clean(); + return $result; } diff --git a/upload/include/utf8/utils/validation.php b/upload/include/utf8/utils/validation.php index 0f9fd37..11e5e82 100644 --- a/upload/include/utf8/utils/validation.php +++ b/upload/include/utf8/utils/validation.php @@ -1,4 +1,5 @@ 0x10FFFF)) { - - return FALSE; - - } - - //initialize UTF8 cache - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - } - - } else { - /** - *((0xC0 & (*in) != 0x80) && (mState != 0)) - * Incomplete multi-octet sequence. - */ - - return FALSE; - } - } - } - return TRUE; +function utf8_is_valid($str) +{ + $mState = 0; // Cached expected number of octets after the current octet + // until the beginning of the next UTF8 character sequence + $mUcs4 = 0; // Cached Unicode character + $mBytes = 1; // Cached expected number of octets in the current sequence + + $len = strlen($str); + + for($i = 0; $i < $len; $i++) + { + $in = ord($str{$i}); + + if ( $mState == 0) + { + // When mState is zero we expect either a US-ASCII character or a multi-octet sequence. + if (0 == (0x80 & ($in))) + { + $mBytes = 1; // US-ASCII, pass straight through + } + else if (0xC0 == (0xE0 & ($in))) + { + // First octet of 2 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x1F) << 6; + $mState = 1; + $mBytes = 2; + } + else if (0xE0 == (0xF0 & ($in))) + { + // First octet of 3 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x0F) << 12; + $mState = 2; + $mBytes = 3; + } + else if (0xF0 == (0xF8 & ($in))) + { + // First octet of 4 octet sequence + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x07) << 18; + $mState = 3; + $mBytes = 4; + } + else if (0xF8 == (0xFC & ($in))) + { + /* First octet of 5 octet sequence. + * + * This is illegal because the encoded codepoint must be either + * (a) not the shortest form or + * (b) outside the Unicode range of 0-0x10FFFF. + * Rather than trying to resynchronize, we will carry on until the end + * of the sequence and let the later error handling code catch it. + */ + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 0x03) << 24; + $mState = 4; + $mBytes = 5; + } + else if (0xFC == (0xFE & ($in))) + { + // First octet of 6 octet sequence, see comments for 5 octet sequence. + $mUcs4 = ($in); + $mUcs4 = ($mUcs4 & 1) << 30; + $mState = 5; + $mBytes = 6; + } + else + { + // Current octet is neither in the US-ASCII range nor a legal first octet of a multi-octet sequence. + return false; + } + } + else + { + // When mState is non-zero, we expect a continuation of the multi-octet sequence + if (0x80 == (0xC0 & ($in))) + { + // Legal continuation. + $shift = ($mState - 1) * 6; + $tmp = $in; + $tmp = ($tmp & 0x0000003F) << $shift; + $mUcs4 |= $tmp; + + /** + * End of the multi-octet sequence. mUcs4 now contains the final + * Unicode codepoint to be output + */ + if (0 == --$mState) + { + /* + * Check for illegal sequences and codepoints. + */ + // From Unicode 3.1, non-shortest form is illegal + if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || ((3 == $mBytes) && ($mUcs4 < 0x0800)) || + ((4 == $mBytes) && ($mUcs4 < 0x10000)) || (4 < $mBytes) || + // From Unicode 3.2, surrogate characters are illegal + (($mUcs4 & 0xFFFFF800) == 0xD800) || + // Codepoints outside the Unicode range are illegal + ($mUcs4 > 0x10FFFF)) + { + return FALSE; + } + + // Initialize UTF8 cache + $mState = 0; + $mUcs4 = 0; + $mBytes = 1; + } + } + else + { + /** + *((0xC0 & (*in) != 0x80) && (mState != 0)) + * Incomplete multi-octet sequence. + */ + + return false; + } + } + } + + return true; } -//-------------------------------------------------------------------- /** * Tests whether a string complies as UTF-8. This will be much * faster than utf8_is_valid but will pass five and six octet @@ -172,14 +171,14 @@ function utf8_is_valid($str) { * @package utf8 * @subpackage validation */ -function utf8_compliant($str) { - if ( strlen($str) == 0 ) { - return TRUE; - } - // If even just the first character can be matched, when the /u - // modifier is used, then it's valid UTF-8. If the UTF-8 is somehow - // invalid, nothing at all will match, even if the string contains - // some valid sequences - return (preg_match('/^.{1}/us',$str,$ar) == 1); -} +function utf8_compliant($str) +{ + if (strlen($str) == 0) + return true; + // If even just the first character can be matched, when the /u + // modifier is used, then it's valid UTF-8. If the UTF-8 is somehow + // invalid, nothing at all will match, even if the string contains + // some valid sequences + return (preg_match('/^.{1}/us', $str, $ar) == 1); +} diff --git a/upload/index.php b/upload/index.php index 1d8ed64..9bc8831 100644 --- a/upload/index.php +++ b/upload/index.php @@ -1,27 +1,12 @@ fetch_assoc($result)) { $moderators = ''; - if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? + if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? { if ($cur_category != 0) echo "\t\t\t".''."\n\t\t\t".''."\n\t\t".'

    '."\n\t".'
    '."\n".'
    '."\n\n"; @@ -127,7 +112,7 @@ while ($cur_forum = $db->fetch_assoc($result)) $forum_field .= "\n\t\t\t\t\t\t\t\t".$cur_forum['forum_desc']; - // If there is a last_post/last_poster. + // If there is a last_post/last_poster if ($cur_forum['last_post'] != '') $last_post = ''.format_time($cur_forum['last_post']).' '.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).''; else @@ -146,15 +131,15 @@ while ($cur_forum = $db->fetch_assoc($result)) $moderators[] = pun_htmlspecialchars($mod_username); } - $moderators = "\t\t\t\t\t\t\t\t".'

    ('.$lang_common['Moderated by'].' '.implode(', ', $moderators).')

    '."\n"; + $moderators = "\t\t\t\t\t\t\t\t".'

    ('.$lang_common['Moderated by'].' '.implode(', ', $moderators).')

    '."\n"; } ?> - > + > -
    -
    -
    +
    +
    +
    @@ -230,7 +215,7 @@ if ($pun_config['o_users_online'] == '1') if ($num_users > 0) - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].': 
    '."\t\t\t\t".implode(', ', $users).''."\n\t\t\t".'
    '."\n"; + echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].': 
    '."\t\t\t\t".implode(', ', $users).''."\n\t\t\t".'
    '."\n"; else echo "\t\t\t".'
    '."\n"; diff --git a/upload/install.php b/upload/install.php index 3e0aa3f..6850eaa 100644 --- a/upload/install.php +++ b/upload/install.php @@ -1,36 +1,33 @@ here instead.'); +{ + // Check to see whether FluxBB is already installed + include PUN_ROOT.'config.php'; + + // If we have the 1.3-legacy constant defined, define the proper 1.4 constant so we don't get an incorrect "need to install" message + if (defined('FORUM')) + define('PUN', FORUM); + + // If PUN is defined, config.php is probably valid and thus the software is installed + if (defined('PUN')) + exit('It seems like FluxBB is already installed. You should go here instead.'); +} // Make sure we are running at least PHP 4.1.0 @@ -97,7 +94,7 @@ if (!isset($_POST['form_sent'])) if (function_exists('mysql_connect')) { $db_extensions[] = array('mysql', 'MySQL Standard'); - $db_extensions[] = array('mysql_innodb', 'MySQL (InnoDB)'); + $db_extensions[] = array('mysql_innodb', 'MySQL Standard (InnoDB)'); $mysql_innodb = true; if (count($db_extensions) > 2) @@ -120,7 +117,6 @@ if (!isset($_POST['form_sent'])) FluxBB Installation @@ -165,7 +160,7 @@ function process_form(the_form)

    FluxBB Installation

    -

    Welcome to FluxBB installation! You are about to install FluxBB. In order to install FluxBB you must complete the form set out below. If you encounter any difficulties with the installation, please refer to the documentation.

    +

    Welcome to FluxBB installation! You are about to install FluxBB. In order to install FluxBB, you must complete the form set out below. If you encounter any difficulties with the installation, please refer to the documentation.

    @@ -210,7 +205,7 @@ function process_form(the_form)
    - Enter then name of your database + Enter the name of your database

    The name of the database that FluxBB will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, FluxBB will attempt to create it.

    @@ -232,7 +227,7 @@ function process_form(the_form)
    Enter database table prefix
    -

    If you like you can specify a table prefix. This way you can run multiple copies of FluxBB in the same database (example: foo_).

    +

    If you like, you can specify a table prefix. This way you can run multiple copies of FluxBB in the same database (example: foo_).

    @@ -243,16 +238,16 @@ function process_form(the_form)

    Please enter the requested information in order to setup an administrator for your FluxBB installation

    - Enter Administrators username + Enter Administrator's username

    The username of the forum administrator. You can later create more administrators and moderators. Usernames can be between 2 and 25 characters long.

    - +
    - Enter and confirm Administrator password + Enter and confirm Administrator's password

    Passwords can be between 4 and 16 characters long. Passwords are case sensitive.

    @@ -263,10 +258,10 @@ function process_form(the_form)
    - Enter Administrator's e-mail + Enter Administrator's email
    -

    The e-mail address of the forum administrator.

    - +

    The email address of the forum administrator.

    +
    @@ -274,12 +269,12 @@ function process_form(the_form)
    Enter the Base URL of your FluxBB installation
    -

    The URL (without trailing slash) of your FluxBB forum (example: http://forum.myhost.com or http://myhost.com/~myuser). This must be correct or administrators and moderators will not be able to submit any forms. Please note that the preset value below is just an educated guess by FluxBB.

    +

    The URL (without trailing slash) of your FluxBB forum (example: http://forum.myhost.com or http://myhost.com/~myuser). This must be correct, otherwise, administrators and moderators will not be able to submit any forms. Please note that the preset value below is just an educated guess by FluxBB.

    -

    +

    @@ -295,7 +290,7 @@ function process_form(the_form) else { // - // Strip slashes only if magic_quotes_gpc is on. + // Strip slashes only if magic_quotes_gpc is on // function unescape($str) { @@ -336,7 +331,7 @@ else error('Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please go back and correct.'); if (strlen($email) > 80 || !preg_match('/^(([^<>()[\]\\.,;:\s@"\']+(\.[^<>()[\]\\.,;:\s@"\']+)*)|("[^"\']+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/', $email)) - error('The administrator e-mail address you entered is invalid. Please go back and correct.'); + error('The administrator email address you entered is invalid. Please go back and correct.'); // Load the appropriate DB layer class @@ -402,13 +397,13 @@ else error('A table called "'.$db_prefix.'users" is already present in the database "'.$db_name.'". This could mean that FluxBB is already installed or that another piece of software is installed and is occupying one or more of the table names FluxBB requires. If you want to install multiple copies of FluxBB in the same database, you must choose a different table prefix.'); // Check if InnoDB is available - if ($db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') - { + if ($db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') + { $result = $db->query('SHOW VARIABLES LIKE \'have_innodb\''); list (, $result) = $db->fetch_row($result); if ((strtoupper($result) != 'YES')) error('InnoDB does not seem to be enabled. Please choose a database layer that does not have InnoDB support, or enable InnoDB on your MySQL server.'); - } + } // Start a transaction @@ -1237,12 +1232,12 @@ else 'default' => '0' ), 'time_format' => array( - 'datatype' => 'INT(10) UNSIGNED', + 'datatype' => 'TINYINT(1)', 'allow_null' => false, 'default' => '0' ), 'date_format' => array( - 'datatype' => 'INT(10) UNSIGNED', + 'datatype' => 'TINYINT(1)', 'allow_null' => false, 'default' => '0' ), @@ -1340,7 +1335,7 @@ else 'o_cur_version' => "'".FORUM_VERSION."'", 'o_database_revision' => "'".FORUM_DB_REVISION."'", 'o_board_title' => "'My FluxBB forum'", - 'o_board_desc' => "'Unfortunately no one can be told what FluxBB is - you have to see it for yourself.'", + 'o_board_desc' => "'

    Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

    '", 'o_default_timezone' => "'0'", 'o_time_format' => "'H:i:s'", 'o_date_format' => "'Y-m-d'", @@ -1457,7 +1452,7 @@ else // Add some random bytes at the end of the cookie name to prevent collisions $cookie_name = 'pun_cookie_'.random_key(6, false, true); - /// Generate the config.php file data + // Generate the config.php file data $config = generate_config_file(); // Attempt to write config.php and serve it up for download if writing fails diff --git a/upload/lang/English/common.php b/upload/lang/English/common.php index a932a07..8ec0e90 100644 --- a/upload/lang/English/common.php +++ b/upload/lang/English/common.php @@ -28,158 +28,161 @@ setlocale(LC_CTYPE, $locale); $lang_common = array( // Text orientation and encoding -'lang_direction' => 'ltr', // ltr (Left-To-Right) or rtl (Right-To-Left) +'lang_direction' => 'ltr', // ltr (Left-To-Right) or rtl (Right-To-Left) +'lang_identifier' => 'en', // Number formatting -'lang_decimal_point' => '.', -'lang_thousands_sep' => ',', +'lang_decimal_point' => '.', +'lang_thousands_sep' => ',', // Notices -'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', -'No view' => 'You do not have permission to view these forums.', -'No permission' => 'You do not have permission to access this page.', -'Bad referrer' => 'Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that \'Base URL\' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation.', +'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', +'No view' => 'You do not have permission to view these forums.', +'No permission' => 'You do not have permission to access this page.', +'Bad referrer' => 'Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that \'Base URL\' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation.', +'No cookie' => 'You appear to have logged in successfully, however a cookie has not been set. Please check your settings and if applicable, enable cookies for this website.', // Topic/forum indicators -'New icon' => 'There are new posts', -'Normal icon' => '', -'Closed icon' => 'This topic is closed', -'Redirect icon' => 'Redirected forum', +'New icon' => 'There are new posts', +'Normal icon' => '', +'Closed icon' => 'This topic is closed', +'Redirect icon' => 'Redirected forum', // Miscellaneous -'Announcement' => 'Announcement', -'Options' => 'Options', -'Actions' => 'Actions', -'Submit' => 'Submit', // "Name" of submit buttons -'Ban message' => 'You are banned from this forum.', -'Ban message 2' => 'The ban expires at the end of', -'Ban message 3' => 'The administrator or moderator that banned you left the following message:', -'Ban message 4' => 'Please direct any inquiries to the forum administrator at', -'Never' => 'Never', -'Today' => 'Today', -'Yesterday' => 'Yesterday', -'Info' => 'Info', // A common table header -'Go back' => 'Go back', -'Maintenance' => 'Maintenance', -'Redirecting' => 'Redirecting', -'Click redirect' => 'Click here if you do not want to wait any longer (or if your browser does not automatically forward you)', -'on' => 'on', // As in "BBCode is on" -'off' => 'off', -'Invalid e-mail' => 'The e-mail address you entered is invalid.', -'required field' => 'is a required field in this form.', // For javascript form validation -'Last post' => 'Last post', -'by' => 'by', // As in last post by someuser -'New posts' => 'New posts', // The link that leads to the first new post (use   for spaces) -'New posts info' => 'Go to the first new post in this topic.', // The popup text for new posts links -'Username' => 'Username', -'Password' => 'Password', -'E-mail' => 'E-mail', -'Send e-mail' => 'Send e-mail', -'Moderated by' => 'Moderated by', -'Registered' => 'Registered', -'Subject' => 'Subject', -'Message' => 'Message', -'Topic' => 'Topic', -'Forum' => 'Forum', -'Posts' => 'Posts', -'Replies' => 'Replies', -'Author' => 'Author', -'Pages' => 'Pages', -'BBCode' => 'BBCode', // You probably shouldn't change this -'img tag' => '[img] tag', -'Smilies' => 'Smilies', -'and' => 'and', -'Image link' => 'image', // This is displayed (i.e. ) instead of images when "Show images" is disabled in the profile -'wrote' => 'wrote', // For [quote]'s -'Code' => 'Code', // For [code]'s -'Mailer' => 'Mailer', // As in "MyForums Mailer" in the signature of outgoing e-mails -'Important information' => 'Important information', -'Write message legend' => 'Write your message and submit', -'Previous' => 'Previous', -'Next' => 'Next', -'Spacer' => '…', // Ellipsis for paginate +'Announcement' => 'Announcement', +'Options' => 'Options', +'Submit' => 'Submit', // "Name" of submit buttons +'Ban message' => 'You are banned from this forum.', +'Ban message 2' => 'The ban expires at the end of', +'Ban message 3' => 'The administrator or moderator that banned you left the following message:', +'Ban message 4' => 'Please direct any inquiries to the forum administrator at', +'Never' => 'Never', +'Today' => 'Today', +'Yesterday' => 'Yesterday', +'Info' => 'Info', // A common table header +'Go back' => 'Go back', +'Maintenance' => 'Maintenance', +'Redirecting' => 'Redirecting', +'Click redirect' => 'Click here if you do not want to wait any longer (or if your browser does not automatically forward you)', +'on' => 'on', // As in "BBCode is on" +'off' => 'off', +'Invalid email' => 'The email address you entered is invalid.', +'required field' => 'is a required field in this form.', // For javascript form validation +'Last post' => 'Last post', +'by' => 'by', // As in last post by someuser +'New posts' => 'New posts', // The link that leads to the first new post (use   for spaces) +'New posts info' => 'Go to the first new post in this topic.', // The popup text for new posts links +'Username' => 'Username', +'Password' => 'Password', +'Email' => 'Email', +'Send email' => 'Send email', +'Moderated by' => 'Moderated by', +'Registered' => 'Registered', +'Subject' => 'Subject', +'Message' => 'Message', +'Topic' => 'Topic', +'Forum' => 'Forum', +'Posts' => 'Posts', +'Replies' => 'Replies', +'Author' => 'Author', +'Pages' => 'Pages', +'Page' => 'Page %s', +'BBCode' => 'BBCode', // You probably shouldn't change this +'img tag' => '[img] tag', +'Smilies' => 'Smilies', +'and' => 'and', +'Image link' => 'image', // This is displayed (i.e. ) instead of images when "Show images" is disabled in the profile +'wrote' => 'wrote', // For [quote]'s +'Code' => 'Code', // For [code]'s +'Mailer' => 'Mailer', // As in "MyForums Mailer" in the signature of outgoing emails +'Important information' => 'Important information', +'Write message legend' => 'Write your message and submit', +'Previous' => 'Previous', +'Next' => 'Next', +'Spacer' => '…', // Ellipsis for paginate // Title -'Title' => 'Title', -'Member' => 'Member', // Default title -'Moderator' => 'Moderator', -'Administrator' => 'Administrator', -'Banned' => 'Banned', -'Guest' => 'Guest', +'Title' => 'Title', +'Member' => 'Member', // Default title +'Moderator' => 'Moderator', +'Administrator' => 'Administrator', +'Banned' => 'Banned', +'Guest' => 'Guest', // Stuff for include/parser.php -'BBCode error 1' => '[/%1$s] was found without a matching [%1$s]', -'BBCode error 2' => '[%s] tag is empty', -'BBCode error 3' => '[%1$s] was opened within [%2$s], this is not allowed', -'BBCode error 4' => '[%s] was opened within itself, this is not allowed', -'BBCode error 5' => '[%1$s] was found without a matching [/%1$s]', -'BBCode error 6' => '[%s] tag had an empty attribute section', -'BBCode nested list' => '[list] tags cannot be nested', -'BBCode code problem' => 'There is a problem with your [code] tags', +'BBCode error no opening tag' => '[/%1$s] was found without a matching [%1$s]', +'BBCode error invalid nesting' => '[%1$s] was opened within [%2$s], this is not allowed', +'BBCode error invalid self-nesting' => '[%s] was opened within itself, this is not allowed', +'BBCode error no closing tag' => '[%1$s] was found without a matching [/%1$s]', +'BBCode error empty attribute' => '[%s] tag had an empty attribute section', +'BBCode code problem' => 'There is a problem with your [code] tags', // Stuff for the navigator (top of every page) -'Index' => 'Index', -'User list' => 'User list', -'Rules' => 'Rules', -'Search' => 'Search', -'Register' => 'Register', -'Login' => 'Login', -'Not logged in' => 'You are not logged in.', -'Profile' => 'Profile', -'Logout' => 'Logout', -'Logged in as' => 'Logged in as', -'Admin' => 'Administration', -'Last visit' => 'Last visit', -'Show new posts' => 'Show new posts since last visit', -'Mark all as read' => 'Mark all topics as read', -'Mark forum read' => 'Mark this forum as read', -'Link separator' => '', // The text that separates links in the navigator +'Index' => 'Index', +'User list' => 'User list', +'Rules' => 'Rules', +'Search' => 'Search', +'Register' => 'Register', +'Login' => 'Login', +'Not logged in' => 'You are not logged in.', +'Profile' => 'Profile', +'Logout' => 'Logout', +'Logged in as' => 'Logged in as', +'Admin' => 'Administration', +'Last visit' => 'Last visit', +'Show new posts' => 'Show new posts since last visit', +'Mark all as read' => 'Mark all topics as read', +'Mark forum read' => 'Mark this forum as read', +'Menu link separator' => '', // The text that separates links in the navigator +'Link separator' => ' | ', // The text that separates links in posts // Stuff for the page footer -'Board footer' => 'Board footer', -'Search links' => 'Search links', -'Show recent posts' => 'Show recent posts', -'Show unanswered posts' => 'Show unanswered posts', -'Show your posts' => 'Show your posts', -'Show subscriptions' => 'Show your subscribed topics', -'Jump to' => 'Jump to', -'Go' => ' Go ', // Submit button in forum jump -'Moderate topic' => 'Moderate topic', -'Move topic' => 'Move topic', -'Open topic' => 'Open topic', -'Close topic' => 'Close topic', -'Unstick topic' => 'Unstick topic', -'Stick topic' => 'Stick topic', -'Moderate forum' => 'Moderate forum', -'Delete posts' => 'Delete multiple posts', // Deprecated -'Powered by' => 'Powered by %s', +'Board footer' => 'Board footer', +'Search links' => 'Search links', +'Show recent posts' => 'Show recent posts', +'Show unanswered posts' => 'Show unanswered posts', +'Show your posts' => 'Show your posts', +'Show subscriptions' => 'Show your subscribed topics', +'Jump to' => 'Jump to', +'Go' => ' Go ', // Submit button in forum jump +'Moderate topic' => 'Moderate topic', +'Move topic' => 'Move topic', +'Open topic' => 'Open topic', +'Close topic' => 'Close topic', +'Unstick topic' => 'Unstick topic', +'Stick topic' => 'Stick topic', +'Moderate forum' => 'Moderate forum', +'Delete posts' => 'Delete multiple posts', // Deprecated +'Powered by' => 'Powered by %s', // Debug information -'Debug table' => 'Debug information', -'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', -'Query times' => 'Time (s)', -'Query' => 'Query', -'Total query time' => 'Total query time: %s', +'Debug table' => 'Debug information', +'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', +'Query times' => 'Time (s)', +'Query' => 'Query', +'Total query time' => 'Total query time: %s', // Email related notifications -'New user notification' => 'Alert - New registration', -'New user message' => 'User \'%s\' registered in the forums at %s', -'Banned email notification' => 'Alert - Banned e-mail detected', -'Banned email register message' => 'User \'%s\' registered with banned e-mail address: %s', -'Banned email change message' => 'User \'%s\' changed to banned e-mail address: %s', -'Duplicate email notification' => 'Alert - Duplicate e-mail detected', -'Duplicate email register message' => 'User \'%s\' registered with an e-mail address that also belongs to: %s', -'Duplicate email change message' => 'User \'%s\' changed to an e-mail address that also belongs to: %s', -'Report notification' => 'Report(%d) - \'%s\'', -'Report message 1' => 'User \'%s\' has reported the following message: %s', -'Report message 2' => 'Reason: %s', - -'User profile' => 'User profile: %s', -'Email signature' => 'Forum Mailer'."\n".'(Do not reply to this message)', +'New user notification' => 'Alert - New registration', +'New user message' => 'User \'%s\' registered in the forums at %s', +'Banned email notification' => 'Alert - Banned email detected', +'Banned email register message' => 'User \'%s\' registered with banned email address: %s', +'Banned email change message' => 'User \'%s\' changed to banned email address: %s', +'Banned email post message' => 'User \'%s\' posted with banned email address: %s', +'Duplicate email notification' => 'Alert - Duplicate email detected', +'Duplicate email register message' => 'User \'%s\' registered with an email address that also belongs to: %s', +'Duplicate email change message' => 'User \'%s\' changed to an email address that also belongs to: %s', +'Report notification' => 'Report(%d) - \'%s\'', +'Report message 1' => 'User \'%s\' has reported the following message: %s', +'Report message 2' => 'Reason: %s', + +'User profile' => 'User profile: %s', +'Post URL' => 'Post URL: %s', +'Email signature' => 'Forum Mailer'."\n".'(Do not reply to this message)', // For extern.php RSS feed -'RSS description' => 'The most recent topics at %s.', -'RSS description topic' => 'The most recent posts in %s.', -'RSS reply' => 'Re: ' // The topic subject will be appended to this string (to signify a reply) +'RSS description' => 'The most recent topics at %s.', +'RSS description topic' => 'The most recent posts in %s.', +'RSS reply' => 'Re: ' // The topic subject will be appended to this string (to signify a reply) ); diff --git a/upload/lang/English/delete.php b/upload/lang/English/delete.php index 7318889..49741cf 100644 --- a/upload/lang/English/delete.php +++ b/upload/lang/English/delete.php @@ -5,7 +5,7 @@ $lang_delete = array( 'Delete post' => 'Delete post', 'Warning' => 'Warning! If this is the first post in the topic, the whole topic will be deleted.', -'Delete' => 'Delete', // The submit button +'Delete' => 'Delete', // The submit button 'Post del redirect' => 'Post deleted. Redirecting …', 'Topic del redirect' => 'Topic deleted. Redirecting …' diff --git a/upload/lang/English/help.php b/upload/lang/English/help.php index bd83a66..808993b 100644 --- a/upload/lang/English/help.php +++ b/upload/lang/English/help.php @@ -16,10 +16,11 @@ $lang_help = array( 'Italic text' => 'Italic text', 'Red text' => 'Red text', 'Blue text' => 'Blue text', +'Heading text' => 'Heading text', 'Links and images' => 'Links and images', -'Links info' => 'You can create links to other documents or to e-mail addresses using the following tags:', -'My e-mail address' => 'My e-mail address', +'Links info' => 'You can create links to other documents or to email addresses using the following tags:', +'My email address' => 'My email address', 'Images info' => 'If you want to display an image you can use the img tag. The text appearing after the "=" sign in the opening tag is used for the alt attribute and should be included whenever possible.', 'Quotes' => 'Quotes', @@ -27,6 +28,7 @@ $lang_help = array( 'Quotes info 2' => 'If you don\'t want to quote anyone in particular, you can use the quote tag without specifying a name.', 'Quote text' => 'This is the text i want to quote.', 'produces quote box' => 'produces a quote box like this:', +'quote note' => 'Note: If a username contains the characters [ or ] you can enclose it in quote marks.', 'Code' => 'Code', 'Code info' => 'When displaying source code you should make sure that you use the code tag. Text displayed with the code tag will use a monospaced font and will not be affected by other tags.', @@ -37,14 +39,14 @@ $lang_help = array( 'Nested tags info' => 'BBCode can be nested to create more advanced formatting. For example:', 'Bold, underlined text' => 'Bold, underlined text', -'Lists' => 'Lists', -'List info' => 'To create a list you can use the list tag. You can create 3 types of lists using the list tag.', -'List text 1' => 'Example list item 1.', -'List text 2' => 'Example list item 2.', -'List text 3' => 'Example list item 3.', -'produces list' => 'produces a bulleted list.', -'produces decimal list' => 'produces a numbered list.', -'produces alpha list' => 'produces an alphabetically labelled list.', +'Lists' => 'Lists', +'List info' => 'To create a list you can use the list tag. You can create 3 types of lists using the list tag.', +'List text 1' => 'Example list item 1.', +'List text 2' => 'Example list item 2.', +'List text 3' => 'Example list item 3.', +'produces list' => 'produces a bulleted list.', +'produces decimal list' => 'produces a numbered list.', +'produces alpha list' => 'produces an alphabetically labelled list.', 'Smilies info' => 'If you like (and if it is enabled), the forum can convert a series of smilies to images representations of that smiley. This forum recognizes the following smilies and replaces them with images:' diff --git a/upload/lang/English/index.php b/upload/lang/English/index.php index fc46f68..736bd30 100644 --- a/upload/lang/English/index.php +++ b/upload/lang/English/index.php @@ -3,19 +3,18 @@ // Language definitions used in index.php $lang_index = array( -'Topics' => 'Topics', -'Moderators' => 'Moderators', -'Link to' => 'Link to', // As in "Link to http://fluxbb.org/" -'Empty board' => 'Board is empty.', -'Newest user' => 'Newest registered user', -'Users online' => 'Registered users online', -'Guests online' => 'Guests online', -'No of users' => 'Total number of registered users', -'No of topics' => 'Total number of topics', -'No of posts' => 'Total number of posts', -'Online' => 'Online', // As in "Online: User A, User B etc." -'Board info' => 'Board information', -'Board stats' => 'Board statistics', -'User info' => 'User information' +'Topics' => 'Topics', +'Link to' => 'Link to', // As in "Link to http://fluxbb.org/" +'Empty board' => 'Board is empty.', +'Newest user' => 'Newest registered user', +'Users online' => 'Registered users online', +'Guests online' => 'Guests online', +'No of users' => 'Total number of registered users', +'No of topics' => 'Total number of topics', +'No of posts' => 'Total number of posts', +'Online' => 'Online', // As in "Online: User A, User B etc." +'Board info' => 'Board information', +'Board stats' => 'Board statistics', +'User info' => 'User information' ); diff --git a/upload/lang/English/login.php b/upload/lang/English/login.php index 9ba3782..d2656dd 100644 --- a/upload/lang/English/login.php +++ b/upload/lang/English/login.php @@ -1,6 +1,6 @@ 'Forgotten your password?', 'Login redirect' => 'Logged in successfully. Redirecting …', 'Logout redirect' => 'Logged out. Redirecting …', -'No e-mail match' => 'There is no user registered with the e-mail address', +'No email match' => 'There is no user registered with the email address', 'Request pass' => 'Request password', -'Request pass legend' => 'Enter the e-mail address with which you registered', +'Request pass legend' => 'Enter the email address with which you registered', 'Request pass info' => 'A new password together with a link to activate the new password will be sent to that address.', 'Not registered' => 'Not registered yet?', 'Login legend' => 'Enter your username and password below', @@ -18,7 +18,7 @@ $lang_login = array( 'Login info' => 'If you have not registered or have forgotten your password click on the appropriate link below.', // Forget password mail stuff -'Forget mail' => 'An e-mail has been sent to the specified address with instructions on how to change your password. If it does not arrive you can contact the forum administrator at', +'Forget mail' => 'An email has been sent to the specified address with instructions on how to change your password. If it does not arrive you can contact the forum administrator at', 'Email flood' => 'This account has already requested a password reset in the past hour. Please wait a while before requesting a new password again.' ); diff --git a/upload/lang/English/mail_templates/activate_email.tpl b/upload/lang/English/mail_templates/activate_email.tpl index ebcbb03..16bcf7c 100644 --- a/upload/lang/English/mail_templates/activate_email.tpl +++ b/upload/lang/English/mail_templates/activate_email.tpl @@ -1,12 +1,12 @@ -Subject: Change e-mail address requested +Subject: Change email address requested Hello , -You have requested to have a new e-mail address assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your e-mail address you should just ignore this message. Only if you visit the activation page below will your e-mail address be changed. In order for the activation page to work, you must be logged in to the forum. +You have requested to have a new email address assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your email address you should just ignore this message. Only if you visit the activation page below will your email address be changed. In order for the activation page to work, you must be logged in to the forum. -To change your e-mail address, please visit the following page: +To change your email address, please visit the following page: --- +-- (Do not reply to this message) \ No newline at end of file diff --git a/upload/lang/English/mail_templates/activate_password.tpl b/upload/lang/English/mail_templates/activate_password.tpl index 1c0d708..b7458bd 100644 --- a/upload/lang/English/mail_templates/activate_password.tpl +++ b/upload/lang/English/mail_templates/activate_password.tpl @@ -9,6 +9,6 @@ Your new password is: To change your password, please visit the following page: --- +-- (Do not reply to this message) \ No newline at end of file diff --git a/upload/lang/English/mail_templates/form_email.tpl b/upload/lang/English/mail_templates/form_email.tpl index f721e02..393cb74 100644 --- a/upload/lang/English/mail_templates/form_email.tpl +++ b/upload/lang/English/mail_templates/form_email.tpl @@ -1,6 +1,6 @@ Subject: - from has sent you a message. You can reply to by replying to this e-mail. + from has sent you a message. You can reply to by replying to this email. The message reads as follows: ----------------------------------------------------------------------- @@ -9,5 +9,5 @@ The message reads as follows: ----------------------------------------------------------------------- --- +-- \ No newline at end of file diff --git a/upload/lang/English/mail_templates/new_reply.tpl b/upload/lang/English/mail_templates/new_reply.tpl index 5acffc3..5937203 100644 --- a/upload/lang/English/mail_templates/new_reply.tpl +++ b/upload/lang/English/mail_templates/new_reply.tpl @@ -6,6 +6,6 @@ The post is located at You can unsubscribe by going to --- +-- (Do not reply to this message) \ No newline at end of file diff --git a/upload/lang/English/mail_templates/new_reply_full.tpl b/upload/lang/English/mail_templates/new_reply_full.tpl index 3820152..521dea6 100644 --- a/upload/lang/English/mail_templates/new_reply_full.tpl +++ b/upload/lang/English/mail_templates/new_reply_full.tpl @@ -13,6 +13,6 @@ The post is located at You can unsubscribe by going to --- +-- (Do not reply to this message) \ No newline at end of file diff --git a/upload/lang/English/misc.php b/upload/lang/English/misc.php index 3f416cf..9b71cd6 100644 --- a/upload/lang/English/misc.php +++ b/upload/lang/English/misc.php @@ -3,81 +3,83 @@ // Language definitions used in various scripts $lang_misc = array( -'Mark read redirect' => 'All topics and forums have been marked as read. Redirecting …', -'Mark forum read redirect' => 'All topics in the specified forum have been marked as read. Redirecting …', +'Mark read redirect' => 'All topics and forums have been marked as read. Redirecting …', +'Mark forum read redirect' => 'All topics in the specified forum have been marked as read. Redirecting …', -// Send e-mail -'Form e-mail disabled' => 'The user you are trying to send an e-mail to has disabled form e-mail.', -'No e-mail subject' => 'You must enter a subject.', -'No e-mail message' => 'You must enter a message.', -'Too long e-mail message' => 'Messages cannot be longer than 65535 characters (64 KB).', -'Email flood' => 'At least %s seconds have to pass between sent emails. Please wait a while and try sending again.', -'E-mail sent redirect' => 'E-mail sent. Redirecting …', -'Send e-mail to' => 'Send e-mail to', -'E-mail subject' => 'Subject', -'E-mail message' => 'Message', -'E-mail disclosure note' => 'Please note that by using this form, your e-mail address will be disclosed to the recipient.', -'Write e-mail' => 'Write and submit your e-mail message', +// Send email +'Form email disabled' => 'The user you are trying to send an email to has disabled form email.', +'No email subject' => 'You must enter a subject.', +'No email message' => 'You must enter a message.', +'Too long email message' => 'Messages cannot be longer than 65535 characters (64 KB).', +'Email flood' => 'At least %s seconds have to pass between sent emails. Please wait a while and try sending again.', +'Email sent redirect' => 'Email sent. Redirecting …', +'Send email to' => 'Send email to', +'Email subject' => 'Subject', +'Email message' => 'Message', +'Email disclosure note' => 'Please note that by using this form, your email address will be disclosed to the recipient.', +'Write email' => 'Write and submit your email message', // Report -'No reason' => 'You must enter a reason.', -'Report flood' => 'At least %s seconds have to pass between reports. Please wait a while and try sending again.', -'Report redirect' => 'Post reported. Redirecting …', -'Report post' => 'Report post', -'Reason' => 'Reason', -'Reason desc' => 'Please enter a short reason why you are reporting this post', +'No reason' => 'You must enter a reason.', +'Report flood' => 'At least %s seconds have to pass between reports. Please wait a while and try sending again.', +'Report redirect' => 'Post reported. Redirecting …', +'Report post' => 'Report post', +'Reason' => 'Reason', +'Reason desc' => 'Please enter a short reason why you are reporting this post', // Subscriptions -'Already subscribed' => 'You are already subscribed to this topic.', -'Subscribe redirect' => 'Your subscription has been added. Redirecting …', -'Not subscribed' => 'You are not subscribed to this topic.', -'Unsubscribe redirect' => 'Your subscription has been removed. Redirecting …', +'Already subscribed' => 'You are already subscribed to this topic.', +'Subscribe redirect' => 'Your subscription has been added. Redirecting …', +'Not subscribed' => 'You are not subscribed to this topic.', +'Unsubscribe redirect' => 'Your subscription has been removed. Redirecting …', // General forum and topic moderation -'Moderate' => 'Moderate', -'Select' => 'Select', // the header of a column of checkboxes -'Move' => 'Move', -'Split' => 'Split', -'Delete' => 'Delete', -'Merge' => 'Merge', +'Moderate' => 'Moderate', +'Select' => 'Select', // the header of a column of checkboxes +'Move' => 'Move', +'Split' => 'Split', +'Delete' => 'Delete', +'Merge' => 'Merge', // Moderate forum -'Open' => 'Open', -'Close' => 'Close', -'Move topic' => 'Move topic', -'Move topics' => 'Move topics', -'Move legend' => 'Select destination of move', -'Move to' => 'Move to', -'Leave redirect' => 'Leave redirect topic(s)', -'Move topic redirect' => 'Topic moved. Redirecting …', -'Move topics redirect' => 'Topics moved. Redirecting …', -'Confirm delete legend' => 'Please confirm deletion', -'Delete topics' => 'Delete topics', -'Delete topics comply' => 'Are you sure you want to delete the selected topics?', -'Delete topics redirect' => 'Topics deleted. Redirecting …', -'Open topic redirect' => 'Topic opened. Redirecting …', -'Open topics redirect' => 'Topics opened. Redirecting …', -'Close topic redirect' => 'Topic closed. Redirecting …', -'Close topics redirect' => 'Topics closed. Redirecting …', -'No topics selected' => 'You must select at least one topic for move/delete/open/close.', +'Open' => 'Open', +'Close' => 'Close', +'Move topic' => 'Move topic', +'Move topics' => 'Move topics', +'Move legend' => 'Select destination of move', +'Move to' => 'Move to', +'Nowhere to move' => 'There are no forums into which you can move topics.', +'Leave redirect' => 'Leave redirect topic(s)', +'Move topic redirect' => 'Topic moved. Redirecting …', +'Move topics redirect' => 'Topics moved. Redirecting …', +'Confirm delete legend' => 'Please confirm deletion', +'Delete topics' => 'Delete topics', +'Delete topics comply' => 'Are you sure you want to delete the selected topics?', +'Delete topics redirect' => 'Topics deleted. Redirecting …', +'Open topic redirect' => 'Topic opened. Redirecting …', +'Open topics redirect' => 'Topics opened. Redirecting …', +'Close topic redirect' => 'Topic closed. Redirecting …', +'Close topics redirect' => 'Topics closed. Redirecting …', +'No topics selected' => 'You must select at least one topic for move/delete/open/close.', 'Not enough topics selected' => 'You must select at least two topics for merge.', -'Stick topic redirect' => 'Topic sticked. Redirecting …', -'Unstick topic redirect' => 'Topic unsticked. Redirecting …', -'Merge topics' => 'Merge topics', -'Merge topics redirect' => 'Topics merged. Redirecting …', -'Confirm merge legend' => 'Please confirm merge', -'New subject' => 'New subject', +'Stick topic redirect' => 'Topic sticked. Redirecting …', +'Unstick topic redirect' => 'Topic unsticked. Redirecting …', +'Merge topics' => 'Merge topics', +'Merge topics redirect' => 'Topics merged. Redirecting …', +'Confirm merge legend' => 'Please confirm merge', +'New subject' => 'New subject', // Split multiple posts in topic -'Confirm split legend' => 'Please confirm split of selected posts.', -'Split posts' => 'Split posts', -'Split posts comply' => 'Are you sure you want to split the selected posts?', -'Split posts redirect' => 'Posts have been split. Redirecting …', +'Confirm split legend' => 'Please confirm split of selected posts.', +'Split posts' => 'Split posts', +'Split posts comply' => 'Are you sure you want to split the selected posts?', +'Split posts redirect' => 'Posts have been split. Redirecting …', // Delete multiple posts in topic -'Delete posts' => 'Delete posts', -'Delete posts comply' => 'Are you sure you want to delete the selected posts?', -'Delete posts redirect' => 'Posts deleted. Redirecting …', -'No posts selected' => 'You must select at least one post to be deleted.' +'Delete posts' => 'Delete posts', +'Cannot delete first' => 'First post cannot be selected for deletion.', +'Delete posts comply' => 'Are you sure you want to delete the selected posts?', +'Delete posts redirect' => 'Posts deleted. Redirecting …', +'No posts selected' => 'You must select at least one post to be deleted.' ); diff --git a/upload/lang/English/post.php b/upload/lang/English/post.php index d7087ed..832adeb 100644 --- a/upload/lang/English/post.php +++ b/upload/lang/English/post.php @@ -4,30 +4,33 @@ $lang_post = array( // Post validation stuff (many are similiar to those in edit.php) -'No subject' => 'Topics must contain a subject.', -'Too long subject' => 'Subjects cannot be longer than 70 characters.', -'No message' => 'You must enter a message.', -'Too long message' => 'Posts cannot be longer that 65535 characters (64 KB).', +'No subject' => 'Topics must contain a subject.', +'Too long subject' => 'Subjects cannot be longer than 70 characters.', +'No message' => 'You must enter a message.', +'Too long message' => 'Posts cannot be longer that 65535 characters (64 KB).', +'All caps subject' => 'Subjects cannot contain only capital letters.', +'All caps message' => 'Posts cannot contain only capital letters.', // Posting -'Post errors' => 'Post errors', -'Post errors info' => 'The following errors need to be corrected before the message can be posted:', -'Post preview' => 'Post preview', -'Guest name' => 'Name', // For guests (instead of Username) -'Post redirect' => 'Post entered. Redirecting …', -'Post a reply' => 'Post a reply', -'Post new topic' => 'Post new topic', -'Hide smilies' => 'Never show smilies as icons for this post', -'Subscribe' => 'Subscribe to this topic', -'Topic review' => 'Topic review (newest first)', -'Flood start' => 'At least', -'flood end' => 'seconds have to pass between posts. Please wait a little while and try posting again.', -'Preview' => 'Preview', // submit button to preview message +'Post errors' => 'Post errors', +'Post errors info' => 'The following errors need to be corrected before the message can be posted:', +'Post preview' => 'Post preview', +'Guest name' => 'Name', // For guests (instead of Username) +'Post redirect' => 'Post entered. Redirecting …', +'Post a reply' => 'Post a reply', +'Post new topic' => 'Post new topic', +'Hide smilies' => 'Never show smilies as icons for this post', +'Subscribe' => 'Subscribe to this topic', +'Stay subscribed' => 'Stay subscribed to this topic', +'Topic review' => 'Topic review (newest first)', +'Flood start' => 'At least', +'flood end' => 'seconds have to pass between posts. Please wait a little while and try posting again.', +'Preview' => 'Preview', // submit button to preview message // Edit post -'Edit post legend' => 'Edit the post and submit changes', -'Silent edit' => 'Silent edit (don\'t display "Edited by ..." in topic view)', -'Edit post' => 'Edit post', -'Edit redirect' => 'Post updated. Redirecting …' +'Edit post legend' => 'Edit the post and submit changes', +'Silent edit' => 'Silent edit (don\'t display "Edited by ..." in topic view)', +'Edit post' => 'Edit post', +'Edit redirect' => 'Post updated. Redirecting …' ); diff --git a/upload/lang/English/prof_reg.php b/upload/lang/English/prof_reg.php index c183428..205f0c2 100644 --- a/upload/lang/English/prof_reg.php +++ b/upload/lang/English/prof_reg.php @@ -3,22 +3,21 @@ // Language definitions used in both profile.php and register.php $lang_prof_reg = array( -'E-mail legend' => 'Enter a valid e-mail address', -'E-mail legend 2' => 'Enter and confirm a valid e-mail address', +'Email legend' => 'Enter a valid email address', +'Email legend 2' => 'Enter and confirm a valid email address', 'Localisation legend' => 'Set your localisation options', -'Timezone' => 'Timezone', -'Timezone info' => 'For the forum to display times correctly you must select your local timezone.', -'DST' => 'Adjust for DST: This box should be checked properly so that the forum can display the correct time.', -'DST info' => 'Daylight savings is in effect (advance times by 1 hour).', +'Time zone' => 'Time zone', +'Time zone info' => 'For the forum to display times correctly you must select your local time zone. If Daylight Savings Time is in effect you should also check the option provided which will advance times by 1 hour.', +'DST' => 'Daylight Savings Time is in effect (advance time by 1 hour).', 'Time format' => 'Time format', 'Date format' => 'Date format', 'Default' => 'Default', 'Language' => 'Language', 'Language info' => 'You can choose which language you wish to use to view the forum.', -'E-mail setting info' => 'Select whether you want your e-mail address to be viewable to other users or not and if you want other users to be able to send you e-mail via the forum (form e-mail) or not.', -'E-mail setting 1' => 'Display your e-mail address.', -'E-mail setting 2' => 'Hide your e-mail address but allow form e-mail.', -'E-mail setting 3' => 'Hide your e-mail address and disallow form e-mail.', +'Email setting info' => 'Select whether you want your email address to be viewable to other users or not and if you want other users to be able to send you email via the forum (form email) or not.', +'Email setting 1' => 'Display your email address.', +'Email setting 2' => 'Hide your email address but allow form email.', +'Email setting 3' => 'Hide your email address and disallow form email.', 'Privacy options legend' => 'Set your privacy options', 'Confirm pass' => 'Confirm password', @@ -32,13 +31,12 @@ $lang_prof_reg = array( 'Banned username' => 'The username you entered is banned in this forum. Please choose another username.', 'Pass too short' => 'Passwords must be at least 4 characters long. Please choose another (longer) password.', 'Pass not match' => 'Passwords do not match.', -'Banned e-mail' => 'The e-mail address you entered is banned in this forum. Please choose another e-mail address.', -'Dupe e-mail' => 'Someone else is already registered with that e-mail address. Please choose another e-mail address.', +'Banned email' => 'The email address you entered is banned in this forum. Please choose another email address.', +'Dupe email' => 'Someone else is already registered with that email address. Please choose another email address.', 'Sig too long' => 'Signatures cannot be longer than', 'characters' => 'characters', 'Sig too many lines' => 'Signatures cannot have more than', 'lines' => 'lines', -'Signature quote/code' => 'The quote and code BBCodes are not allowed in signatures. Please go back and correct.', 'Bad ICQ' => 'You entered an invalid ICQ UIN. Please go back and correct.' ); diff --git a/upload/lang/English/profile.php b/upload/lang/English/profile.php index fada9bc..49973ff 100644 --- a/upload/lang/English/profile.php +++ b/upload/lang/English/profile.php @@ -4,144 +4,132 @@ $lang_profile = array( // Navigation and sections -'Profile menu' => 'Profile menu', -'Section essentials' => 'Essentials', -'Section personal' => 'Personal', -'Section messaging' => 'Messaging', -'Section personality' => 'Personality', -'Section display' => 'Display', -'Section privacy' => 'Privacy', -'Section admin' => 'Administration', +'Profile menu' => 'Profile menu', +'Section essentials' => 'Essentials', +'Section personal' => 'Personal', +'Section messaging' => 'Messaging', +'Section personality' => 'Personality', +'Section display' => 'Display', +'Section privacy' => 'Privacy', +'Section admin' => 'Administration', // Miscellaneous -'Username and pass legend' => 'Enter your username and password', -'Personal details legend' => 'Enter your personal details', -'Contact details legend' => 'Enter your messaging details', -'Options display' => 'Set your display options', -'Options post' => 'Set your post viewing options', -'User activity' => 'User activity', -'Paginate info' => 'Enter the number of topics and posts you wish to view on each page.', +'Username and pass legend' => 'Enter your username and password', +'Personal details legend' => 'Enter your personal details', +'Contact details legend' => 'Enter your messaging details', +'User activity' => 'User activity', +'Paginate info' => 'Enter the number of topics and posts you wish to view on each page.', // Password stuff -'Pass key bad' => 'The specified password activation key was incorrect or has expired. Please re-request a new password. If that fails, contact the forum administrator at', -'Pass updated' => 'Your password has been updated. You can now login with your new password.', -'Pass updated redirect' => 'Password updated. Redirecting …', -'Wrong pass' => 'Wrong old password.', -'Change pass' => 'Change password', -'Change pass legend' => 'Enter and confirm your new password', -'Old pass' => 'Old password', -'New pass' => 'New password', -'Confirm new pass' => 'Confirm new password', +'Pass key bad' => 'The specified password activation key was incorrect or has expired. Please re-request a new password. If that fails, contact the forum administrator at', +'Pass updated' => 'Your password has been updated. You can now login with your new password.', +'Pass updated redirect' => 'Password updated. Redirecting …', +'Wrong pass' => 'Wrong old password.', +'Change pass' => 'Change password', +'Change pass legend' => 'Enter and confirm your new password', +'Old pass' => 'Old password', +'New pass' => 'New password', +'Confirm new pass' => 'Confirm new password', -// E-mail stuff -'E-mail key bad' => 'The specified e-mail activation key was incorrect or has expired. Please re-request change of e-mail address. If that fails, contact the forum administrator at', -'E-mail updated' => 'Your e-mail address has been updated.', -'Activate e-mail sent' => 'An email has been sent to the specified address with instructions on how to activate the new e-mail address. If it doesn\'t arrive you can contact the forum administrator at', -'E-mail legend' => 'Enter your new e-mail address', -'E-mail instructions' => 'An e-mail will be sent to your new address with an activation link. You must click the link in the e-mail you receive to activate the new address.', -'Change e-mail' => 'Change e-mail address', -'New e-mail' => 'New e-mail', +// Email stuff +'Email key bad' => 'The specified email activation key was incorrect or has expired. Please re-request change of email address. If that fails, contact the forum administrator at', +'Email updated' => 'Your email address has been updated.', +'Activate email sent' => 'An email has been sent to the specified address with instructions on how to activate the new email address. If it doesn\'t arrive you can contact the forum administrator at', +'Email legend' => 'Enter your new email address', +'Email instructions' => 'An email will be sent to your new address with an activation link. You must click the link in the email you receive to activate the new address.', +'Change email' => 'Change email address', +'New email' => 'New email', // Avatar upload stuff -'Avatars disabled' => 'The administrator has disabled avatar support.', -'Too large ini' => 'The selected file was too large to upload. The server didn\'t allow the upload.', -'Partial upload' => 'The selected file was only partially uploaded. Please try again.', -'No tmp directory' => 'PHP was unable to save the uploaded file to a temporary location.', -'No file' => 'You did not select a file for upload.', -'Bad type' => 'The file you tried to upload is not of an allowed type. Allowed types are gif, jpeg and png.', -'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed', -'Too large' => 'The file you tried to upload is larger than the maximum allowed', -'pixels' => 'pixels', -'bytes' => 'bytes', -'Move failed' => 'The server was unable to save the uploaded file. Please contact the forum administrator at', -'Unknown failure' => 'An unknown error occurred. Please try again.', -'Avatar upload redirect' => 'Avatar uploaded. Redirecting …', -'Avatar deleted redirect' => 'Avatar deleted. Redirecting …', -'Avatar desc' => 'An avatar is a small image that will be displayed under your username in your posts. It must not be any bigger than', -'Upload avatar' => 'Upload avatar', -'Upload avatar legend' => 'Enter an avatar file to upload', -'Delete avatar' => 'Delete avatar', // only for admins -'File' => 'File', -'Upload' => 'Upload', // submit button +'Avatars disabled' => 'The administrator has disabled avatar support.', +'Too large ini' => 'The selected file was too large to upload. The server didn\'t allow the upload.', +'Partial upload' => 'The selected file was only partially uploaded. Please try again.', +'No tmp directory' => 'PHP was unable to save the uploaded file to a temporary location.', +'No file' => 'You did not select a file for upload.', +'Bad type' => 'The file you tried to upload is not of an allowed type. Allowed types are gif, jpeg and png.', +'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed', +'Too large' => 'The file you tried to upload is larger than the maximum allowed', +'pixels' => 'pixels', +'bytes' => 'bytes', +'Move failed' => 'The server was unable to save the uploaded file. Please contact the forum administrator at', +'Unknown failure' => 'An unknown error occurred. Please try again.', +'Avatar upload redirect' => 'Avatar uploaded. Redirecting …', +'Avatar deleted redirect' => 'Avatar deleted. Redirecting …', +'Avatar desc' => 'An avatar is a small image that will be displayed under your username in your posts. It must not be any bigger than', +'Upload avatar' => 'Upload avatar', +'Upload avatar legend' => 'Enter an avatar file to upload', +'Delete avatar' => 'Delete avatar', // only for admins +'File' => 'File', +'Upload' => 'Upload', // submit button // Form validation stuff -'Dupe username' => 'Someone else has already registered with that username. Please go back and try a different username.', -'Forbidden title' => 'The title you entered contains a forbidden word. You must choose a different title.', -'Profile redirect' => 'Profile updated. Redirecting …', +'Dupe username' => 'Someone else has already registered with that username. Please go back and try a different username.', +'Forbidden title' => 'The title you entered contains a forbidden word. You must choose a different title.', +'Profile redirect' => 'Profile updated. Redirecting …', // Profile display stuff -'Not activated' => 'This user hasn\'t activated his/her account yet. The account is activated when he/she logs in the first time.', -'Unknown' => '(Unknown)', // This is displayed when a user hasn't filled out profile field (e.g. Location) -'Private' => '(Private)', // This is displayed when a user does not want to receive e-mails -'No avatar' => '(No avatar)', -'Show posts' => 'Show all posts', -'Realname' => 'Real name', -'Location' => 'Location', -'Website' => 'Website', -'Jabber' => 'Jabber', -'ICQ' => 'ICQ', -'MSN' => 'MSN Messenger', -'AOL IM' => 'AOL IM', -'Yahoo' => 'Yahoo! Messenger', -'Avatar' => 'Avatar', -'Signature' => 'Signature', -'Sig max length' => 'Max length', -'Sig max lines' => 'Max lines', -'Avatar legend' => 'Set your avatar display options', -'Avatar info' => 'An avatar is a small image that will be displayed with all your posts. You can upload an avatar by clicking the link below.', -'Change avatar' => 'Change avatar', -'Signature legend' => 'Compose your signature', -'Signature info' => 'A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It\'s up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature.', -'Sig preview' => 'Current signature preview:', -'No sig' => 'No signature currently stored in profile.', -'Signature quote/code/list' => 'The quote, code and list BBCodes are not allowed in signatures.', -'Topics per page' => 'Topics', -'Topics per page info' => 'This setting controls how many topics are displayed per page when you view a forum. If you are uncertain about what to use, you can just leave it blank and the forum default will be used.', -'Posts per page' => 'Posts', -'Posts per page info' => 'This setting controls how many posts are displayed per page when you view a topic. If you are uncertain about what to use, you can just leave it blank and the forum default will be used.', -'Leave blank' => 'Leave blank to use forum default.', -'Subscription legend' => 'Set your subscription options', -'Notify full' => 'Include post in subscription e-mails.', -'Notify full info' => 'With this enabled, a plain text version of the new post will be included in subscription notification e-mails.', -'Auto notify full' => 'Automatically subscribe to topics when posting.', -'Auto notify full info' => 'With this enabled, you will automatically be subscribed to every topic you post in.', -'Show smilies' => 'Show smilies as graphic icons', -'Show smilies info' => 'If you enable this option, small images will be displayed instead of text smilies.', -'Show images' => 'Show images in posts.', -'Show images info' => 'Disable this if you don\'t want to see images in posts (i.e. images displayed with the [img]-tag).', -'Show images sigs' => 'Show images in user signatures.', -'Show images sigs info' => 'Disable this if you don\'t want to see images in signatures (i.e. images displayed with the [img]-tag).', -'Show avatars' => 'Show user avatars in posts.', -'Show avatars info' => 'This option toggles whether user avatar images will be displayed in posts or not.', -'Show sigs' => 'Show user signatures.', -'Show sigs info' => 'Enable if you would like to see user signatures.', -'Style legend' => 'Select your preferred style', -'Style info' => 'If you like you can use a different visual style for this forum.', -'Admin note' => 'Admin note', -'Pagination legend' => 'Enter your pagination options', -'Post display legend' => 'Set your options for viewing posts', -'Post display info' => 'If you are on a slow connection, disabling these options, particularly showing images in posts and signatures, will make pages load faster.', -'Instructions' => 'When you update your profile, you will be redirected back to this page.', +'Users profile' => '%s\'s profile', +'Unknown' => '(Unknown)', // This is displayed when a user hasn't filled out profile field (e.g. Location) +'Private' => '(Private)', // This is displayed when a user does not want to receive emails +'No avatar' => '(No avatar)', +'Show posts' => 'Show all posts', +'Realname' => 'Real name', +'Location' => 'Location', +'Website' => 'Website', +'Jabber' => 'Jabber', +'ICQ' => 'ICQ', +'MSN' => 'MSN Messenger', +'AOL IM' => 'AOL IM', +'Yahoo' => 'Yahoo! Messenger', +'Avatar' => 'Avatar', +'Signature' => 'Signature', +'Sig max length' => 'Max length', +'Sig max lines' => 'Max lines', +'Avatar legend' => 'Set your avatar display options', +'Avatar info' => 'An avatar is a small image that will be displayed with all your posts. You can upload an avatar by clicking the link below.', +'Change avatar' => 'Change avatar', +'Signature legend' => 'Compose your signature', +'Signature info' => 'A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It\'s up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature.', +'Sig preview' => 'Current signature preview:', +'No sig' => 'No signature currently stored in profile.', +'Signature quote/code/list/h' => 'The quote, code, list, and heading BBCodes are not allowed in signatures.', +'Topics per page' => 'Topics', +'Posts per page' => 'Posts', +'Leave blank' => 'Leave blank to use forum default.', +'Subscription legend' => 'Set your subscription options', +'Notify full' => 'Include a plain text version of new posts in subscription notification emails.', +'Auto notify full' => 'Automatically subscribe to every topic you post in.', +'Show smilies' => 'Show smilies as graphic icons', +'Show images' => 'Show images in posts.', +'Show images sigs' => 'Show images in user signatures.', +'Show avatars' => 'Show user avatars in posts.', +'Show sigs' => 'Show user signatures.', +'Style legend' => 'Select your preferred style', +'Style info' => 'If you like you can use a different visual style for this forum.', +'Admin note' => 'Admin note', +'Pagination legend' => 'Enter your pagination options', +'Post display legend' => 'Set your options for viewing posts', +'Post display info' => 'If you are on a slow connection, disabling these options, particularly showing images in posts and signatures, will make pages load faster.', +'Instructions' => 'When you update your profile, you will be redirected back to this page.', // Administration stuff -'Group membership legend' => 'Choose user group', -'Save' => 'Save', -'Set mods legend' => 'Set moderator access', -'Moderator in' => 'Moderator in', -'Moderator in info' => 'Choose what forums this user should be allowed to moderate. Note: This only applies to moderators. Administrators always have full permissions in all forums.', -'Update forums' => 'Update forums', -'Delete ban legend' => 'Delete (administrators only) or ban user', -'Delete user' => 'Delete user', -'Ban user' => 'Ban user', -'Confirm delete legend' => 'Important: read before deleting user', -'Confirm delete user' => 'Confirm delete user', -'Confirmation info' => 'Please confirm that you want to delete the user', // the username will be appended to this string -'Delete warning' => 'Warning! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by this user, the posts can only be deleted manually at a later time.', -'Delete posts' => 'Delete any posts and topics this user has made.', -'Delete' => 'Delete', // submit button (confirm user delete) -'User delete redirect' => 'User deleted. Redirecting …', -'Group membership redirect' => 'Group membership saved. Redirecting …', -'Update forums redirect' => 'Forum moderator rights updated. Redirecting …', -'Ban redirect' => 'Redirecting …' +'Group membership legend' => 'Choose user group', +'Save' => 'Save', +'Set mods legend' => 'Set moderator access', +'Moderator in info' => 'Choose what forums this user should be allowed to moderate. Note: This only applies to moderators. Administrators always have full permissions in all forums.', +'Update forums' => 'Update forums', +'Delete ban legend' => 'Delete (administrators only) or ban user', +'Delete user' => 'Delete user', +'Ban user' => 'Ban user', +'Confirm delete legend' => 'Important: read before deleting user', +'Confirm delete user' => 'Confirm delete user', +'Confirmation info' => 'Please confirm that you want to delete the user', // the username will be appended to this string +'Delete warning' => 'Warning! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by this user, the posts can only be deleted manually at a later time.', +'Delete posts' => 'Delete any posts and topics this user has made.', +'Delete' => 'Delete', // submit button (confirm user delete) +'User delete redirect' => 'User deleted. Redirecting …', +'Group membership redirect' => 'Group membership saved. Redirecting …', +'Update forums redirect' => 'Forum moderator rights updated. Redirecting …', +'Ban redirect' => 'Redirecting …' ); diff --git a/upload/lang/English/register.php b/upload/lang/English/register.php index ad8cc13..0873746 100644 --- a/upload/lang/English/register.php +++ b/upload/lang/English/register.php @@ -14,25 +14,24 @@ $lang_register = array( 'Register' => 'Register', // Form validation stuff (some of these are also used in post.php) -'Registration errors' => 'Registration errors', -'Registration errors info' => 'The following errors need to be corrected before you can register:', +'Registration errors' => 'Registration errors', +'Registration errors info' => 'The following errors need to be corrected before you can register:', 'Username censor' => 'The username you entered contains one or more censored words. Please choose a different username.', 'Username dupe 1' => 'Someone is already registered with the username', 'Username dupe 2' => 'The username you entered is too similar. The username must differ from that by at least one alphanumerical character (a-z or 0-9). Please choose a different username.', -'E-mail not match' => 'E-mail addresses do not match.', +'Email not match' => 'Email addresses do not match.', -// Registration e-mail stuff -'Reg e-mail' => 'Thank you for registering. Your password has been sent to the specified address. If it doesn\'t arrive you can contact the forum administrator at', +// Registration email stuff +'Reg email' => 'Thank you for registering. Your password has been sent to the specified address. If it doesn\'t arrive you can contact the forum administrator at', 'Reg complete' => 'Registration complete. Logging in and redirecting …', // Register info 'Desc 1' => 'Registration will grant you access to a number of features and capabilities otherwise unavailable. These functions include the ability to edit and delete posts, design your own signature that accompanies your posts and much more. If you have any questions regarding this forum you should ask an administrator.', 'Desc 2' => 'Below is a form you must fill out in order to register. Once you are registered you should visit your profile and review the different settings you can change. The fields below only make up a small part of all the settings you can alter in your profile.', 'Username legend' => 'Please enter a username between 2 and 25 characters long', -'Pass legend 1' => 'Please enter and confirm your chosen password', -'Pass legend 2' => 'Please read the instructions below', +'Pass legend' => 'Please enter and confirm your chosen password', 'Pass info' => 'Passwords can be between 4 and 16 characters long. Passwords are case sensitive.', -'E-mail info' => 'You must enter a valid e-mail address as your randomly generated password will be sent to that address.', -'Confirm e-mail' => 'Confirm e-mail address', +'Email info' => 'You must enter a valid email address as your randomly generated password will be sent to that address.', +'Confirm email' => 'Confirm email address', ); diff --git a/upload/lang/English/search.php b/upload/lang/English/search.php index bea0731..d6a5081 100644 --- a/upload/lang/English/search.php +++ b/upload/lang/English/search.php @@ -43,6 +43,7 @@ $lang_search = array( 'No new posts' => 'There are no topics with new posts since your last visit.', 'No recent posts' => 'No new posts have been made within the last 24 hours.', 'No unanswered' => 'There are no unanswered posts in this forum.', -'Go to post' => 'Go to post' +'Go to post' => 'Go to post', +'Go to topic' => 'Go to topic' ); diff --git a/upload/lang/English/topic.php b/upload/lang/English/topic.php index 0b4629b..0b32bae 100644 --- a/upload/lang/English/topic.php +++ b/upload/lang/English/topic.php @@ -5,9 +5,9 @@ $lang_topic = array( 'Post reply' => 'Post reply', 'Topic closed' => 'Topic closed', -'From' => 'From', // User location -'IP' => 'IP', -'Note' => 'Note', // Admin note +'From' => 'From', // User location +'IP' => 'IP', +'Note' => 'Note', // Admin note 'Website' => 'Website', 'Guest' => 'Guest', 'Online' => 'Online', @@ -21,8 +21,6 @@ $lang_topic = array( 'Unsubscribe' => 'Unsubscribe', 'Subscribe' => 'Subscribe to this topic', 'Quick post' => 'Quick post', - -'Link separator' => ' | ', // The text that separates links in posts (website, e-mail, report, edit etc.) 'Mod controls' => 'Moderator controls' ); diff --git a/upload/lang/English/userlist.php b/upload/lang/English/userlist.php index 77e94e8..be6dc05 100644 --- a/upload/lang/English/userlist.php +++ b/upload/lang/English/userlist.php @@ -3,10 +3,10 @@ // Language definitions used in userlist.php $lang_ul = array( -'User find legend' => 'Find and sort users', -'User search info' => 'Enter a username to search for and/or a user group to filter by. The username field can be left blank. Use the wildcard character * for partial matches. Sort users by name, date registered or number of posts and in ascending/descending order.', -'User group' => 'User group', -'No of posts' => 'No. of posts', -'All users' => 'All' +'User find legend' => 'Find and sort users', +'User search info' => 'Enter a username to search for and/or a user group to filter by. The username field can be left blank. Use the wildcard character * for partial matches. Sort users by name, date registered or number of posts and in ascending/descending order.', +'User group' => 'User group', +'No of posts' => 'No. of posts', +'All users' => 'All' ); diff --git a/upload/login.php b/upload/login.php index ff4b614..570d3a4 100644 --- a/upload/login.php +++ b/upload/login.php @@ -1,27 +1,12 @@ escape($form_username).'\'' : 'LOWER(username)=LOWER(\''.$db->escape($form_username).'\')'; - $result = $db->query('SELECT id, group_id, password FROM '.$db->prefix.'users WHERE '.$username_sql) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); - list($user_id, $group_id, $db_password_hash) = $db->fetch_row($result); + $result = $db->query('SELECT * FROM '.$db->prefix.'users WHERE '.$username_sql) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); + $cur_user = $db->fetch_assoc($result); $authorized = false; - if (!empty($db_password_hash)) + if (!empty($cur_user['password'])) { - $sha1_in_db = (strlen($db_password_hash) == 40) ? true : false; + $sha1_in_db = (strlen($cur_user['password']) == 40) ? true : false; $sha1_available = (function_exists('sha1') || function_exists('mhash')) ? true : false; - $form_password_hash = pun_hash($form_password); // This could result in either an SHA-1 or an MD5 hash (depends on $sha1_available) + $form_password_hash = pun_hash($form_password); // This could result in either an SHA-1 or an MD5 hash (depends on $sha1_available) - if ($sha1_in_db && $sha1_available && $db_password_hash == $form_password_hash) - $authorized = true; - else if (!$sha1_in_db && $db_password_hash == md5($form_password)) + // If there is a salt in the database we have upgraded from 1.3-legacy though havent yet logged in + if (!empty($cur_user['salt'])) { - $authorized = true; + if (sha1($cur_user['salt'].sha1($form_password)) == $cur_user['password']) + { + $authorized = true; - if ($sha1_available) // There's an MD5 hash in the database, but SHA1 hashing is available, so we update the DB - $db->query('UPDATE '.$db->prefix.'users SET password=\''.$form_password_hash.'\' WHERE id='.$user_id) or error('Unable to update user password', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET password=\''.$form_password_hash.'\', salt=NULL WHERE id='.$cur_user['id']) or error('Unable to update user password', __FILE__, __LINE__, $db->error()); + } + } + else + { + if ($sha1_in_db && $sha1_available && $cur_user['password'] == $form_password_hash) + $authorized = true; + else if (!$sha1_in_db && $cur_user['password'] == md5($form_password)) + { + $authorized = true; + + if ($sha1_available) // There's an MD5 hash in the database, but SHA1 hashing is available, so we update the DB + $db->query('UPDATE '.$db->prefix.'users SET password=\''.$form_password_hash.'\' WHERE id='.$cur_user['id']) or error('Unable to update user password', __FILE__, __LINE__, $db->error()); + } } } @@ -70,14 +68,14 @@ if (isset($_POST['form_sent']) && $action == 'in') message($lang_login['Wrong user/pass'].' '.$lang_login['Forgotten pass'].''); // Update the status if this is the first time the user logged in - if ($group_id == PUN_UNVERIFIED) - $db->query('UPDATE '.$db->prefix.'users SET group_id='.$pun_config['o_default_user_group'].' WHERE id='.$user_id) or error('Unable to update user status', __FILE__, __LINE__, $db->error()); + if ($cur_user['group_id'] == PUN_UNVERIFIED) + $db->query('UPDATE '.$db->prefix.'users SET group_id='.$pun_config['o_default_user_group'].' WHERE id='.$cur_user['id']) or error('Unable to update user status', __FILE__, __LINE__, $db->error()); // Remove this users guest entry from the online list $db->query('DELETE FROM '.$db->prefix.'online WHERE ident=\''.$db->escape(get_remote_address()).'\'') or error('Unable to delete from online list', __FILE__, __LINE__, $db->error()); $expire = ($save_pass == '1') ? time() + 1209600 : time() + $pun_config['o_timeout_visit']; - pun_setcookie($user_id, $form_password_hash, $expire); + pun_setcookie($cur_user['id'], $form_password_hash, $expire); // Reset tracked topics set_tracked_topics(null); @@ -94,7 +92,7 @@ else if ($action == 'out') exit; } - // Remove user from "users online" list. + // Remove user from "users online" list $db->query('DELETE FROM '.$db->prefix.'online WHERE user_id='.$pun_user['id']) or error('Unable to delete from online list', __FILE__, __LINE__, $db->error()); // Update last_visit (make sure there's something to update it with) @@ -116,10 +114,10 @@ else if ($action == 'forget' || $action == 'forget_2') { require PUN_ROOT.'include/email.php'; - // Validate the email-address + // Validate the email address $email = strtolower(trim($_POST['req_email'])); if (!is_valid_email($email)) - message($lang_common['Invalid e-mail']); + message($lang_common['Invalid email']); $result = $db->query('SELECT id, username, last_email_sent FROM '.$db->prefix.'users WHERE email=\''.$db->escape($email).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); @@ -133,7 +131,7 @@ else if ($action == 'forget' || $action == 'forget_2') $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); $mail_message = trim(substr($mail_tpl, $first_crlf)); - // Do the generic replacements first (they apply to all e-mails sent out here) + // Do the generic replacements first (they apply to all emails sent out here) $mail_message = str_replace('', $pun_config['o_base_url'].'/', $mail_message); $mail_message = str_replace('', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message); @@ -160,12 +158,12 @@ else if ($action == 'forget' || $action == 'forget_2') message($lang_login['Forget mail'].' '.$pun_config['o_admin_email'].'.'); } else - message($lang_login['No e-mail match'].' '.htmlspecialchars($email).'.'); + message($lang_login['No email match'].' '.htmlspecialchars($email).'.'); } $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_login['Request pass']; - $required_fields = array('req_email' => $lang_common['E-mail']); + $required_fields = array('req_email' => $lang_common['Email']); $focus_element = array('request_pass', 'req_email'); require PUN_ROOT.'header.php'; @@ -184,7 +182,7 @@ else if ($action == 'forget' || $action == 'forget_2') -

    +

    @@ -198,7 +196,7 @@ if (!$pun_user['is_guest']) header('Location: index.php'); // Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login) -$redirect_url = (isset($_SERVER['HTTP_REFERER']) && preg_match('#^'.preg_quote($pun_config['o_base_url']).'/(.*?)\.php#i', $_SERVER['HTTP_REFERER'])) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : 'index.php'; +$redirect_url = (isset($_SERVER['HTTP_REFERER']) && preg_match('#^'.preg_quote($pun_config['o_base_url']).'/(.*?)\.php#i', $_SERVER['HTTP_REFERER'])) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : $pun_config['o_base_url'].'/index.php'; $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Login']; $required_fields = array('req_username' => $lang_common['Username'], 'req_password' => $lang_common['Password']); @@ -213,23 +211,23 @@ require PUN_ROOT.'header.php';
    -
    - - - - - -
    - -
    - -

    -

       -

    +
    + + + + + +
    +
    + +

    +

       +

    +
    -

    +

    diff --git a/upload/misc.php b/upload/misc.php index aabdc32..539a8fa 100644 --- a/upload/misc.php +++ b/upload/misc.php @@ -1,27 +1,12 @@

    -
    -

    +
    +
    @@ -110,7 +95,7 @@ else if (isset($_GET['email'])) list($recipient, $recipient_email, $email_setting) = $db->fetch_row($result); if ($email_setting == 2 && !$pun_user['is_admmod']) - message($lang_misc['Form e-mail disabled']); + message($lang_misc['Form email disabled']); if (isset($_POST['form_sent'])) @@ -120,16 +105,16 @@ else if (isset($_GET['email'])) $message = pun_trim($_POST['req_message']); if ($subject == '') - message($lang_misc['No e-mail subject']); + message($lang_misc['No email subject']); else if ($message == '') - message($lang_misc['No e-mail message']); + message($lang_misc['No email message']); else if (strlen($message) > 65535) - message($lang_misc['Too long e-mail message']); + message($lang_misc['Too long email message']); if ($pun_user['last_email_sent'] != '' && (time() - $pun_user['last_email_sent']) < $pun_user['g_email_flood'] && (time() - $pun_user['last_email_sent']) >= 0) message(sprintf($lang_misc['Email flood'], $pun_user['g_email_flood'])); - // Load the "form e-mail" template + // Load the "form email" template $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/form_email.tpl')); // The first row contains the subject @@ -149,38 +134,38 @@ else if (isset($_GET['email'])) $db->query('UPDATE '.$db->prefix.'users SET last_email_sent='.time().' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error()); - redirect(htmlspecialchars($_POST['redirect_url']), $lang_misc['E-mail sent redirect']); + redirect(htmlspecialchars($_POST['redirect_url']), $lang_misc['Email sent redirect']); } - // Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to the users profile after the e-mail is sent) + // Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to the users profile after the email is sent) $redirect_url = (isset($_SERVER['HTTP_REFERER']) && preg_match('#^'.preg_quote($pun_config['o_base_url']).'/(.*?)\.php#i', $_SERVER['HTTP_REFERER'])) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : 'index.php'; - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Send e-mail to'].' '.pun_htmlspecialchars($recipient); - $required_fields = array('req_subject' => $lang_misc['E-mail subject'], 'req_message' => $lang_misc['E-mail message']); + $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Send email to'].' '.pun_htmlspecialchars($recipient); + $required_fields = array('req_subject' => $lang_misc['Email subject'], 'req_message' => $lang_misc['Email message']); $focus_element = array('email', 'req_subject'); require PUN_ROOT.'header.php'; ?>
    -

    +

    - +
    -
    -

    +

    @@ -205,7 +190,7 @@ else if (isset($_GET['report'])) $reason = pun_linebreaks(pun_trim($_POST['req_reason'])); if ($reason == '') message($lang_misc['No reason']); - + if ($pun_user['last_email_sent'] != '' && (time() - $pun_user['last_email_sent']) < $pun_user['g_email_flood'] && (time() - $pun_user['last_email_sent']) >= 0) message(sprintf($lang_misc['Report flood'], $pun_user['g_email_flood'])); @@ -227,12 +212,12 @@ else if (isset($_GET['report'])) if ($pun_config['o_report_method'] == 0 || $pun_config['o_report_method'] == 2) $db->query('INSERT INTO '.$db->prefix.'reports (post_id, topic_id, forum_id, reported_by, created, message) VALUES('.$post_id.', '.$topic_id.', '.$forum_id.', '.$pun_user['id'].', '.time().', \''.$db->escape($reason).'\')' ) or error('Unable to create report', __FILE__, __LINE__, $db->error()); - // Should we e-mail the report? + // Should we email the report? if ($pun_config['o_report_method'] == 1 || $pun_config['o_report_method'] == 2) { // We send it to the complete mailing-list in one swoop if ($pun_config['o_mailing_list'] != '') - { + { $mail_subject = sprintf($lang_common['Report notification'], $forum_id, $subject); $mail_message = sprintf($lang_common['Report message 1'], $pun_user['username'], $pun_config['o_base_url'].'/viewtopic.php?pid='.$post_id.'#p'.$post_id)."\n"; $mail_message .= sprintf($lang_common['Report message 2'], $reason)."\n"; @@ -243,7 +228,7 @@ else if (isset($_GET['report'])) pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); } } - + $db->query('UPDATE '.$db->prefix.'users SET last_email_sent='.time().' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error()); redirect('viewtopic.php?pid='.$post_id.'#p'.$post_id, $lang_misc['Report redirect']); @@ -269,7 +254,7 @@ else if (isset($_GET['report'])) -

    +

    diff --git a/upload/moderate.php b/upload/moderate.php index bbe00b6..3f651b1 100644 --- a/upload/moderate.php +++ b/upload/moderate.php @@ -1,34 +1,19 @@ -

    +

    @@ -234,7 +219,7 @@ if (isset($_GET['tid'])) -

    +

    @@ -273,8 +258,12 @@ if (isset($_GET['tid'])) ?>
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    -
    •  » 
    •  » 
    @@ -284,8 +273,7 @@ if (isset($_GET['tid'])) require PUN_ROOT.'include/parser.php'; - $bg_switch = true; // Used for switching background color in posts - $post_count = 0; // Keep track of post numbers + $post_count = 0; // Keep track of post numbers // Retrieve the posts (and their respective poster) $result = $db->query('SELECT u.title, u.num_posts, g.g_id, g.g_user_title, p.id, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE p.topic_id='.$tid.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); @@ -294,7 +282,7 @@ if (isset($_GET['tid'])) { $post_count++; - // If the poster is a registered user. + // If the poster is a registered user if ($cur_post['poster_id'] > 1) { if ($pun_user['g_view_users'] == '1') @@ -316,35 +304,35 @@ if (isset($_GET['tid'])) $user_title = $lang_topic['Guest']; } - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' roweven' : ' rowodd'; - // Perform the main parsing of the message (BBCode, smilies, censor words etc) $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); ?> -
    - -

    # 

    +
    +

    #

    -
    -
    -
    -
    -
    -
    -
    -

    -
    - -'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')

    '."\n"; ?> +
    +
    +
    +
    +
    +
    +
    +
    +

    +
    + +'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')

    '."\n"; ?> +
    - 1) echo '

    '."\n" ?>
    -
    +
    +
    +
    +
    1) ? '

    ' : '

    '.$lang_misc['Cannot delete first'].'

    ' ?>
    +
    @@ -357,10 +345,7 @@ if (isset($_GET['tid']))
    -

    - /> - /> -

    +

    /> />

    @@ -392,7 +377,7 @@ if (isset($_REQUEST['move_topics']) || isset($_POST['move_topics_to'])) if ($db->num_rows($result) != count($topics)) message($lang_common['Bad request']); - // Delete any redirect topics if there are any (only if we moved/copied the topic back to where it where it was once moved from) + // Delete any redirect topics if there are any (only if we moved/copied the topic back to where it was once moved from) $db->query('DELETE FROM '.$db->prefix.'topics WHERE forum_id='.$move_to_forum.' AND moved_to IN('.implode(',',$topics).')') or error('Unable to delete redirect topics', __FILE__, __LINE__, $db->error()); // Move the topic(s) @@ -412,8 +397,8 @@ if (isset($_REQUEST['move_topics']) || isset($_POST['move_topics_to'])) } } - update_forum($fid); // Update the forum FROM which the topic was moved - update_forum($move_to_forum); // Update the forum TO which the topic was moved + update_forum($fid); // Update the forum FROM which the topic was moved + update_forum($move_to_forum); // Update the forum TO which the topic was moved $redirect_msg = (count($topics) > 1) ? $lang_misc['Move topics redirect'] : $lang_misc['Move topic redirect']; redirect('viewforum.php?id='.$move_to_forum, $redirect_msg); @@ -437,6 +422,10 @@ if (isset($_REQUEST['move_topics']) || isset($_POST['move_topics_to'])) $action = 'single'; } + $result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); + if ($db->num_rows($result) < 2) + message($lang_misc['Nowhere to move']); + $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Moderate'; require PUN_ROOT.'header.php'; @@ -454,12 +443,10 @@ if (isset($_REQUEST['move_topics']) || isset($_POST['move_topics_to']))

    +

    @@ -573,7 +560,7 @@ else if (isset($_POST['merge_topics']) || isset($_POST['merge_topics_comply']))
    -

    +

    @@ -610,14 +597,14 @@ else if (isset($_POST['delete_topics']) || isset($_POST['delete_topics_comply']) // Delete any subscriptions $db->query('DELETE FROM '.$db->prefix.'subscriptions WHERE topic_id IN('.$topics.')') or error('Unable to delete subscriptions', __FILE__, __LINE__, $db->error()); - // Create a list of the post ID's in this topic and then strip the search index + // Create a list of the post IDs in this topic and then strip the search index $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id IN('.$topics.')') or error('Unable to fetch posts', __FILE__, __LINE__, $db->error()); $post_ids = ''; while ($row = $db->fetch_row($result)) $post_ids .= ($post_ids != '') ? ','.$row[0] : $row[0]; - // We have to check that we actually have a list of post ID's since we could be deleting just a redirect topic + // We have to check that we actually have a list of post IDs since we could be deleting just a redirect topic if ($post_ids != '') strip_search_index($post_ids); @@ -647,7 +634,7 @@ else if (isset($_POST['delete_topics']) || isset($_POST['delete_topics_comply']) -

    +

    @@ -754,8 +741,11 @@ $paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'moderate.ph ?>
    +
      +
    • +
    • » 
    • +
    -
    •  
    • » 
    @@ -781,7 +771,7 @@ $paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'moderate.ph // Select topics $result = $db->query('SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to FROM '.$db->prefix.'topics WHERE forum_id='.$fid.' ORDER BY sticky DESC, last_post DESC LIMIT '.$start_from.', '.$pun_user['disp_topics']) or error('Unable to fetch topic list for forum', __FILE__, __LINE__, $db->error()); -// If there are topics in this forum. +// If there are topics in this forum if ($db->num_rows($result)) { $button_status = ''; @@ -824,15 +814,11 @@ if ($db->num_rows($result)) $item_status .= ' inew'; $icon_type = 'icon inew'; $subject = ''.$subject.''; - $subject_new_posts = ''.$lang_common['New posts'].' ]'; + $subject_new_posts = '[ '.$lang_common['New posts'].' ]'; } else $subject_new_posts = null; - // We won't display "the dot", but we add the spaces anyway - if ($pun_config['o_show_dot'] == '1') - $subject = '  '.$subject; - if ($cur_topic['sticky'] == '1') { $subject = ''.$lang_forum['Sticky'].': '.$subject; @@ -843,14 +829,14 @@ if ($db->num_rows($result)) $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); if ($num_pages_topic > 1) - $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]'; + $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]'; else $subject_multipage = null; // Should we show the "New posts" and/or the multipage links? if (!empty($subject_new_posts) || !empty($subject_multipage)) { - $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : ''); + $subject .= !empty($subject_new_posts) ? ' '.$subject_new_posts : ''; $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : ''; } @@ -859,7 +845,9 @@ if ($db->num_rows($result))
    - +
    + +
    @@ -888,7 +876,7 @@ else
    -

    />   />   />   />   />

    +

    /> /> /> /> />

    diff --git a/upload/plugins/AMP_Example.php b/upload/plugins/AMP_Example.php index 178cf89..7d12666 100644 --- a/upload/plugins/AMP_Example.php +++ b/upload/plugins/AMP_Example.php @@ -1,26 +1,12 @@ 0 && $fid > 0) // Fetch some info about the topic and/or the forum if ($tid) - $result = $db->query('SELECT f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.subject, t.closed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$tid) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); + $result = $db->query('SELECT f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.subject, t.closed, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$tid) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); else $result = $db->query('SELECT f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fid) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); @@ -46,6 +31,7 @@ if (!$db->num_rows($result)) message($lang_common['Bad request']); $cur_posting = $db->fetch_assoc($result); +$is_subscribed = $tid && $cur_posting['is_subscribed']; // Is someone trying to post into a redirect forum? if ($cur_posting['redirect_url'] != '') @@ -89,11 +75,11 @@ if (isset($_POST['form_sent'])) $errors[] = $lang_post['No subject']; else if (pun_strlen($subject) > 70) $errors[] = $lang_post['Too long subject']; - else if ($pun_config['p_subject_all_caps'] == '0' && strtoupper($subject) == $subject && !$pun_user['is_admmod']) - $subject = ucwords(strtolower($subject)); + else if ($pun_config['p_subject_all_caps'] == '0' && is_all_uppercase($subject) && !$pun_user['is_admmod']) + $errors[] = $lang_post['All caps subject']; } - // If the user is logged in we get the username and e-mail from $pun_user + // If the user is logged in we get the username and email from $pun_user if (!$pun_user['is_guest']) { $username = $pun_user['username']; @@ -112,15 +98,15 @@ if (isset($_POST['form_sent'])) // It's a guest, so we have to validate the username if (strlen($username) < 2) $errors[] = $lang_prof_reg['Username too short']; - else if (pun_strlen($username) > 25) // This usually doesn't happen since the form element only accepts 25 characters - $errors[] = $lang_prof_reg['Username too long']; + else if (pun_strlen($username) > 25) // This usually doesn't happen since the form element only accepts 25 characters + $errors[] = $lang_prof_reg['Username too long']; else if (!strcasecmp($username, 'Guest') || !strcasecmp($username, $lang_common['Guest'])) $errors[] = $lang_prof_reg['Username guest']; else if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $username) || preg_match('/((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))/', $username)) $errors[] = $lang_prof_reg['Username IP']; else if ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false) $errors[] = $lang_prof_reg['Username reserved chars']; - else if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[quote=|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) + else if (preg_match('/(?:\[\/?(?:b|u|i|h|colou?r|quote|code|img|url|email|list)\]|\[(?:code|quote|list)=)/i', $username)) $errors[] = $lang_prof_reg['Username BBCode']; // Check username for any censored words @@ -140,7 +126,19 @@ if (isset($_POST['form_sent'])) { require PUN_ROOT.'include/email.php'; if (!is_valid_email($email)) - $errors[] = $lang_common['Invalid e-mail']; + $errors[] = $lang_common['Invalid email']; + + // Check if it's a banned email address + // we should only check guests because members addresses are already verified + if ($pun_user['is_guest'] && is_banned_email($email)) + { + if ($pun_config['p_allow_banned_email'] == '0') + $errors[] = $lang_prof_reg['Banned email']; + + $banned_email = true; // Used later when we send an alert email + } + else + $banned_email = false; } } @@ -151,11 +149,11 @@ if (isset($_POST['form_sent'])) $errors[] = $lang_post['No message']; else if (strlen($message) > 65535) $errors[] = $lang_post['Too long message']; - else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && !$pun_user['is_admmod']) - $message = ucwords(strtolower($message)); + else if ($pun_config['p_message_all_caps'] == '0' && is_all_uppercase($message) && !$pun_user['is_admmod']) + $errors[] = $lang_post['All caps message']; // Validate BBCode syntax - if ($pun_config['p_message_bbcode'] == '1' && strpos($message, '[') !== false && strpos($message, ']') !== false) + if ($pun_config['p_message_bbcode'] == '1') { require PUN_ROOT.'include/parser.php'; $message = preparse_bbcode($message, $errors); @@ -178,24 +176,25 @@ if (isset($_POST['form_sent'])) if (!$pun_user['is_guest']) { $new_tid = $tid; - + // Insert the new post - $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); + $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$db->escape($message).'\', '.$hide_smilies.', '.$now.', '.$tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); $new_pid = $db->insert_id(); // To subscribe or not to subscribe, that ... - if ($pun_config['o_subscriptions'] == '1' && $subscribe) + if ($pun_config['o_subscriptions'] == '1') { - $result = $db->query('SELECT 1 FROM '.$db->prefix.'subscriptions WHERE user_id='.$pun_user['id'].' AND topic_id='.$tid) or error('Unable to fetch subscription info', __FILE__, __LINE__, $db->error()); - if (!$db->num_rows($result)) + if ($subscribe && !$is_subscribed) $db->query('INSERT INTO '.$db->prefix.'subscriptions (user_id, topic_id) VALUES('.$pun_user['id'].' ,'.$tid.')') or error('Unable to add subscription', __FILE__, __LINE__, $db->error()); + else if (!$subscribe && $is_subscribed) + $db->query('DELETE FROM '.$db->prefix.'subscriptions WHERE user_id='.$pun_user['id'].' AND topic_id='.$tid) or error('Unable to remove subscription', __FILE__, __LINE__, $db->error()); } } else { // It's a guest. Insert the new post $email_sql = ($pun_config['p_force_guest_email'] == '1' || $email != '') ? '\''.$email.'\'' : 'NULL'; - $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_ip, poster_email, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', \''.get_remote_address().'\', '.$email_sql.', \''.$db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); + $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_ip, poster_email, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', \''.get_remote_address().'\', '.$email_sql.', \''.$db->escape($message).'\', '.$hide_smilies.', '.$now.', '.$tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); $new_pid = $db->insert_id(); } @@ -225,10 +224,10 @@ if (isset($_POST['form_sent'])) $notification_emails = array(); - // Loop through subscribed users and send e-mails + // Loop through subscribed users and send emails while ($cur_subscriber = $db->fetch_assoc($result)) { - // Is the subscription e-mail for $cur_subscriber['language'] cached or not? + // Is the subscription email for $cur_subscriber['language'] cached or not? if (!isset($notification_emails[$cur_subscriber['language']])) { if (file_exists(PUN_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')) @@ -294,17 +293,17 @@ if (isset($_POST['form_sent'])) if (!$pun_user['is_guest']) { // To subscribe or not to subscribe, that ... - if ($pun_config['o_subscriptions'] == '1' && (isset($_POST['subscribe']) && $_POST['subscribe'] == '1')) + if ($pun_config['o_subscriptions'] == '1' && $subscribe) $db->query('INSERT INTO '.$db->prefix.'subscriptions (user_id, topic_id) VALUES('.$pun_user['id'].' ,'.$new_tid.')') or error('Unable to add subscription', __FILE__, __LINE__, $db->error()); // Create the post ("topic post") - $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$new_tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); + $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$db->escape($message).'\', '.$hide_smilies.', '.$now.', '.$new_tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); } else { // Create the post ("topic post") $email_sql = ($pun_config['p_force_guest_email'] == '1' || $email != '') ? '\''.$email.'\'' : 'NULL'; - $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_ip, poster_email, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', \''.get_remote_address().'\', '.$email_sql.', \''.$db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$new_tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); + $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_ip, poster_email, message, hide_smilies, posted, topic_id) VALUES(\''.$db->escape($username).'\', \''.get_remote_address().'\', '.$email_sql.', \''.$db->escape($message).'\', '.$hide_smilies.', '.$now.', '.$new_tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error()); } $new_pid = $db->insert_id(); @@ -316,14 +315,25 @@ if (isset($_POST['form_sent'])) update_forum($fid); } + // If we previously found out that the email was banned + if ($pun_user['is_guest'] && $banned_email && $pun_config['o_mailing_list'] != '') + { + $mail_subject = $lang_common['Banned email notification']; + $mail_message = sprintf($lang_common['Banned email post message'], $username, $email)."\n"; + $mail_message .= sprintf($lang_common['Post URL'], $pun_config['o_base_url'].'/viewtopic.php?pid='.$new_pid.'#p'.$new_pid)."\n"; + $mail_message .= "\n".'--'."\n".$lang_common['Email signature']; + + pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); + } + // If the posting user is logged in, increment his/her post count if (!$pun_user['is_guest']) { $db->query('UPDATE '.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error()); - $tracked_topics = get_tracked_topics(); - $tracked_topics['topics'][$new_tid] = time(); - set_tracked_topics($tracked_topics); + $tracked_topics = get_tracked_topics(); + $tracked_topics['topics'][$new_tid] = time(); + set_tracked_topics($tracked_topics); } else { @@ -335,13 +345,13 @@ if (isset($_POST['form_sent'])) } -// If a topic id was specified in the url (it's a reply). +// If a topic ID was specified in the url (it's a reply) if ($tid) { $action = $lang_post['Post a reply']; $form = '
    '; - // If a quote-id was specified in the url. + // If a quote ID was specified in the url if (isset($_GET['qid'])) { $qid = intval($_GET['qid']); @@ -388,7 +398,7 @@ if ($tid) $forum_name = ''.pun_htmlspecialchars($cur_posting['forum_name']).''; } -// If a forum_id was specified in the url (new topic). +// If a forum ID was specified in the url (new topic) else if ($fid) { $action = $lang_post['Post new topic']; @@ -401,7 +411,7 @@ else $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$action; -$required_fields = array('req_email' => $lang_common['E-mail'], 'req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']); +$required_fields = array('req_email' => $lang_common['Email'], 'req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']); $focus_element = array('post'); if (!$pun_user['is_guest']) @@ -417,7 +427,11 @@ require PUN_ROOT.'header.php'; ?>
    -
    •  » 
    •  » '.pun_htmlspecialchars($cur_posting['subject']) ?>
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    @@ -457,9 +471,11 @@ else if (isset($_POST['preview']))

    -
    -
    - +
    +
    +
    + +
    @@ -488,7 +504,7 @@ $cur_index = 1; if ($pun_user['is_guest']) { - $email_label = ($pun_config['p_force_guest_email'] == '1') ? ''.$lang_common['E-mail'].'' : $lang_common['E-mail']; + $email_label = ($pun_config['p_force_guest_email'] == '1') ? ''.$lang_common['Email'].'' : $lang_common['Email']; $email_form_name = ($pun_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; ?> @@ -518,7 +534,21 @@ if (!$pun_user['is_guest']) $checkboxes[] = '
    -

    +

    fetch_assoc($result)) { - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' roweven' : ' rowodd'; $post_count++; $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); ?> -
    +
    -
    -
    -
    -
    -
    -
    -
    -
    - +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    diff --git a/upload/profile.php b/upload/profile.php index b3de689..b3b825f 100644 --- a/upload/profile.php +++ b/upload/profile.php @@ -1,27 +1,12 @@ query('SELECT u.group_id, g.g_moderator FROM '.$db->prefix.'users AS u INNER JOIN '.$db->prefix.'groups AS g ON (g.g_id=u.group_id) WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if (!$db->num_rows($result)) @@ -116,7 +101,7 @@ if ($action == 'change_pass') $sha1_in_db = (strlen($db_password_hash) == 40) ? true : false; $sha1_available = (function_exists('sha1') || function_exists('mhash')) ? true : false; - $old_password_hash = pun_hash($old_password); // This could result in either an SHA-1 or an MD5 hash + $old_password_hash = pun_hash($old_password); // This could result in either an SHA-1 or an MD5 hash if (($sha1_in_db && $sha1_available && $db_password_hash == $old_password_hash) || (!$sha1_in_db && $db_password_hash == md5($old_password)) || @@ -164,7 +149,7 @@ if ($action == 'change_pass')
    -

    +

    @@ -176,12 +161,12 @@ if ($action == 'change_pass') else if ($action == 'change_email') { - // Make sure we are allowed to change this users e-mail + // Make sure we are allowed to change this users email if ($pun_user['id'] != $id) { - if (!$pun_user['is_admmod']) // A regular user trying to change another users e-mail? + if (!$pun_user['is_admmod']) // A regular user trying to change another users email? message($lang_common['No permission']); - else if ($pun_user['g_moderator'] == '1') // A moderator trying to change a users e-mail? + else if ($pun_user['g_moderator'] == '1') // A moderator trying to change a users email? { $result = $db->query('SELECT u.group_id, g.g_moderator FROM '.$db->prefix.'users AS u INNER JOIN '.$db->prefix.'groups AS g ON (g.g_id=u.group_id) WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if (!$db->num_rows($result)) @@ -202,12 +187,12 @@ else if ($action == 'change_email') list($new_email, $new_email_key) = $db->fetch_row($result); if ($key == '' || $key != $new_email_key) - message($lang_profile['E-mail key bad'].' '.$pun_config['o_admin_email'].'.'); + message($lang_profile['Email key bad'].' '.$pun_config['o_admin_email'].'.'); else { - $db->query('UPDATE '.$db->prefix.'users SET email=activate_string, activate_string=NULL, activate_key=NULL WHERE id='.$id) or error('Unable to update e-mail address', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'users SET email=activate_string, activate_string=NULL, activate_key=NULL WHERE id='.$id) or error('Unable to update email address', __FILE__, __LINE__, $db->error()); - message($lang_profile['E-mail updated'], true); + message($lang_profile['Email updated'], true); } } else if (isset($_POST['form_sent'])) @@ -217,18 +202,18 @@ else if ($action == 'change_email') require PUN_ROOT.'include/email.php'; - // Validate the email-address + // Validate the email address $new_email = strtolower(trim($_POST['req_new_email'])); if (!is_valid_email($new_email)) - message($lang_common['Invalid e-mail']); + message($lang_common['Invalid email']); - // Check if it's a banned e-mail address + // Check if it's a banned email address if (is_banned_email($new_email)) { if ($pun_config['p_allow_banned_email'] == '0') - message($lang_prof_reg['Banned e-mail']); + message($lang_prof_reg['Banned email']); else if ($pun_config['o_mailing_list'] != '') - { + { $mail_subject = $lang_common['Banned email notification']; $mail_message = sprintf($lang_common['Banned email change message'], $pun_user['username'], $new_email)."\n"; $mail_message .= sprintf($lang_common['User profile'], $pun_config['o_base_url'].'/profile.php?id='.$id)."\n"; @@ -238,17 +223,17 @@ else if ($action == 'change_email') } } - // Check if someone else already has registered with that e-mail address + // Check if someone else already has registered with that email address $result = $db->query('SELECT id, username FROM '.$db->prefix.'users WHERE email=\''.$db->escape($new_email).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) { if ($pun_config['p_allow_dupe_email'] == '0') - message($lang_prof_reg['Dupe e-mail']); + message($lang_prof_reg['Dupe email']); else if ($pun_config['o_mailing_list'] != '') { while ($cur_dupe = $db->fetch_assoc($result)) $dupe_list[] = $cur_dupe['username']; - + $mail_subject = $lang_common['Duplicate email notification']; $mail_message = sprintf($lang_common['Duplicate email change message'], $pun_user['username'], implode(', ', $dupe_list))."\n"; $mail_message .= sprintf($lang_common['User profile'], $pun_config['o_base_url'].'/profile.php?id='.$id)."\n"; @@ -263,7 +248,7 @@ else if ($action == 'change_email') $db->query('UPDATE '.$db->prefix.'users SET activate_string=\''.$db->escape($new_email).'\', activate_key=\''.$new_email_key.'\' WHERE id='.$id) or error('Unable to update activation data', __FILE__, __LINE__, $db->error()); - // Load the "activate e-mail" template + // Load the "activate email" template $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/activate_email.tpl')); // The first row contains the subject @@ -278,31 +263,31 @@ else if ($action == 'change_email') pun_mail($new_email, $mail_subject, $mail_message); - message($lang_profile['Activate e-mail sent'].' '.$pun_config['o_admin_email'].'.', true); + message($lang_profile['Activate email sent'].' '.$pun_config['o_admin_email'].'.', true); } $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - $required_fields = array('req_new_email' => $lang_profile['New e-mail'], 'req_password' => $lang_common['Password']); + $required_fields = array('req_new_email' => $lang_profile['New email'], 'req_password' => $lang_common['Password']); $focus_element = array('change_email', 'req_new_email'); require PUN_ROOT.'header.php'; ?>
    -

    +

    - +
    - + -

    +

    -

    +

    @@ -324,7 +309,7 @@ else if ($action == 'upload_avatar' || $action == 'upload_avatar2') { if (!isset($_FILES['req_file'])) message($lang_profile['No file']); - + $uploaded_file = $_FILES['req_file']; // Make sure the upload went smooth @@ -332,20 +317,20 @@ else if ($action == 'upload_avatar' || $action == 'upload_avatar2') { switch ($uploaded_file['error']) { - case 1: // UPLOAD_ERR_INI_SIZE - case 2: // UPLOAD_ERR_FORM_SIZE + case 1: // UPLOAD_ERR_INI_SIZE + case 2: // UPLOAD_ERR_FORM_SIZE message($lang_profile['Too large ini']); break; - case 3: // UPLOAD_ERR_PARTIAL + case 3: // UPLOAD_ERR_PARTIAL message($lang_profile['Partial upload']); break; - case 4: // UPLOAD_ERR_NO_FILE + case 4: // UPLOAD_ERR_NO_FILE message($lang_profile['No file']); break; - case 6: // UPLOAD_ERR_NO_TMP_DIR + case 6: // UPLOAD_ERR_NO_TMP_DIR message($lang_profile['No tmp directory']); break; @@ -368,7 +353,7 @@ else if ($action == 'upload_avatar' || $action == 'upload_avatar2') if ($uploaded_file['size'] > $pun_config['o_avatars_size']) message($lang_profile['Too large'].' '.forum_number_format($pun_config['o_avatars_size']).' '.$lang_profile['bytes'].'.'); - // Move the file to the avatar directory. We do this before checking the width/height to circumvent open_basedir restrictions. + // Move the file to the avatar directory. We do this before checking the width/height to circumvent open_basedir restrictions if (!@move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp')) message($lang_profile['Move failed'].' '.$pun_config['o_admin_email'].'.'); @@ -428,7 +413,7 @@ else if ($action == 'upload_avatar' || $action == 'upload_avatar2')
    -

    +

    @@ -640,7 +625,7 @@ else if (isset($_POST['delete_user']) || isset($_POST['delete_user_comply'])) -

    +

    @@ -675,8 +660,8 @@ else if (isset($_POST['form_sent'])) while (list($key, $value) = @each($_POST['form'])) { - if (in_array($key, $allowed_elements)) - $form[$key] = $value; + if (in_array($key, $allowed_elements)) + $form[$key] = $value; } return $form; @@ -703,13 +688,13 @@ else if (isset($_POST['form_sent'])) if (strlen($form['username']) < 2) message($lang_prof_reg['Username too short']); - else if (pun_strlen($form['username']) > 25) // This usually doesn't happen since the form element only accepts 25 characters - message($lang_common['Bad request']); + else if (pun_strlen($form['username']) > 25) // This usually doesn't happen since the form element only accepts 25 characters + message($lang_common['Bad request']); else if (!strcasecmp($form['username'], 'Guest') || !strcasecmp($form['username'], $lang_common['Guest'])) message($lang_prof_reg['Username guest']); else if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $form['username']) || preg_match('/((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))/', $form['username'])) message($lang_prof_reg['Username IP']); - else if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[quote=|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $form['username'])) + else if (preg_match('/(?:\[\/?(?:b|u|i|h|colou?r|quote|code|img|url|email|list)\]|\[(?:code|quote|list)=)/i', $form['username'])) message($lang_prof_reg['Username BBCode']); // Check that the username is not already registered @@ -730,10 +715,10 @@ else if (isset($_POST['form_sent'])) { require PUN_ROOT.'include/email.php'; - // Validate the email-address + // Validate the email address $form['email'] = strtolower(trim($_POST['req_email'])); if (!is_valid_email($form['email'])) - message($lang_common['Invalid e-mail']); + message($lang_common['Invalid email']); } // Make sure we got a valid language string @@ -805,11 +790,11 @@ else if (isset($_POST['form_sent'])) message($lang_prof_reg['Sig too long'].' '.$pun_config['p_sig_length'].' '.$lang_prof_reg['characters'].'.'); else if (substr_count($form['signature'], "\n") > ($pun_config['p_sig_lines']-1)) message($lang_prof_reg['Sig too many lines'].' '.$pun_config['p_sig_lines'].' '.$lang_prof_reg['lines'].'.'); - else if ($form['signature'] && $pun_config['p_sig_all_caps'] == '0' && strtoupper($form['signature']) == $form['signature'] && !$pun_user['is_admmod']) - $form['signature'] = ucwords(strtolower($form['signature'])); + else if ($form['signature'] && $pun_config['p_sig_all_caps'] == '0' && is_all_uppercase($form['signature']) && !$pun_user['is_admmod']) + $form['signature'] = utf8_ucwords(utf8_strtolower($form['signature'])); // Validate BBCode syntax - if ($pun_config['p_sig_bbcode'] == '1' && strpos($form['signature'], '[') !== false && strpos($form['signature'], ']') !== false) + if ($pun_config['p_sig_bbcode'] == '1') { require PUN_ROOT.'include/parser.php'; @@ -861,7 +846,7 @@ else if (isset($_POST['form_sent'])) } - // Singlequotes around non-empty values and NULL for empty values + // Single quotes around non-empty values and NULL for empty values $temp = array(); while (list($key, $input) = @each($form)) { @@ -880,6 +865,7 @@ else if (isset($_POST['form_sent'])) if ($username_updated) { $db->query('UPDATE '.$db->prefix.'posts SET poster=\''.$db->escape($form['username']).'\' WHERE poster_id='.$id) or error('Unable to update posts', __FILE__, __LINE__, $db->error()); + $db->query('UPDATE '.$db->prefix.'posts SET edited_by=\''.$db->escape($form['username']).'\' WHERE edited_by=\''.$db->escape($old_username).'\'') or error('Unable to update posts', __FILE__, __LINE__, $db->error()); $db->query('UPDATE '.$db->prefix.'topics SET poster=\''.$db->escape($form['username']).'\' WHERE poster=\''.$db->escape($old_username).'\'') or error('Unable to update topics', __FILE__, __LINE__, $db->error()); $db->query('UPDATE '.$db->prefix.'topics SET last_poster=\''.$db->escape($form['username']).'\' WHERE last_poster=\''.$db->escape($old_username).'\'') or error('Unable to update topics', __FILE__, __LINE__, $db->error()); $db->query('UPDATE '.$db->prefix.'forums SET last_poster=\''.$db->escape($form['username']).'\' WHERE last_poster=\''.$db->escape($old_username).'\'') or error('Unable to update forums', __FILE__, __LINE__, $db->error()); @@ -940,7 +926,7 @@ if ($pun_user['id'] != $id && if ($user['email_setting'] == '0' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') $email_field = ''.$user['email'].''; else if ($user['email_setting'] == '1' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') - $email_field = ''.$lang_common['Send e-mail'].''; + $email_field = ''.$lang_common['Send email'].''; else $email_field = $lang_profile['Private']; @@ -971,7 +957,7 @@ if ($pun_user['id'] != $id && if ($pun_user['g_search'] == '1') $posts_field .= (($posts_field != '') ? ' - ' : '').''.$lang_profile['Show posts'].''; - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; + $page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.sprintf($lang_profile['Users profile'], $user['username'])); define('PUN_ALLOW_INDEX', 1); require PUN_ROOT.'header.php'; @@ -994,8 +980,8 @@ if ($pun_user['id'] != $id &&
    :
    :
    -
     
    -
    :
    +
    +
    :
    @@ -1030,7 +1016,7 @@ if ($pun_user['id'] != $id &&
    :
    :
    -
    +
    '.$parsed_signature.'' : $lang_profile['No sig']; ?>
    @@ -1071,16 +1057,16 @@ else else $username_field = '

    '.$lang_common['Username'].': '.pun_htmlspecialchars($user['username']).'

    '."\n"; - $email_field = '

    '.$lang_common['Send e-mail'].'

    '."\n"; + $email_field = '

    '.$lang_common['Send email'].'

    '."\n"; } else { $username_field = '

    '.$lang_common['Username'].': '.pun_htmlspecialchars($user['username']).'

    '."\n"; if ($pun_config['o_regs_verify'] == '1') - $email_field = '

    '.$lang_common['E-mail'].': '.$user['email'].' - '.$lang_profile['Change e-mail'].'

    '."\n"; + $email_field = '

    '.$lang_common['Email'].': '.$user['email'].' - '.$lang_profile['Change email'].'

    '."\n"; else - $email_field = ''."\n"; + $email_field = ''."\n"; } $posts_field = ''; @@ -1090,10 +1076,10 @@ else $posts_field = '

    '.$lang_common['Posts'].': '.forum_number_format($user['num_posts']).($pun_user['g_search'] == '1' ? ' - '.$lang_profile['Show posts'].'' : '').'

    '."\n"; else if ($pun_user['g_search'] == '1') $posts_field = '

    '.$lang_profile['Show posts'].'

    '."\n"; - + $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - $required_fields = array('req_username' => $lang_common['Username'], 'req_email' => $lang_common['E-mail']); + $required_fields = array('req_username' => $lang_common['Username'], 'req_email' => $lang_common['Email']); require PUN_ROOT.'header.php'; generate_profile_menu('essentials'); @@ -1115,7 +1101,7 @@ else
    - +
    @@ -1125,8 +1111,8 @@ else
    -
    -

    +

    @@ -1286,13 +1271,13 @@ else
    - +
    -

    +

    @@ -1325,7 +1310,7 @@ else -

    +

    @@ -1338,7 +1323,7 @@ else message($lang_common['Bad request']); $avatar_field = ''.$lang_profile['Change avatar'].''; - + $user_avatar = generate_avatar_markup($id); if ($user_avatar) $avatar_field .= '   '.$lang_profile['Delete avatar'].''; @@ -1346,7 +1331,7 @@ else $avatar_field = ''.$lang_profile['Upload avatar'].''; if ($user['signature'] != '') - $signature_preview = '

    '.$lang_profile['Sig preview'].'

    '."\n\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t".$parsed_signature."\n\t\t\t\t\t".'
    '."\n"; + $signature_preview = '

    '.$lang_profile['Sig preview'].'

    '."\n\t\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t\t\t".$parsed_signature."\n\t\t\t\t\t\t\t".'
    '."\n"; else $signature_preview = '

    '.$lang_profile['No sig'].'

    '."\n"; @@ -1366,7 +1351,7 @@ else
    - +

    @@ -1390,7 +1375,7 @@ else
    -

    +

    @@ -1434,7 +1419,6 @@ else
    @@ -1509,11 +1493,11 @@ else
    -

    +

    - - - + + +
    @@ -1522,18 +1506,14 @@ else
    -

    -
    -

    -
    -

    +

    @@ -1631,7 +1611,7 @@ else $cur_category = 0; while ($cur_forum = $db->fetch_assoc($result)) { - if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? + if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? { if ($cur_category) echo "\n\t\t\t\t\t\t\t\t".''; @@ -1667,6 +1647,8 @@ else
    diff --git a/upload/register.php b/upload/register.php index 3e2d6a7..6de7c8f 100644 --- a/upload/register.php +++ b/upload/register.php @@ -1,27 +1,12 @@
    -

    +
    -

    +

    @@ -80,7 +65,7 @@ else if ($pun_config['o_rules'] == '1' && !isset($_GET['agree']) && !isset($_POS $errors = array(); if (isset($_POST['form_sent'])) -{ +{ // Check that someone from this IP didn't register a user within the last hour (DoS prevention) $result = $db->query('SELECT 1 FROM '.$db->prefix.'users WHERE registration_ip=\''.get_remote_address().'\' AND registered>'.(time() - 3600)) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); @@ -110,7 +95,7 @@ if (isset($_POST['form_sent'])) // Validate username and passwords if (strlen($username) < 2) $errors[] = $lang_prof_reg['Username too short']; - else if (pun_strlen($username) > 25) // This usually doesn't happen since the form element only accepts 25 characters + else if (pun_strlen($username) > 25) // This usually doesn't happen since the form element only accepts 25 characters $errors[] = $lang_prof_reg['Username too long']; else if (!strcasecmp($username, 'Guest') || !strcasecmp($username, $lang_common['Guest'])) $errors[] = $lang_prof_reg['Username guest']; @@ -118,9 +103,9 @@ if (isset($_POST['form_sent'])) $errors[] = $lang_prof_reg['Username IP']; else if ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false) $errors[] = $lang_prof_reg['Username reserved chars']; - else if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[quote=|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) + else if (preg_match('/(?:\[\/?(?:b|u|i|h|colou?r|quote|code|img|url|email|list)\]|\[(?:code|quote|list)=)/i', $username)) $errors[] = $lang_prof_reg['Username BBCode']; - + // Check username for any censored words if ($pun_config['o_censoring'] == '1') { @@ -146,39 +131,39 @@ if (isset($_POST['form_sent'])) break; } } - + if (strlen($password1) < 4) $errors[] = $lang_prof_reg['Pass too short']; else if ($password1 != $password2) - $errors[] = $lang_prof_reg['Pass not match']; + $errors[] = $lang_prof_reg['Pass not match']; - // Validate e-mail + // Validate email require PUN_ROOT.'include/email.php'; if (!is_valid_email($email1)) - $errors[] = $lang_common['Invalid e-mail']; + $errors[] = $lang_common['Invalid email']; else if ($pun_config['o_regs_verify'] == '1' && $email1 != $email2) - $errors[] = $lang_register['E-mail not match']; + $errors[] = $lang_register['Email not match']; - // Check it it's a banned e-mail address + // Check if it's a banned email address if (is_banned_email($email1)) { if ($pun_config['p_allow_banned_email'] == '0') - $errors[] = $lang_prof_reg['Banned e-mail']; + $errors[] = $lang_prof_reg['Banned email']; - $banned_email = true; // Used later when we send an alert e-mail + $banned_email = true; // Used later when we send an alert email } else $banned_email = false; - // Check if someone else already has registered with that e-mail address + // Check if someone else already has registered with that email address $dupe_list = array(); - $result = $db->query('SELECT username FROM '.$db->prefix.'users WHERE email=\''.$email1.'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); + $result = $db->query('SELECT username FROM '.$db->prefix.'users WHERE email=\''.$db->escape($email1).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) { if ($pun_config['p_allow_dupe_email'] == '0') - $errors[] = $lang_prof_reg['Dupe e-mail']; + $errors[] = $lang_prof_reg['Dupe email']; while ($cur_dupe = $db->fetch_assoc($result)) $dupe_list[] = $cur_dupe['username']; @@ -204,20 +189,20 @@ if (isset($_POST['form_sent'])) // Did everything go according to plan? if (empty($errors)) { - // Insert the new user into the database. We do this now to get the last inserted id for later use. + // Insert the new user into the database. We do this now to get the last inserted ID for later use $now = time(); $intial_group_id = ($pun_config['o_regs_verify'] == '0') ? $pun_config['o_default_user_group'] : PUN_UNVERIFIED; $password_hash = pun_hash($password1); // Add the user - $db->query('INSERT INTO '.$db->prefix.'users (username, group_id, password, email, email_setting, timezone, dst, language, style, registered, registration_ip, last_visit) VALUES(\''.$db->escape($username).'\', '.$intial_group_id.', \''.$password_hash.'\', \''.$email1.'\', '.$email_setting.', '.$timezone.' , '.$dst.', \''.$db->escape($language).'\', \''.$pun_config['o_default_style'].'\', '.$now.', \''.get_remote_address().'\', '.$now.')') or error('Unable to create user', __FILE__, __LINE__, $db->error()); + $db->query('INSERT INTO '.$db->prefix.'users (username, group_id, password, email, email_setting, timezone, dst, language, style, registered, registration_ip, last_visit) VALUES(\''.$db->escape($username).'\', '.$intial_group_id.', \''.$password_hash.'\', \''.$db->escape($email1).'\', '.$email_setting.', '.$timezone.' , '.$dst.', \''.$db->escape($language).'\', \''.$pun_config['o_default_style'].'\', '.$now.', \''.get_remote_address().'\', '.$now.')') or error('Unable to create user', __FILE__, __LINE__, $db->error()); $new_uid = $db->insert_id(); - // If we previously found out that the e-mail was banned + // If we previously found out that the email was banned if ($banned_email && $pun_config['o_mailing_list'] != '') - { + { $mail_subject = $lang_common['Banned email notification']; $mail_message = sprintf($lang_common['Banned email register message'], $username, $email1)."\n"; $mail_message .= sprintf($lang_common['User profile'], $pun_config['o_base_url'].'/profile.php?id='.$new_uid)."\n"; @@ -226,9 +211,9 @@ if (isset($_POST['form_sent'])) pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); } - // If we previously found out that the e-mail was a dupe + // If we previously found out that the email was a dupe if (!empty($dupe_list) && $pun_config['o_mailing_list'] != '') - { + { $mail_subject = $lang_common['Duplicate email notification']; $mail_message = sprintf($lang_common['Duplicate email register message'], $username, implode(', ', $dupe_list))."\n"; $mail_message .= sprintf($lang_common['User profile'], $pun_config['o_base_url'].'/profile.php?id='.$new_uid)."\n"; @@ -239,7 +224,7 @@ if (isset($_POST['form_sent'])) // Should we alert people on the admin mailing list that a new user has registered? if ($pun_config['o_regs_report'] == '1') - { + { $mail_subject = $lang_common['New user notification']; $mail_message = sprintf($lang_common['New user message'], $username, $pun_config['o_base_url'].'/')."\n"; $mail_message .= sprintf($lang_common['User profile'], $pun_config['o_base_url'].'/profile.php?id='.$new_uid)."\n"; @@ -268,7 +253,7 @@ if (isset($_POST['form_sent'])) pun_mail($email1, $mail_subject, $mail_message); - message($lang_register['Reg e-mail'].' '.$pun_config['o_admin_email'].'.', true); + message($lang_register['Reg email'].' '.$pun_config['o_admin_email'].'.', true); } pun_setcookie($new_uid, $password_hash, time() + $pun_config['o_timeout_visit']); @@ -279,7 +264,7 @@ if (isset($_POST['form_sent'])) $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_register['Register']; -$required_fields = array('req_username' => $lang_common['Username'], 'req_password1' => $lang_common['Password'], 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => $lang_common['E-mail'], 'req_email2' => $lang_common['E-mail'].' 2'); +$required_fields = array('req_username' => $lang_common['Username'], 'req_password1' => $lang_common['Password'], 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => $lang_common['Email'], 'req_email2' => $lang_common['Email'].' 2'); $focus_element = array('register', 'req_username'); require PUN_ROOT.'header.php'; @@ -335,7 +320,7 @@ if (!empty($errors))
    - +
    @@ -345,12 +330,12 @@ if (!empty($errors))
    - +
    -

    -
    @@ -359,7 +344,8 @@ if (!empty($errors))
    -
    -

    +

    diff --git a/upload/search.php b/upload/search.php index 80b3719..0857126 100644 --- a/upload/search.php +++ b/upload/search.php @@ -1,37 +1,22 @@ query('SELECT m.post_id FROM '.$db->prefix.'search_words AS w INNER JOIN '.$db->prefix.'search_matches AS m ON m.word_id = w.id WHERE w.word LIKE \''.$cur_word.'\''.$search_in_cond, true) or error('Unable to search for posts', __FILE__, __LINE__, $db->error()); + $result = $db->query('SELECT m.post_id FROM '.$db->prefix.'search_words AS w INNER JOIN '.$db->prefix.'search_matches AS m ON m.word_id = w.id WHERE w.word LIKE \''.str_replace('*', '%', $cur_word).'\''.$search_in_cond, true) or error('Unable to search for posts', __FILE__, __LINE__, $db->error()); $row = array(); while ($temp = $db->fetch_row($result)) @@ -432,7 +417,7 @@ if (isset($_GET['action']) || isset($_GET['search_id'])) $sql = 'SELECT p.id AS pid, p.poster AS pposter, p.posted AS pposted, p.poster_id, p.message, p.hide_smilies, t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.forum_id FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id WHERE p.id IN('.$search_results.') ORDER BY '.$sort_by_sql; } else - $sql = 'SELECT t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.forum_id FROM '.$db->prefix.'topics AS t WHERE t.id IN('.$search_results.') ORDER BY '.$sort_by_sql; + $sql = 'SELECT t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.sticky, t.forum_id FROM '.$db->prefix.'topics AS t WHERE t.id IN('.$search_results.') ORDER BY '.$sort_by_sql; // Determine the topic or post offset (based on $_GET['p']) @@ -464,12 +449,13 @@ if (isset($_GET['action']) || isset($_GET['search_id']))
    +
    query('SELECT id, forum_name FROM '.$db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $db->error()); $forum_list = array(); - while ($forum_list[] = $db->fetch_row($result)) - ; + while ($forum_list[] = $db->fetch_row($result)); // Finally, lets loop through the results and output them - for ($i = 0; $i < count($search_set); ++$i) + $count_search_set = count($search_set); + for ($i = 0; $i < $count_search_set; ++$i) { @reset($forum_list); while (list(, $temp) = @each($forum_list)) @@ -525,6 +512,7 @@ if (isset($_GET['action']) || isset($_GET['search_id'])) if ($show_as == 'posts') { + ++$post_count; $icon = '
    '.$lang_common['Normal icon'].'
    '."\n"; $subject = ''.pun_htmlspecialchars($search_set[$i]['subject']).''; @@ -548,30 +536,32 @@ if (isset($_GET['action']) || isset($_GET['search_id'])) $vtpost1 = ($i == 0) ? ' vtp1' : ''; - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' rowodd' : ' roweven'; - ?> -
    -

     »  » 

    +
    +

    »  » 

    -
    -
    -
    -
    :
    -
    -

    -
    -
    -
    -
    -

    +
    +
    +
    +
    +
    :
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    -
    @@ -601,31 +591,38 @@ if (isset($_GET['action']) || isset($_GET['search_id'])) $item_status .= ' inew'; $icon_type = 'icon inew'; $subject = ''.$subject.''; - $subject_new_posts = ''.$lang_common['New posts'].' ]'; + $subject_new_posts = '[ '.$lang_common['New posts'].' ]'; } else $subject_new_posts = null; + if ($search_set[$i]['sticky'] == '1') + { + $subject = ''.$lang_forum['Sticky'].': '.$subject; + $item_status .= ' isticky'; + $icon_text .= ' '.$lang_forum['Sticky']; + } + $num_pages_topic = ceil(($search_set[$i]['num_replies'] + 1) / $pun_user['disp_posts']); if ($num_pages_topic > 1) - $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$search_set[$i]['tid']).' ]'; + $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$search_set[$i]['tid']).' ]'; else $subject_multipage = null; // Should we show the "New posts" and/or the multipage links? if (!empty($subject_new_posts) || !empty($subject_multipage)) { - $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : ''); + $subject .= !empty($subject_new_posts) ? ' '.$subject_new_posts : ''; $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : ''; } ?> > -
    -
    -
    +
    +
    +
    @@ -646,6 +643,7 @@ if (isset($_GET['action']) || isset($_GET['search_id']))
    +
    -
    diff --git a/upload/style/Cobalt.css b/upload/style/Cobalt.css index 81e7ee4..90332c6 100644 --- a/upload/style/Cobalt.css +++ b/upload/style/Cobalt.css @@ -1,247 +1,1023 @@ +/***************************************************************** +1. INITIAL SETTINGS +*****************************************************************/ + +/* Limited Reset +----------------------------------------------------------------*/ + +.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, +.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, +.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { + margin: 0; + padding: 0; + border: 0; + } + +.pun ul, .pun ol { + list-style: none + } + + +/* Structural Settings +----------------------------------------------------------------*/ + +.pun .clearer, .pun .nosize { + height: 0; + width: 0; + line-height: 0; + font-size: 0; + overflow: hidden + } + +.pun .clearer, .pun .clearb { + clear: both + } + +.pun .nosize { + position: absolute; + left: -9999em; + text-indent: -9999em; + width: 0; + } + +* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { + height: 1px + } + +.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { + min-height: 1px + } + + +/* Hidden Elements +----------------------------------------------------------------*/ + +#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, +#modcontrols dt, #searchlinks dt, div.postright h3 { + position: absolute; + display: block; + overflow: hidden; + width: 0; + left: -9999em; + text-indent: -9999em; + } + +/***************************************************************** +2. TEXT & CONTENT +*****************************************************************/ + +/* Text Defaults +----------------------------------------------------------------*/ + +.pun { + font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; + } + +.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea { + font-size: 1em; + font-family: verdana, helvetica, arial, sans-serif; + } + +.pun pre, .pun code { + font-size: 1.182em; + font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace + } + +.pun pre code { + font-size: 1em; + } + +.pun strong { + font-weight: bold; + } + +.pun em { + font-style: italic; + } + + +/* Content Defaults +----------------------------------------------------------------*/ + +.pun p, .pun ul, .pun ol, .pun dl { + font-size: 1em; + padding: 3px 0; + } + +.pun h2 { + font-size: 1em; + font-weight: normal; + padding: 4px 7px; + } + +.pun h3 { + font-size: 1.091em; + padding: 3px 0; + } + +.pun table p, .pun table h3 { + padding: 0; + } + +.pun span.warntext, .pun p.warntext { + font-weight: bold + } + +/* User Content (Announcements, Rules, Posts) +----------------------------------------------------------------*/ + +.pun .usercontent p, .pun .postmsg p { + padding: 0.75em 0 + } + +.pun .usercontent ul, .pun .postmsg ul { + padding: 0.75em 1em 0.75em 2.5em; + list-style: disc + } + +.pun .usercontent ol, .pun .postmsg ol { + padding: 0.75em 1em 0.75em 2.5em; + list-style: decimal + } + +.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { + list-style: lower-alpha + } + +.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { + padding: 0.25em 1em 0.75em 2.5em + } + +.pun .usercontent li p, .pun .postmsg li p { + padding: 0 + } + +.pun .usercontent h1 { + font-size: 1.4em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h2 { + font-size: 1.2em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h3 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { + font-size: 1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .quotebox cite { + font-weight: bold; + font-style: normal; + padding: 0.75em 0.75em 0 0.75em + } + +.pun span.bbu { + text-decoration: underline + } + +.pun div.postmsg h5, #helpfile h5 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0; + } + + +/***************************************************************** +3. COMMON STYLES +*****************************************************************/ + +/* Page Layout +----------------------------------------------------------------*/ + +#punwrap { + margin: 12px 20px + } + +#punredirect .block, #punmaint .block { + margin: 50px 20% 12px 20% + } + + +/* Vertical Element Spacing +----------------------------------------------------------------*/ + +#brdheader { + margin: 0 0 12px 0; + } + +#announce, #brdstats { + margin: 12px 0 12px 0; + } + +.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { + margin-bottom: 12px + } + +#punindex .blocktable, .pun .blockpost { + margin-bottom: 6px + } + +#postreview .box { + margin-bottom: 3px; + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-bottom: 0px + } + +.pun .linkst, .pun .linksb { + margin-top: -12px + } + +.pun .postlinksb { + margin-top: -6px + } + + +/* External Borders +----------------------------------------------------------------*/ + +.pun .box { + border-style: solid; + border-width: 1px; + } + +#brdheader .box { + border-top-width: 4px; + } + +/* Default Internal Spacing +----------------------------------------------------------------*/ + +.pun .block .inbox, .pun .blockmenu .inbox { + padding: 3px 6px + } + +/***************************************************************** +4. COMMON BOARD ELEMENTS +*****************************************************************/ + +/* Board Header +----------------------------------------------------------------*/ + +#brdtitle h1 { + font-size: 1.454em; + font-weight: bold; + line-height: 1em; + padding: 3px 0 0 0; + } + +#brdmenu li { + display: inline; + margin-right: 12px; + } + +#brdmenu a:link, #brdmenu a:visited { + text-decoration: none + } + +#brdmenu a:hover, #brdmenu a:active { + text-decoration: underline + } + +#brdwelcome .conl { + float: left; + } + +#brdwelcome .conr { + float: right; + text-align: right; + } + +/* Breadcrumbs and Post Links +----------------------------------------------------------------*/ + +.pun .linkst { + padding: 8px 6px 3px 6px + } + +.pun .linksb, .pun .postlinksb { + padding: 3px 6px 8px 6px + } + +.pun .crumbs { + clear: both; + width: 100%; + overflow: hidden; + } + +.pun .crumbs li { + display: inline; + white-space: nowrap; + font-weight: bold; + } + +.pun .pagelink { + float: left; + white-space: nowrap; + } + +.pun .postlink { + font-weight: bold; + white-space: nowrap; + } + +.pun .postlink, .pun .modbuttons { + float: right; + text-align: right; + } + +.pun .modbuttons { + padding: 1px 0; + white-space: nowrap; + } + +.pun .modbuttons input { + margin-left: 6px; + } + +.pun .postlink a:link, .pun .postlink a:visited { + text-decoration: none + } + +.pun .postlink a:hover, .pun .postlink a:active { + text-decoration: underline; + } + + +/* Board Footer +----------------------------------------------------------------*/ + +#brdfooter .conl { + float: left; + } + +#brdfooter .conr { + float: right; + text-align: right; + } + + +/* Board Stats +----------------------------------------------------------------*/ + +#brdstats .conl { + float: left; + } + +#brdstats .conr { + float: right; + text-align: right; + } + +#onlinelist dd, #onlinelist dt { + display: inline; + } + + +/***************************************************************** +5. MAIN TABLES +*****************************************************************/ + +.pun table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; + } + +.pun .blocktable table { + table-layout: fixed; + } + +.pun td, .pun th { + padding: 4px 6px; + line-height: 1.273em; + text-align: left; + font-weight: normal; + } + +.pun td { + border-style: solid none none solid; + border-width: 1px; + } + +.pun .tcl { + border-left: 0; + width: auto; + } + +.pun .tc2, .pun .tc3, .pun .tcmod { + width: 10%; + text-align: center; + padding: 4px 0; + } + +.pun .tcr { + width: 30%; + } + +.pun .tcl h3 { + font-size: 1.091em; + font-weight: bold; + } + +.pun .tcl span.newtext, .pun .tcl span.pagestext { + white-space: nowrap + } + +.pun .tcl p { + padding: 5px 0 0 0 + } + +#punsearch #vf .tc2 { + width: 18%; + text-align: left; + padding: 4px 6px; + } + +#users1 .tcr { + width: 25% + } + +#users1 .tc2 { + width: 25%; + text-align: left; + padding: 4px 6px; + } + +#debug .tcl { + width: 10% + } + +#debug .tcr { + width: 90%; + white-space: normal + } + +#punindex .tcr .byuser { + display: block + } + +.pun .blocktable .tclcon { + padding: 0 11px 0 12px; + overflow: hidden; + height: 1%; + min-height: 1px; + position: relative; + } + +.pun .blocktable .tclcon div { + width: 100%; + overflow: hidden; + } + +.pun .icon { + border-width: 7px; + border-style: solid; + height: 0; + width: 0; + overflow: hidden; + float: left; + } + +.pun .icon div { + position: absolute; + left: -9999em; + text-indent: -9999em; + height: 0; + } + +.pun .iposted .ipost { + position: absolute; + left: 0; + font-weight: bold; + width: 8px; + padding-left: 4px; + text-align: center; + top: 0; + } + +/***************************************************************** +6. MAIN FORMS +*****************************************************************/ + +.pun .blockform form, .pun .fakeform { + PADDING: 20px 20px 15px 20px + } + +.pun .forminfo { + margin-bottom: 12px; + padding: 9px 10px; + border-style: solid; + border-width: 1px; + } + +.pun .forminfo h3 { + font-weight: bold; + } + +.pun .inform { + padding-bottom: 12px + } + +.pun fieldset { + padding: 0px 12px 0px 12px; + border-style: solid; + border-width: 1px + } + +.pun legend { + padding: 0px 6px + } + +.pun .infldset { + padding: 9px 0px 12px 0 + } + +.pun label { + display: block; + padding: 3px 0 + } + +.pun label.conl { + float: left; + overflow: visible; + margin-right: 10px + } + +.pun select { + padding-top: 1px; + padding-bottom: 1px; + } + +.pun fieldset .rbox { + } + +.pun fieldset .rbox br { + display: none; + } + +.pun fieldset .rbox label { + padding: 3px 0 3px 25px; + position: relative; + vertical-align: middle; + } + +.pun fieldset .rbox input { + margin: 0 9px 0 -25px; + padding: 0; + width: 16px; + position: relative; + vertical-align: middle; + } + +.pun .txtarea { + width: 75% + } + +.pun .txtarea textarea, .pun input.longinput { + width: 100% + } + +.pun .bblinks { + padding-bottom: 10px; + padding-left: 4px + } + +.pun .bblinks li { + display: inline; + padding-right: 20px + } + +.pun .blockform .buttons { + padding-left: 12px; + } + +.pun .blockform .buttons input { + margin-right: 8px; + } + +#posterror ul { + list-style: square; + padding: 3px 0 3px 24px; + } + +.pun .deletemsg { + border-style: solid; + border-width: 1px; + padding: 6px 15px; + } + + +/***************************************************************** +7. PROFILES AND ADMIN +*****************************************************************/ + +.pun .block2col { + padding-bottom: 1px + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-left: 14em + } + +.pun .blockmenu { + float:left; + width: 13em + } + +.pun .blockmenu li { + padding: 3px 0; + font-weight: bold; + } + +.pun .blockmenu a:link, .pun .blockmenu a:visited { + text-decoration: none + } + +.pun .blockmenu a:hover, .pun .blockmenu a:active { + text-decoration: underline + } + +#viewprofile dl { + float: left; + width: 100%; + overflow: hidden + } + +#viewprofile dd { + margin-left: 14em; + padding: 3px; + } + +#viewprofile dt { + float: left; + width: 13em; + margin: 3px 0; + } + +#profileavatar img { + float: right; + margin-left: 1em + } + +/***************************************************************** +8. MAIN POSTS +*****************************************************************/ + +.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { + text-decoration: none; + } + +.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { + text-decoration: underline; + } + +.pun .blockpost h2 .conr { + float: right; + text-align: right; + } + +#punsearch .blockpost h2 span { + white-space: nowrap; + } + +.pun .blockpost .box { + overflow: hidden; + } + +.pun .postleft, .pun .postfootleft { + float:left; + width: 18em; + overflow: hidden; + position: relative; + overflow: hidden; + } + +.pun .postleft dl { + padding: 0.75em 6px; + } + +.pun .postleft .usercontacts, .pun .postleft .icon { + margin-top: 6px + } + +.pun .postleft .postavatar, .pun .postleft .usertitle { + margin-bottom: 6px; + display: block; + } + +.pun .blockpost dt { + font-size: 1.091em; + font-weight: bold; + } + +.pun .blockpost dt a:link, .pun .blockpost dt a:visited { + text-decoration: none; + } + +.pun .blockpost dt a:hover, .pun .blockpost dt a:active { + text-decoration: underline; + } + +.pun .postright, .pun .postfootright { + border-left-width: 18em; + border-left-style: solid + } + +#postpreview .postright { + border-left: 0 + } + +.pun .postright { + padding: 0 6px; + } + +.pun .postfootright, .pun .multidelete { + text-align: right + } + +.pun .postmsg { + width:98%; + overflow: hidden; + padding-bottom: 6px; + } + +.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, +.pun .postfootleft p { + padding: 6px 6px 6px 6px; + } + +.pun .postfootright li { + display: inline; + } + +.pun .postfootright a:link, .pun .postfootright a:visited { + text-decoration: none + } + +.pun .postfootright a:hover, .pun .postfootright a:active { + text-decoration: underline + } + +.pun .codebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0; + } + +.pun .quotebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0 0.75em; + } + +.pun .quotebox cite { + display: block; + padding: 0.75em 0 0 0; + } + +.pun .quotebox blockquote { + width: 100%; + overflow: hidden + } + +.pun .codebox pre { + overflow: auto; + width: 100%; + overflow-y:hidden + } + +* html .pun .codebox pre { + padding-bottom: 10px; + } + +*+html .pun .codebox pre { + padding-bottom: 10px + } + +.pun .codebox pre code { + display: block; + padding: 0.75em; + } + +.pun .codebox pre.vscroll { + height: 32em; + overflow: auto; + overflow-y: auto + } + +.pun .postmsg img.postimg, .pun .postmsg a img.postimg { + max-width: 100% + vertical-align: middle; + } + +.pun .postmsg img { + vertical-align: bottom; + } + +.pun .postsignature hr { + margin-left: 0px; + width: 200px; + text-align: left; + height: 1px; + border:none + } + +.pun .blockpost label { + padding: 3px 6px; + border-style: solid; + border-width: 1px; + vertical-align: middle; + display: inline-block; + } + +.pun .blockpost label * { + vertical-align: middle; + margin: 0; + padding: 0; + } + /****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ +/* 9. HELP FILES AND MISC. */ /****************************************************************/ -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Cobalt_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -#debug .tcr, .pun PRE {FONT-FAMILY: Consolas, monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} +#helpfile h2 { + margin-top: 12px + } + +#helpfile div.box { + padding: 10px + } + +/***************************************************************** +COLOUR SCHEME +*****************************************************************/ + +/* Background / Text +----------------------------------------------------------------*/ + +body { + background: #2a2a2a; + color: #d4d4d4 + } + +.pun { + color: #d4d4d4 + } + +.pun .box, #adminconsole fieldset th { + background-color: #383838 + } + +.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, +#adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { + background-color: #424242 + } + +.pun h2, #brdmenu { + background-color: #565656; + color: #d4d4d4 + } + +.pun th { + background-color: #484848 + } + +.pun legend { + color: #60a0dc + } + +.pun .blockmenu li.isactive a, #posterror li strong { + color: #d4d4d4 + } + +.pun .usercontent * { + background: transparent; + color: #d4d4d4 + } + +.pun textarea, .pun input, .pun select { + background-color: #2a2a2a; + color: #d4d4d4 + } + +/* Posts +----------------------------------------------------------------*/ + +.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { + background-color: #383838 + } + +.pun .postright, .pun .postfootright { + border-left-color: #424242 + } + +.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { + background-color: #424242 + } + +.pun .blockpost h2 { + background-color: #565656 + } + +.pun .blockpost h2 span.conr { + color: #a19e96 + } + +.pun hr { + background-color: #606060; + color: #606060 + } + +/* Borders +----------------------------------------------------------------*/ + +.pun .box { + border-color:#565656 + } + +.pun td { + border-color: #565656 + } + +.pun th, .pun fieldset { + border-color: #484848 + } + +#adminconsole td, #adminconsole th { + border-color: #383838 + } + +.pun .quotebox, .pun .codebox, .pun .forminfo, +.pun .blockpost label, .pun .deletemsg { + border-color: #606060 + } + +/* Links +----------------------------------------------------------------*/ + +.pun a:link, .pun a:visited { + color: #60a0dc + } + +.pun a:hover, .pun a:active, .pun a:focus { + color: #80d6ff + } + +.pun h2 a:link, .pun h2 a:visited, +#brdmenu a:link, #brdmenu a:visited { + color: #d4d4d4 + } + +.pun h2 a:hover, .pun h2 a:active, +#brdmenu a:hover, #brdmenu a:active { + color: #d4d4d4 + } + +.pun .postreport a:link, .pun .postreport a:visited, +.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { + color: #888 + } + +.pun .postreport a:hover, .pun .postreport a:active, +.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { + color: #aaa + } + +.pun .maintenancelink a:link, .pun .maintenancelink a:visited { + color: #ff4000 + } + +.pun .maintenancelink a:hover, .pun .maintenancelink a:active { + color: #ff5010 + } + +/* Status Indicators +----------------------------------------------------------------*/ + +.pun .icon { + border-color: #484848 #404040 #3c3c3c #444444 + } + +.pun .iredirect .icon { + border-color: #383838 #383838 #383838 #383838 + } + +.pun .inew { + border-color: #5496d8 #4b85c0 #4377ac #4f8dcb + } \ No newline at end of file diff --git a/upload/style/Lithium.css b/upload/style/Lithium.css index da7edfe..cb51caf 100644 --- a/upload/style/Lithium.css +++ b/upload/style/Lithium.css @@ -1,247 +1,1022 @@ +/***************************************************************** +1. INITIAL SETTINGS +*****************************************************************/ + +/* Limited Reset +----------------------------------------------------------------*/ + +.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, +.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, +.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { + margin: 0; + padding: 0; + border: 0; + } + +.pun ul, .pun ol { + list-style: none + } + + +/* Structural Settings +----------------------------------------------------------------*/ + +.pun .clearer, .pun .nosize { + height: 0; + width: 0; + line-height: 0; + font-size: 0; + overflow: hidden + } + +.pun .clearer, .pun .clearb { + clear: both + } + +.pun .nosize { + position: absolute; + left: -9999em; + text-indent: -9999em; + width: 0; + } + +* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { + height: 1px + } + +.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { + min-height: 1px + } + + +/* Hidden Elements +----------------------------------------------------------------*/ + +#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, +#modcontrols dt, #searchlinks dt, div.postright h3 { + position: absolute; + display: block; + overflow: hidden; + width: 0; + left: -9999em; + text-indent: -9999em; + } + +/***************************************************************** +2. TEXT & CONTENT +*****************************************************************/ + +/* Text Defaults +----------------------------------------------------------------*/ + +.pun { + font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; + } + +.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea { + font-size: 1em; + font-family: verdana, helvetica, arial, sans-serif; + } + +.pun pre, .pun code { + font-size: 1.182em; + font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace + } + +.pun pre code { + font-size: 1em; + } + +.pun strong { + font-weight: bold; + } + +.pun em { + font-style: italic; + } + + +/* Content Defaults +----------------------------------------------------------------*/ + +.pun p, .pun ul, .pun ol, .pun dl { + font-size: 1em; + padding: 3px 0; + } + +.pun h2 { + font-size: 1em; + font-weight: normal; + padding: 4px 7px; + } + +.pun h3 { + font-size: 1.091em; + padding: 3px 0; + } + +.pun table p, .pun table h3 { + padding: 0; + } + +.pun span.warntext, .pun p.warntext { + font-weight: bold + } + +/* User Content (Announcements, Rules, Posts) +----------------------------------------------------------------*/ + +.pun .usercontent p, .pun .postmsg p { + padding: 0.75em 0 + } + +.pun .usercontent ul, .pun .postmsg ul { + padding: 0.75em 1em 0.75em 2.5em; + list-style: disc + } + +.pun .usercontent ol, .pun .postmsg ol { + padding: 0.75em 1em 0.75em 2.5em; + list-style: decimal + } + +.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { + list-style: lower-alpha + } + +.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { + padding: 0.25em 1em 0.75em 2.5em + } + +.pun .usercontent li p, .pun .postmsg li p { + padding: 0 + } + +.pun .usercontent h1 { + font-size: 1.4em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h2 { + font-size: 1.2em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h3 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { + font-size: 1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .quotebox cite { + font-weight: bold; + font-style: normal; + padding: 0.75em 0.75em 0 0.75em + } + +.pun span.bbu { + text-decoration: underline + } + +.pun div.postmsg h5, #helpfile h5 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0; + } + + +/***************************************************************** +3. COMMON STYLES +*****************************************************************/ + +/* Page Layout +----------------------------------------------------------------*/ + +#punwrap { + margin: 12px 20px + } + +#punredirect .block, #punmaint .block { + margin: 50px 20% 12px 20% + } + + +/* Vertical Element Spacing +----------------------------------------------------------------*/ + +#brdheader { + margin: 0 0 12px 0; + } + +#announce, #brdstats { + margin: 12px 0 12px 0; + } + +.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { + margin-bottom: 12px + } + +#punindex .blocktable, .pun .blockpost { + margin-bottom: 6px + } + +#postreview .box { + margin-bottom: 3px; + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-bottom: 0px + } + +.pun .linkst, .pun .linksb { + margin-top: -12px + } + +.pun .postlinksb { + margin-top: -6px + } + + +/* External Borders +----------------------------------------------------------------*/ + +.pun .box { + border-style: solid; + border-width: 1px; + } + +#brdheader .box { + border-top-width: 4px; + } + +/* Default Internal Spacing +----------------------------------------------------------------*/ + +.pun .block .inbox, .pun .blockmenu .inbox { + padding: 3px 6px + } + +/***************************************************************** +4. COMMON BOARD ELEMENTS +*****************************************************************/ + +/* Board Header +----------------------------------------------------------------*/ + +#brdtitle h1 { + font-size: 1.454em; + font-weight: bold; + line-height: 1em; + padding: 3px 0 0 0; + } + +#brdmenu li { + display: inline; + margin-right: 12px; + } + +#brdmenu a:link, #brdmenu a:visited { + text-decoration: none + } + +#brdmenu a:hover, #brdmenu a:active { + text-decoration: underline + } + +#brdwelcome .conl { + float: left; + } + +#brdwelcome .conr { + float: right; + text-align: right; + } + +/* Breadcrumbs and Post Links +----------------------------------------------------------------*/ + +.pun .linkst { + padding: 8px 6px 3px 6px + } + +.pun .linksb, .pun .postlinksb { + padding: 3px 6px 8px 6px + } + +.pun .crumbs { + clear: both; + width: 100%; + overflow: hidden; + } + +.pun .crumbs li { + display: inline; + white-space: nowrap; + font-weight: bold; + } + +.pun .pagelink { + float: left; + white-space: nowrap; + } + +.pun .postlink { + font-weight: bold; + white-space: nowrap; + } + +.pun .postlink, .pun .modbuttons { + float: right; + text-align: right; + } + +.pun .modbuttons { + padding: 1px 0; + white-space: nowrap; + } + +.pun .modbuttons input { + margin-left: 6px; + } + +.pun .postlink a:link, .pun .postlink a:visited { + text-decoration: none + } + +.pun .postlink a:hover, .pun .postlink a:active { + text-decoration: underline; + } + + +/* Board Footer +----------------------------------------------------------------*/ + +#brdfooter .conl { + float: left; + } + +#brdfooter .conr { + float: right; + text-align: right; + } + + +/* Board Stats +----------------------------------------------------------------*/ + +#brdstats .conl { + float: left; + } + +#brdstats .conr { + float: right; + text-align: right; + } + +#onlinelist dd, #onlinelist dt { + display: inline; + } + + +/***************************************************************** +5. MAIN TABLES +*****************************************************************/ + +.pun table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; + } + +.pun .blocktable table { + table-layout: fixed; + } + +.pun td, .pun th { + padding: 4px 6px; + line-height: 1.273em; + text-align: left; + font-weight: normal; + } + +.pun td { + border-style: solid none none solid; + border-width: 1px; + } + +.pun .tcl { + border-left: 0; + width: auto; + } + +.pun .tc2, .pun .tc3, .pun .tcmod { + width: 10%; + text-align: center; + padding: 4px 0; + } + +.pun .tcr { + width: 30%; + } + +.pun .tcl h3 { + font-size: 1.091em; + font-weight: bold; + } + +.pun .tcl span.newtext, .pun .tcl span.pagestext { + white-space: nowrap + } + +.pun .tcl p { + padding: 5px 0 0 0 + } + +#punsearch #vf .tc2 { + width: 18%; + text-align: left; + padding: 4px 6px; + } + +#users1 .tcr { + width: 25% + } + +#users1 .tc2 { + width: 25%; + text-align: left; + padding: 4px 6px; + } + +#debug .tcl { + width: 10% + } + +#debug .tcr { + width: 90%; + white-space: normal + } + +#punindex .tcr .byuser { + display: block + } + +.pun .blocktable .tclcon { + padding: 0 11px 0 12px; + overflow: hidden; + height: 1%; + min-height: 1px; + position: relative; + } + +.pun .blocktable .tclcon div { + width: 100%; + overflow: hidden; + } + +.pun .icon { + border-width: 7px; + border-style: solid; + height: 0; + width: 0; + overflow: hidden; + float: left; + } + +.pun .icon div { + position: absolute; + left: -9999em; + text-indent: -9999em; + height: 0; + } + +.pun .iposted .ipost { + position: absolute; + left: 0; + font-weight: bold; + width: 8px; + padding-left: 4px; + text-align: center; + top: 0; + } + +/***************************************************************** +6. MAIN FORMS +*****************************************************************/ + +.pun .blockform form, .pun .fakeform { + PADDING: 20px 20px 15px 20px + } + +.pun .forminfo { + margin-bottom: 12px; + padding: 9px 10px; + border-style: solid; + border-width: 1px; + } + +.pun .forminfo h3 { + font-weight: bold; + } + +.pun .inform { + padding-bottom: 12px + } + +.pun fieldset { + padding: 0px 12px 0px 12px; + border-style: solid; + border-width: 1px + } + +.pun legend { + padding: 0px 6px + } + +.pun .infldset { + padding: 9px 0px 12px 0 + } + +.pun label { + display: block; + padding: 3px 0 + } + +.pun label.conl { + float: left; + overflow: visible; + margin-right: 10px + } + +.pun select { + padding-top: 1px; + padding-bottom: 1px; + } + +.pun fieldset .rbox { + } + +.pun fieldset .rbox br { + display: none; + } + +.pun fieldset .rbox label { + padding: 3px 0 3px 25px; + position: relative; + vertical-align: middle; + } + +.pun fieldset .rbox input { + margin: 0 9px 0 -25px; + padding: 0; + width: 16px; + position: relative; + vertical-align: middle; + } + +.pun .txtarea { + width: 75% + } + +.pun .txtarea textarea, .pun input.longinput { + width: 100% + } + +.pun .bblinks { + padding-bottom: 10px; + padding-left: 4px + } + +.pun .bblinks li { + display: inline; + padding-right: 20px + } + +.pun .blockform .buttons { + padding-left: 12px; + } + +.pun .blockform .buttons input { + margin-right: 8px; + } + +#posterror ul { + list-style: square; + padding: 3px 0 3px 24px; + } + +.pun .deletemsg { + border-style: solid; + border-width: 1px; + padding: 6px 15px; + } + + +/***************************************************************** +7. PROFILES AND ADMIN +*****************************************************************/ + +.pun .block2col { + padding-bottom: 1px + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-left: 14em + } + +.pun .blockmenu { + float:left; + width: 13em + } + +.pun .blockmenu li { + padding: 3px 0; + font-weight: bold; + } + +.pun .blockmenu a:link, .pun .blockmenu a:visited { + text-decoration: none + } + +.pun .blockmenu a:hover, .pun .blockmenu a:active { + text-decoration: underline + } + +#viewprofile dl { + float: left; + width: 100%; + overflow: hidden + } + +#viewprofile dd { + margin-left: 14em; + padding: 3px; + } + +#viewprofile dt { + float: left; + width: 13em; + margin: 3px 0; + } + +#profileavatar img { + float: right; + margin-left: 1em + } + +/***************************************************************** +8. MAIN POSTS +*****************************************************************/ + +.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { + text-decoration: none; + } + +.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { + text-decoration: underline; + } + +.pun .blockpost h2 .conr { + float: right; + text-align: right; + } + +#punsearch .blockpost h2 span { + white-space: nowrap; + } + +.pun .blockpost .box { + overflow: hidden; + } + +.pun .postleft, .pun .postfootleft { + float:left; + width: 18em; + overflow: hidden; + position: relative; + overflow: hidden; + } + +.pun .postleft dl { + padding: 0.75em 6px; + } + +.pun .postleft .usercontacts, .pun .postleft .icon { + margin-top: 6px + } + +.pun .postleft .postavatar, .pun .postleft .usertitle { + margin-bottom: 6px; + display: block; + } + +.pun .blockpost dt { + font-size: 1.091em; + font-weight: bold; + } + +.pun .blockpost dt a:link, .pun .blockpost dt a:visited { + text-decoration: none; + } + +.pun .blockpost dt a:hover, .pun .blockpost dt a:active { + text-decoration: underline; + } + +.pun .postright, .pun .postfootright { + border-left-width: 18em; + border-left-style: solid + } + +#postpreview .postright { + border-left: 0 + } + +.pun .postright { + padding: 0 6px; + } + +.pun .postfootright, .pun .multidelete { + text-align: right + } + +.pun .postmsg { + width:98%; + overflow: hidden; + padding-bottom: 6px; + } + +.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, +.pun .postfootleft p { + padding: 6px 6px 6px 6px; + } + +.pun .postfootright li { + display: inline; + } + +.pun .postfootright a:link, .pun .postfootright a:visited { + text-decoration: none + } + +.pun .postfootright a:hover, .pun .postfootright a:active { + text-decoration: underline + } + +.pun .codebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0; + } + +.pun .quotebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0 0.75em; + } + +.pun .quotebox cite { + display: block; + padding: 0.75em 0 0 0; + } + +.pun .quotebox blockquote { + width: 100%; + overflow: hidden + } + +.pun .codebox pre { + overflow: auto; + width: 100%; + overflow-y:hidden + } + +* html .pun .codebox pre { + padding-bottom: 10px; + } + +*+html .pun .codebox pre { + padding-bottom: 10px + } + +.pun .codebox pre code { + display: block; + padding: 0.75em; + } + +.pun .codebox pre.vscroll { + height: 32em; + overflow: auto; + overflow-y: auto + } + +.pun .postmsg img.postimg, .pun .postmsg a img.postimg { + max-width: 100% + vertical-align: middle; + } + +.pun .postmsg img { + vertical-align: bottom; + } + +.pun .postsignature hr { + margin-left: 0px; + width: 200px; + text-align: left; + height: 1px; + border:none + } + +.pun .blockpost label { + padding: 3px 6px; + border-style: solid; + border-width: 1px; + vertical-align: middle; + display: inline-block; + } + +.pun .blockpost label * { + vertical-align: middle; + margin: 0; + padding: 0; + } + /****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ +/* 9. HELP FILES AND MISC. */ /****************************************************************/ -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Lithium_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -#debug .tcr, .pun PRE {FONT-FAMILY: Consolas, monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} +#helpfile h2 { + margin-top: 12px + } + +#helpfile div.box { + padding: 10px + } + +/***************************************************************** +COLOUR SCHEME +*****************************************************************/ + +/* Background / Text +----------------------------------------------------------------*/ + +body { + background: #fff; + color: #333 + } + +.pun { + color: #333 + } + +.pun .box, #adminconsole fieldset th { + background-color: #f1f1f1 + } + +.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, +#adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { + background-color: #dedfdf + } + +.pun h2, #brdmenu { + background-color: #6c8a3f; + color: #fff + } + +.pun th { + background-color: #d1d1d1 + } + +.pun legend { + color: #6c8a3f + } + +.pun .blockmenu li.isactive a, #posterror li strong { + color: #333 + } + +.pun .usercontent * { + background: transparent; + color: #333 + } + +/* posts +----------------------------------------------------------------*/ + +.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { + background-color: #dedfdf + } + +.pun .postright, .pun .postfootright { + border-left-color: #f1f1f1 + } + +.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { + background-color: #f1f1f1 + } + +#helpfile .codebox, #helpfile .quotebox { + background-color: #f9f9f9; + } + +.pun .blockpost h2 { + background-color: #7ea34b + } + +.pun .blockpost h2 span.conr { + color: #b7d094 + } + +.pun hr { + background-color: #333; + color: #333 + } + +/* Borders +----------------------------------------------------------------*/ + +.pun .box { + border-color: #6c8a3f + } + +.pun td { + border-color: #cedeb9 + } + +.pun th, .pun fieldset { + border-color: #d1d1d1 + } + +#adminconsole td, #adminconsole th { + border-color: #f1f1f1 + } + +.pun .quotebox, .pun .codebox, .pun .forminfo, +.pun .blockpost label, .pun .deletemsg { + border-color: #aca899 #fff #fff #aca899 + } + +/* Links +----------------------------------------------------------------*/ + +.pun a:link, .pun a:visited { + color: #638137 + } + +.pun a:hover, .pun a:active, .pun a:focus { + color: #8eb653 + } + +.pun h2 a:link, .pun h2 a:visited, +#brdmenu a:link, #brdmenu a:visited { + color: #fff + } + +.pun h2 a:hover, .pun h2 a:active, +#brdmenu a:hover, #brdmenu a:active { + color: #fff + } + +.pun .postreport a:link, .pun .postreport a:visited, +.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { + color: #888 + } + +.pun .postreport a:hover, .pun .postreport a:active, +.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { + color: #aaa + } + +.pun .maintenancelink a:link, .pun .maintenancelink a:visited { + color: #b42000 + } + +.pun .maintenancelink a:hover, .pun .maintenancelink a:active { + color: #b42000 + } + +/* Status Indicators +----------------------------------------------------------------*/ + +.pun .icon { + border-color: #e6e6e6 #dedede #dadada #e2e2e2 + } + +.pun .iredirect .icon { + border-color: #f1f1f1 #f1f1f1 #f1f1f1 #f1f1f1 + } + +.pun .inew { + border-color: #8bb453 #7a9e48 #709142 #799c47 + } \ No newline at end of file diff --git a/upload/style/Mercury.css b/upload/style/Mercury.css index 034f100..83af8c4 100644 --- a/upload/style/Mercury.css +++ b/upload/style/Mercury.css @@ -1,247 +1,1023 @@ +/***************************************************************** +1. INITIAL SETTINGS +*****************************************************************/ + +/* Limited Reset +----------------------------------------------------------------*/ + +.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, +.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, +.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { + margin: 0; + padding: 0; + border: 0; + } + +.pun ul, .pun ol { + list-style: none + } + + +/* Structural Settings +----------------------------------------------------------------*/ + +.pun .clearer, .pun .nosize { + height: 0; + width: 0; + line-height: 0; + font-size: 0; + overflow: hidden + } + +.pun .clearer, .pun .clearb { + clear: both + } + +.pun .nosize { + position: absolute; + left: -9999em; + text-indent: -9999em; + width: 0; + } + +* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { + height: 1px + } + +.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { + min-height: 1px + } + + +/* Hidden Elements +----------------------------------------------------------------*/ + +#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, +#modcontrols dt, #searchlinks dt, div.postright h3 { + position: absolute; + display: block; + overflow: hidden; + width: 0; + left: -9999em; + text-indent: -9999em; + } + +/***************************************************************** +2. TEXT & CONTENT +*****************************************************************/ + +/* Text Defaults +----------------------------------------------------------------*/ + +.pun { + font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; + } + +.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea { + font-size: 1em; + font-family: verdana, helvetica, arial, sans-serif; + } + +.pun pre, .pun code { + font-size: 1.182em; + font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace + } + +.pun pre code { + font-size: 1em; + } + +.pun strong { + font-weight: bold; + } + +.pun em { + font-style: italic; + } + + +/* Content Defaults +----------------------------------------------------------------*/ + +.pun p, .pun ul, .pun ol, .pun dl { + font-size: 1em; + padding: 3px 0; + } + +.pun h2 { + font-size: 1em; + font-weight: normal; + padding: 4px 7px; + } + +.pun h3 { + font-size: 1.091em; + padding: 3px 0; + } + +.pun table p, .pun table h3 { + padding: 0; + } + +.pun span.warntext, .pun p.warntext { + font-weight: bold + } + +/* User Content (Announcements, Rules, Posts) +----------------------------------------------------------------*/ + +.pun .usercontent p, .pun .postmsg p { + padding: 0.75em 0 + } + +.pun .usercontent ul, .pun .postmsg ul { + padding: 0.75em 1em 0.75em 2.5em; + list-style: disc + } + +.pun .usercontent ol, .pun .postmsg ol { + padding: 0.75em 1em 0.75em 2.5em; + list-style: decimal + } + +.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { + list-style: lower-alpha + } + +.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { + padding: 0.25em 1em 0.75em 2.5em + } + +.pun .usercontent li p, .pun .postmsg li p { + padding: 0 + } + +.pun .usercontent h1 { + font-size: 1.4em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h2 { + font-size: 1.2em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h3 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { + font-size: 1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .quotebox cite { + font-weight: bold; + font-style: normal; + padding: 0.75em 0.75em 0 0.75em + } + +.pun span.bbu { + text-decoration: underline + } + +.pun div.postmsg h5, #helpfile h5 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0; + } + + +/***************************************************************** +3. COMMON STYLES +*****************************************************************/ + +/* Page Layout +----------------------------------------------------------------*/ + +#punwrap { + margin: 12px 20px + } + +#punredirect .block, #punmaint .block { + margin: 50px 20% 12px 20% + } + + +/* Vertical Element Spacing +----------------------------------------------------------------*/ + +#brdheader { + margin: 0 0 12px 0; + } + +#announce, #brdstats { + margin: 12px 0 12px 0; + } + +.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { + margin-bottom: 12px + } + +#punindex .blocktable, .pun .blockpost { + margin-bottom: 6px + } + +#postreview .box { + margin-bottom: 3px; + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-bottom: 0px + } + +.pun .linkst, .pun .linksb { + margin-top: -12px + } + +.pun .postlinksb { + margin-top: -6px + } + + +/* External Borders +----------------------------------------------------------------*/ + +.pun .box { + border-style: solid; + border-width: 1px; + } + +#brdheader .box { + border-top-width: 4px; + } + +/* Default Internal Spacing +----------------------------------------------------------------*/ + +.pun .block .inbox, .pun .blockmenu .inbox { + padding: 3px 6px + } + +/***************************************************************** +4. COMMON BOARD ELEMENTS +*****************************************************************/ + +/* Board Header +----------------------------------------------------------------*/ + +#brdtitle h1 { + font-size: 1.454em; + font-weight: bold; + line-height: 1em; + padding: 3px 0 0 0; + } + +#brdmenu li { + display: inline; + margin-right: 12px; + } + +#brdmenu a:link, #brdmenu a:visited { + text-decoration: none + } + +#brdmenu a:hover, #brdmenu a:active { + text-decoration: underline + } + +#brdwelcome .conl { + float: left; + } + +#brdwelcome .conr { + float: right; + text-align: right; + } + +/* Breadcrumbs and Post Links +----------------------------------------------------------------*/ + +.pun .linkst { + padding: 8px 6px 3px 6px + } + +.pun .linksb, .pun .postlinksb { + padding: 3px 6px 8px 6px + } + +.pun .crumbs { + clear: both; + width: 100%; + overflow: hidden; + } + +.pun .crumbs li { + display: inline; + white-space: nowrap; + font-weight: bold; + } + +.pun .pagelink { + float: left; + white-space: nowrap; + } + +.pun .postlink { + font-weight: bold; + white-space: nowrap; + } + +.pun .postlink, .pun .modbuttons { + float: right; + text-align: right; + } + +.pun .modbuttons { + padding: 1px 0; + white-space: nowrap; + } + +.pun .modbuttons input { + margin-left: 6px; + } + +.pun .postlink a:link, .pun .postlink a:visited { + text-decoration: none + } + +.pun .postlink a:hover, .pun .postlink a:active { + text-decoration: underline; + } + + +/* Board Footer +----------------------------------------------------------------*/ + +#brdfooter .conl { + float: left; + } + +#brdfooter .conr { + float: right; + text-align: right; + } + + +/* Board Stats +----------------------------------------------------------------*/ + +#brdstats .conl { + float: left; + } + +#brdstats .conr { + float: right; + text-align: right; + } + +#onlinelist dd, #onlinelist dt { + display: inline; + } + + +/***************************************************************** +5. MAIN TABLES +*****************************************************************/ + +.pun table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; + } + +.pun .blocktable table { + table-layout: fixed; + } + +.pun td, .pun th { + padding: 4px 6px; + line-height: 1.273em; + text-align: left; + font-weight: normal; + } + +.pun td { + border-style: solid none none solid; + border-width: 1px; + } + +.pun .tcl { + border-left: 0; + width: auto; + } + +.pun .tc2, .pun .tc3, .pun .tcmod { + width: 10%; + text-align: center; + padding: 4px 0; + } + +.pun .tcr { + width: 30%; + } + +.pun .tcl h3 { + font-size: 1.091em; + font-weight: bold; + } + +.pun .tcl span.newtext, .pun .tcl span.pagestext { + white-space: nowrap + } + +.pun .tcl p { + padding: 5px 0 0 0 + } + +#punsearch #vf .tc2 { + width: 18%; + text-align: left; + padding: 4px 6px; + } + +#users1 .tcr { + width: 25% + } + +#users1 .tc2 { + width: 25%; + text-align: left; + padding: 4px 6px; + } + +#debug .tcl { + width: 10% + } + +#debug .tcr { + width: 90%; + white-space: normal + } + +#punindex .tcr .byuser { + display: block + } + +.pun .blocktable .tclcon { + padding: 0 11px 0 12px; + overflow: hidden; + height: 1%; + min-height: 1px; + position: relative; + } + +.pun .blocktable .tclcon div { + width: 100%; + overflow: hidden; + } + +.pun .icon { + border-width: 7px; + border-style: solid; + height: 0; + width: 0; + overflow: hidden; + float: left; + } + +.pun .icon div { + position: absolute; + left: -9999em; + text-indent: -9999em; + height: 0; + } + +.pun .iposted .ipost { + position: absolute; + left: 0; + font-weight: bold; + width: 8px; + padding-left: 4px; + text-align: center; + top: 0; + } + +/***************************************************************** +6. MAIN FORMS +*****************************************************************/ + +.pun .blockform form, .pun .fakeform { + PADDING: 20px 20px 15px 20px + } + +.pun .forminfo { + margin-bottom: 12px; + padding: 9px 10px; + border-style: solid; + border-width: 1px; + } + +.pun .forminfo h3 { + font-weight: bold; + } + +.pun .inform { + padding-bottom: 12px + } + +.pun fieldset { + padding: 0px 12px 0px 12px; + border-style: solid; + border-width: 1px + } + +.pun legend { + padding: 0px 6px + } + +.pun .infldset { + padding: 9px 0px 12px 0 + } + +.pun label { + display: block; + padding: 3px 0 + } + +.pun label.conl { + float: left; + overflow: visible; + margin-right: 10px + } + +.pun select { + padding-top: 1px; + padding-bottom: 1px; + } + +.pun fieldset .rbox { + } + +.pun fieldset .rbox br { + display: none; + } + +.pun fieldset .rbox label { + padding: 3px 0 3px 25px; + position: relative; + vertical-align: middle; + } + +.pun fieldset .rbox input { + margin: 0 9px 0 -25px; + padding: 0; + width: 16px; + position: relative; + vertical-align: middle; + } + +.pun .txtarea { + width: 75% + } + +.pun .txtarea textarea, .pun input.longinput { + width: 100% + } + +.pun .bblinks { + padding-bottom: 10px; + padding-left: 4px + } + +.pun .bblinks li { + display: inline; + padding-right: 20px + } + +.pun .blockform .buttons { + padding-left: 12px; + } + +.pun .blockform .buttons input { + margin-right: 8px; + } + +#posterror ul { + list-style: square; + padding: 3px 0 3px 24px; + } + +.pun .deletemsg { + border-style: solid; + border-width: 1px; + padding: 6px 15px; + } + + +/***************************************************************** +7. PROFILES AND ADMIN +*****************************************************************/ + +.pun .block2col { + padding-bottom: 1px + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-left: 14em + } + +.pun .blockmenu { + float:left; + width: 13em + } + +.pun .blockmenu li { + padding: 3px 0; + font-weight: bold; + } + +.pun .blockmenu a:link, .pun .blockmenu a:visited { + text-decoration: none + } + +.pun .blockmenu a:hover, .pun .blockmenu a:active { + text-decoration: underline + } + +#viewprofile dl { + float: left; + width: 100%; + overflow: hidden + } + +#viewprofile dd { + margin-left: 14em; + padding: 3px; + } + +#viewprofile dt { + float: left; + width: 13em; + margin: 3px 0; + } + +#profileavatar img { + float: right; + margin-left: 1em + } + +/***************************************************************** +8. MAIN POSTS +*****************************************************************/ + +.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { + text-decoration: none; + } + +.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { + text-decoration: underline; + } + +.pun .blockpost h2 .conr { + float: right; + text-align: right; + } + +#punsearch .blockpost h2 span { + white-space: nowrap; + } + +.pun .blockpost .box { + overflow: hidden; + } + +.pun .postleft, .pun .postfootleft { + float:left; + width: 18em; + overflow: hidden; + position: relative; + overflow: hidden; + } + +.pun .postleft dl { + padding: 0.75em 6px; + } + +.pun .postleft .usercontacts, .pun .postleft .icon { + margin-top: 6px + } + +.pun .postleft .postavatar, .pun .postleft .usertitle { + margin-bottom: 6px; + display: block; + } + +.pun .blockpost dt { + font-size: 1.091em; + font-weight: bold; + } + +.pun .blockpost dt a:link, .pun .blockpost dt a:visited { + text-decoration: none; + } + +.pun .blockpost dt a:hover, .pun .blockpost dt a:active { + text-decoration: underline; + } + +.pun .postright, .pun .postfootright { + border-left-width: 18em; + border-left-style: solid + } + +#postpreview .postright { + border-left: 0 + } + +.pun .postright { + padding: 0 6px; + } + +.pun .postfootright, .pun .multidelete { + text-align: right + } + +.pun .postmsg { + width:98%; + overflow: hidden; + padding-bottom: 6px; + } + +.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, +.pun .postfootleft p { + padding: 6px 6px 6px 6px; + } + +.pun .postfootright li { + display: inline; + } + +.pun .postfootright a:link, .pun .postfootright a:visited { + text-decoration: none + } + +.pun .postfootright a:hover, .pun .postfootright a:active { + text-decoration: underline + } + +.pun .codebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0; + } + +.pun .quotebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0 0.75em; + } + +.pun .quotebox cite { + display: block; + padding: 0.75em 0 0 0; + } + +.pun .quotebox blockquote { + width: 100%; + overflow: hidden + } + +.pun .codebox pre { + overflow: auto; + width: 100%; + overflow-y:hidden + } + +* html .pun .codebox pre { + padding-bottom: 10px; + } + +*+html .pun .codebox pre { + padding-bottom: 10px + } + +.pun .codebox pre code { + display: block; + padding: 0.75em; + } + +.pun .codebox pre.vscroll { + height: 32em; + overflow: auto; + overflow-y: auto + } + +.pun .postmsg img.postimg, .pun .postmsg a img.postimg { + max-width: 100% + vertical-align: middle; + } + +.pun .postmsg img { + vertical-align: bottom; + } + +.pun .postsignature hr { + margin-left: 0px; + width: 200px; + text-align: left; + height: 1px; + border:none + } + +.pun .blockpost label { + padding: 3px 6px; + border-style: solid; + border-width: 1px; + vertical-align: middle; + display: inline-block; + } + +.pun .blockpost label * { + vertical-align: middle; + margin: 0; + padding: 0; + } + /****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ +/* 9. HELP FILES AND MISC. */ /****************************************************************/ -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Mercury_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -#debug .tcr, .pun PRE {FONT-FAMILY: Consolas, monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} +#helpfile h2 { + margin-top: 12px + } + +#helpfile div.box { + padding: 10px + } + +/***************************************************************** +COLOUR SCHEME +*****************************************************************/ + +/* Background / Text +----------------------------------------------------------------*/ + +body { + background: #2a2a2a; + color: #d4d4d4 + } + +.pun { + color: #d4d4d4 + } + +.pun .box, #adminconsole fieldset th { + background-color: #383838 + } + +.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, +#adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { + background-color: #424242 + } + +.pun h2, #brdmenu { + background-color: #565656; + color: #d4d4d4 + } + +.pun th { + background-color: #484848 + } + +.pun legend { + color: #f6b620 + } + +.pun .blockmenu li.isactive a, #posterror li strong { + color: #d4d4d4 + } + +.pun .usercontent * { + background: transparent; + color: #d4d4d4 + } + +.pun textarea, .pun input, .pun select { + background-color: #2a2a2a; + color: #d4d4d4 + } + +/* Posts +----------------------------------------------------------------*/ + +.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { + background-color: #383838 + } + +.pun .postright, .pun .postfootright { + border-left-color: #424242 + } + +.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { + background-color: #424242 + } + +.pun .blockpost h2 { + background-color: #565656 + } + +.pun .blockpost h2 span.conr { + color: #a19e96 + } + +.pun hr { + background-color: #606060; + color: #606060 + } + +/* Borders +----------------------------------------------------------------*/ + +.pun .box { + border-color:#565656 + } + +.pun td { + border-color: #565656 + } + +.pun th, .pun fieldset { + border-color: #484848 + } + +#adminconsole td, #adminconsole th { + border-color: #383838 + } + +.pun .quotebox, .pun .codebox, .pun .forminfo, +.pun .blockpost label, .pun .deletemsg { + border-color: #565656 + } + +/* Links +----------------------------------------------------------------*/ + +.pun a:link, .pun a:visited { + color: #f6b620 + } + +.pun a:hover, .pun a:active, .pun a:focus { + color: #ffee40 + } + +.pun h2 a:link, .pun h2 a:visited, +#brdmenu a:link, #brdmenu a:visited { + color: #d4d4d4 + } + +.pun h2 a:hover, .pun h2 a:active, +#brdmenu a:hover, #brdmenu a:active { + color: #d4d4d4 + } + +.pun .postreport a:link, .pun .postreport a:visited, +.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { + color: #888 + } + +.pun .postreport a:hover, .pun .postreport a:active, +.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { + color: #aaa + } + +.pun .maintenancelink a:link, .pun .maintenancelink a:visited { + color: #ff4000 + } + +.pun .maintenancelink a:hover, .pun .maintenancelink a:active { + color: #ff5010 + } + +/* Status Indicators +----------------------------------------------------------------*/ + +.pun .icon { + border-color: #484848 #404040 #3c3c3c #444444 + } + +.pun .iredirect .icon { + border-color: #383838 #383838 #383838 #383838 + } + +.pun .inew { + border-color: #f6b620 #ecae1f #d09a1b #e1a61d + } \ No newline at end of file diff --git a/upload/style/Oxygen.css b/upload/style/Oxygen.css index 882fbfa..22e9294 100644 --- a/upload/style/Oxygen.css +++ b/upload/style/Oxygen.css @@ -1,248 +1,1022 @@ +/***************************************************************** +1. INITIAL SETTINGS +*****************************************************************/ + +/* Limited Reset +----------------------------------------------------------------*/ + +.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, +.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, +.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { + margin: 0; + padding: 0; + border: 0; + } + +.pun ul, .pun ol { + list-style: none + } + + +/* Structural Settings +----------------------------------------------------------------*/ + +.pun .clearer, .pun .nosize { + height: 0; + width: 0; + line-height: 0; + font-size: 0; + overflow: hidden + } + +.pun .clearer, .pun .clearb { + clear: both + } + +.pun .nosize { + position: absolute; + left: -9999em; + text-indent: -9999em; + width: 0; + } + +* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { + height: 1px + } + +.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { + min-height: 1px + } + + +/* Hidden Elements +----------------------------------------------------------------*/ + +#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, +#modcontrols dt, #searchlinks dt, div.postright h3 { + position: absolute; + display: block; + overflow: hidden; + width: 0; + left: -9999em; + text-indent: -9999em; + } + +/***************************************************************** +2. TEXT & CONTENT +*****************************************************************/ + +/* Text Defaults +----------------------------------------------------------------*/ + +.pun { + font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; + } + +.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea { + font-size: 1em; + font-family: verdana, helvetica, arial, sans-serif; + } + +.pun pre, .pun code { + font-size: 1.182em; + font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace + } + +.pun pre code { + font-size: 1em; + } + +.pun strong { + font-weight: bold; + } + +.pun em { + font-style: italic; + } + + +/* Content Defaults +----------------------------------------------------------------*/ + +.pun p, .pun ul, .pun ol, .pun dl { + font-size: 1em; + padding: 3px 0; + } + +.pun h2 { + font-size: 1em; + font-weight: normal; + padding: 4px 7px; + } + +.pun h3 { + font-size: 1.091em; + padding: 3px 0; + } + +.pun table p, .pun table h3 { + padding: 0; + } + +.pun span.warntext, .pun p.warntext { + font-weight: bold + } + +/* User Content (Announcements, Rules, Posts) +----------------------------------------------------------------*/ + +.pun .usercontent p, .pun .postmsg p { + padding: 0.75em 0 + } + +.pun .usercontent ul, .pun .postmsg ul { + padding: 0.75em 1em 0.75em 2.5em; + list-style: disc + } + +.pun .usercontent ol, .pun .postmsg ol { + padding: 0.75em 1em 0.75em 2.5em; + list-style: decimal + } + +.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { + list-style: lower-alpha + } + +.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { + padding: 0.25em 1em 0.75em 2.5em + } + +.pun .usercontent li p, .pun .postmsg li p { + padding: 0 + } + +.pun .usercontent h1 { + font-size: 1.4em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h2 { + font-size: 1.2em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h3 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { + font-size: 1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .quotebox cite { + font-weight: bold; + font-style: normal; + padding: 0.75em 0.75em 0 0.75em + } + +.pun span.bbu { + text-decoration: underline + } + +.pun div.postmsg h5, #helpfile h5 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0; + } + + +/***************************************************************** +3. COMMON STYLES +*****************************************************************/ + +/* Page Layout +----------------------------------------------------------------*/ + +#punwrap { + margin: 12px 20px + } + +#punredirect .block, #punmaint .block { + margin: 50px 20% 12px 20% + } + + +/* Vertical Element Spacing +----------------------------------------------------------------*/ + +#brdheader { + margin: 0 0 12px 0; + } + +#announce, #brdstats { + margin: 12px 0 12px 0; + } + +.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { + margin-bottom: 12px + } + +#punindex .blocktable, .pun .blockpost { + margin-bottom: 6px + } + +#postreview .box { + margin-bottom: 3px; + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-bottom: 0px + } + +.pun .linkst, .pun .linksb { + margin-top: -12px + } + +.pun .postlinksb { + margin-top: -6px + } + + +/* External Borders +----------------------------------------------------------------*/ + +.pun .box { + border-style: solid; + border-width: 1px; + } + +#brdheader .box { + border-top-width: 4px; + } + +/* Default Internal Spacing +----------------------------------------------------------------*/ + +.pun .block .inbox, .pun .blockmenu .inbox { + padding: 3px 6px + } + +/***************************************************************** +4. COMMON BOARD ELEMENTS +*****************************************************************/ + +/* Board Header +----------------------------------------------------------------*/ + +#brdtitle h1 { + font-size: 1.454em; + font-weight: bold; + line-height: 1em; + padding: 3px 0 0 0; + } + +#brdmenu li { + display: inline; + margin-right: 12px; + } + +#brdmenu a:link, #brdmenu a:visited { + text-decoration: none + } + +#brdmenu a:hover, #brdmenu a:active { + text-decoration: underline + } + +#brdwelcome .conl { + float: left; + } + +#brdwelcome .conr { + float: right; + text-align: right; + } + +/* Breadcrumbs and Post Links +----------------------------------------------------------------*/ + +.pun .linkst { + padding: 8px 6px 3px 6px + } + +.pun .linksb, .pun .postlinksb { + padding: 3px 6px 8px 6px + } + +.pun .crumbs { + clear: both; + width: 100%; + overflow: hidden; + } + +.pun .crumbs li { + display: inline; + white-space: nowrap; + font-weight: bold; + } + +.pun .pagelink { + float: left; + white-space: nowrap; + } + +.pun .postlink { + font-weight: bold; + white-space: nowrap; + } + +.pun .postlink, .pun .modbuttons { + float: right; + text-align: right; + } + +.pun .modbuttons { + padding: 1px 0; + white-space: nowrap; + } + +.pun .modbuttons input { + margin-left: 6px; + } + +.pun .postlink a:link, .pun .postlink a:visited { + text-decoration: none + } + +.pun .postlink a:hover, .pun .postlink a:active { + text-decoration: underline; + } + + +/* Board Footer +----------------------------------------------------------------*/ + +#brdfooter .conl { + float: left; + } + +#brdfooter .conr { + float: right; + text-align: right; + } + + +/* Board Stats +----------------------------------------------------------------*/ + +#brdstats .conl { + float: left; + } + +#brdstats .conr { + float: right; + text-align: right; + } + +#onlinelist dd, #onlinelist dt { + display: inline; + } + + +/***************************************************************** +5. MAIN TABLES +*****************************************************************/ + +.pun table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; + } + +.pun .blocktable table { + table-layout: fixed; + } + +.pun td, .pun th { + padding: 4px 6px; + line-height: 1.273em; + text-align: left; + font-weight: normal; + } + +.pun td { + border-style: solid none none solid; + border-width: 1px; + } + +.pun .tcl { + border-left: 0; + width: auto; + } + +.pun .tc2, .pun .tc3, .pun .tcmod { + width: 10%; + text-align: center; + padding: 4px 0; + } + +.pun .tcr { + width: 30%; + } + +.pun .tcl h3 { + font-size: 1.091em; + font-weight: bold; + } + +.pun .tcl span.newtext, .pun .tcl span.pagestext { + white-space: nowrap + } + +.pun .tcl p { + padding: 5px 0 0 0 + } + +#punsearch #vf .tc2 { + width: 18%; + text-align: left; + padding: 4px 6px; + } + +#users1 .tcr { + width: 25% + } + +#users1 .tc2 { + width: 25%; + text-align: left; + padding: 4px 6px; + } + +#debug .tcl { + width: 10% + } + +#debug .tcr { + width: 90%; + white-space: normal + } + +#punindex .tcr .byuser { + display: block + } + +.pun .blocktable .tclcon { + padding: 0 11px 0 12px; + overflow: hidden; + height: 1%; + min-height: 1px; + position: relative; + } + +.pun .blocktable .tclcon div { + width: 100%; + overflow: hidden; + } + +.pun .icon { + border-width: 7px; + border-style: solid; + height: 0; + width: 0; + overflow: hidden; + float: left; + } + +.pun .icon div { + position: absolute; + left: -9999em; + text-indent: -9999em; + height: 0; + } + +.pun .iposted .ipost { + position: absolute; + left: 0; + font-weight: bold; + width: 8px; + padding-left: 4px; + text-align: center; + top: 0; + } + +/***************************************************************** +6. MAIN FORMS +*****************************************************************/ + +.pun .blockform form, .pun .fakeform { + PADDING: 20px 20px 15px 20px + } + +.pun .forminfo { + margin-bottom: 12px; + padding: 9px 10px; + border-style: solid; + border-width: 1px; + } + +.pun .forminfo h3 { + font-weight: bold; + } + +.pun .inform { + padding-bottom: 12px + } + +.pun fieldset { + padding: 0px 12px 0px 12px; + border-style: solid; + border-width: 1px + } + +.pun legend { + padding: 0px 6px + } + +.pun .infldset { + padding: 9px 0px 12px 0 + } + +.pun label { + display: block; + padding: 3px 0 + } + +.pun label.conl { + float: left; + overflow: visible; + margin-right: 10px + } + +.pun select { + padding-top: 1px; + padding-bottom: 1px; + } + +.pun fieldset .rbox { + } + +.pun fieldset .rbox br { + display: none; + } + +.pun fieldset .rbox label { + padding: 3px 0 3px 25px; + position: relative; + vertical-align: middle; + } + +.pun fieldset .rbox input { + margin: 0 9px 0 -25px; + padding: 0; + width: 16px; + position: relative; + vertical-align: middle; + } + +.pun .txtarea { + width: 75% + } + +.pun .txtarea textarea, .pun input.longinput { + width: 100% + } + +.pun .bblinks { + padding-bottom: 10px; + padding-left: 4px + } + +.pun .bblinks li { + display: inline; + padding-right: 20px + } + +.pun .blockform .buttons { + padding-left: 12px; + } + +.pun .blockform .buttons input { + margin-right: 8px; + } + +#posterror ul { + list-style: square; + padding: 3px 0 3px 24px; + } + +.pun .deletemsg { + border-style: solid; + border-width: 1px; + padding: 6px 15px; + } + + +/***************************************************************** +7. PROFILES AND ADMIN +*****************************************************************/ + +.pun .block2col { + padding-bottom: 1px + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-left: 14em + } + +.pun .blockmenu { + float:left; + width: 13em + } + +.pun .blockmenu li { + padding: 3px 0; + font-weight: bold; + } + +.pun .blockmenu a:link, .pun .blockmenu a:visited { + text-decoration: none + } + +.pun .blockmenu a:hover, .pun .blockmenu a:active { + text-decoration: underline + } + +#viewprofile dl { + float: left; + width: 100%; + overflow: hidden + } + +#viewprofile dd { + margin-left: 14em; + padding: 3px; + } + +#viewprofile dt { + float: left; + width: 13em; + margin: 3px 0; + } + +#profileavatar img { + float: right; + margin-left: 1em + } + +/***************************************************************** +8. MAIN POSTS +*****************************************************************/ + +.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { + text-decoration: none; + } + +.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { + text-decoration: underline; + } + +.pun .blockpost h2 .conr { + float: right; + text-align: right; + } + +#punsearch .blockpost h2 span { + white-space: nowrap; + } + +.pun .blockpost .box { + overflow: hidden; + } + +.pun .postleft, .pun .postfootleft { + float:left; + width: 18em; + overflow: hidden; + position: relative; + overflow: hidden; + } + +.pun .postleft dl { + padding: 0.75em 6px; + } + +.pun .postleft .usercontacts, .pun .postleft .icon { + margin-top: 6px + } + +.pun .postleft .postavatar, .pun .postleft .usertitle { + margin-bottom: 6px; + display: block; + } + +.pun .blockpost dt { + font-size: 1.091em; + font-weight: bold; + } + +.pun .blockpost dt a:link, .pun .blockpost dt a:visited { + text-decoration: none; + } + +.pun .blockpost dt a:hover, .pun .blockpost dt a:active { + text-decoration: underline; + } + +.pun .postright, .pun .postfootright { + border-left-width: 18em; + border-left-style: solid + } + +#postpreview .postright { + border-left: 0 + } + +.pun .postright { + padding: 0 6px; + } + +.pun .postfootright, .pun .multidelete { + text-align: right + } + +.pun .postmsg { + width:98%; + overflow: hidden; + padding-bottom: 6px; + } + +.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, +.pun .postfootleft p { + padding: 6px 6px 6px 6px; + } + +.pun .postfootright li { + display: inline; + } + +.pun .postfootright a:link, .pun .postfootright a:visited { + text-decoration: none + } + +.pun .postfootright a:hover, .pun .postfootright a:active { + text-decoration: underline + } + +.pun .codebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0; + } + +.pun .quotebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0 0.75em; + } + +.pun .quotebox cite { + display: block; + padding: 0.75em 0 0 0; + } + +.pun .quotebox blockquote { + width: 100%; + overflow: hidden + } + +.pun .codebox pre { + overflow: auto; + width: 100%; + overflow-y:hidden + } + +* html .pun .codebox pre { + padding-bottom: 10px; + } + +*+html .pun .codebox pre { + padding-bottom: 10px + } + +.pun .codebox pre code { + display: block; + padding: 0.75em; + } + +.pun .codebox pre.vscroll { + height: 32em; + overflow: auto; + overflow-y: auto + } + +.pun .postmsg img.postimg, .pun .postmsg a img.postimg { + max-width: 100% + vertical-align: middle; + } + +.pun .postmsg img { + vertical-align: bottom; + } + +.pun .postsignature hr { + margin-left: 0px; + width: 200px; + text-align: left; + height: 1px; + border:none + } + +.pun .blockpost label { + padding: 3px 6px; + border-style: solid; + border-width: 1px; + vertical-align: middle; + display: inline-block; + } + +.pun .blockpost label * { + vertical-align: middle; + margin: 0; + padding: 0; + } + /****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ +/* 9. HELP FILES AND MISC. */ /****************************************************************/ -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Oxygen_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -#debug .tcr, .pun PRE {FONT-FAMILY: Consolas, monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ - -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} +#helpfile h2 { + margin-top: 12px + } + +#helpfile div.box { + padding: 10px + } + +/***************************************************************** +COLOUR SCHEME +*****************************************************************/ + +/* Background / Text +----------------------------------------------------------------*/ + +body { + background: #fff; + color: #333 + } + +.pun { + color: #333 + } + +.pun .box, #adminconsole fieldset th { + background-color: #f1f1f1 + } + +.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, +#adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { + background-color: #dedfdf + } + +.pun h2, #brdmenu { + background-color: #0066b9; + color: #fff + } + +.pun th { + background-color: #d1d1d1 + } + +.pun legend { + color: #005cb1 + } + +.pun .blockmenu li.isactive a, #posterror li strong { + color: #333 + } + +.pun .usercontent * { + background: transparent; + color: #333 + } + +/* Posts +----------------------------------------------------------------*/ + +.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { + background-color: #dedfdf + } + +.pun .postright, .pun .postfootright { + border-left-color: #f1f1f1 + } + +.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { + background-color: #f1f1f1 + } + +#helpfile .codebox, #helpfile .quotebox { + background-color: #f9f9f9; + } + +.pun .blockpost h2 { + background-color: #006fc9 + } + +.pun .blockpost h2 span.conr { + color: #aabdcd + } + +.pun hr { + background-color: #333; + color: #333 + } + +/* Borders +----------------------------------------------------------------*/ + +.pun .box { + border-color: #0066b9 + } + +.pun td { + border-color: #bbcede + } + +.pun th, .pun fieldset { + border-color: #d1d1d1 + } + +#adminconsole td, #adminconsole th { + border-color: #f1f1f1 + } + +.pun .quotebox, .pun .codebox, .pun .forminfo, +.pun .blockpost label, .pun .deletemsg { + border-color: #aca899 #fff #fff #aca899 + } + +/* Links +----------------------------------------------------------------*/ + +.pun a:link, .pun a:visited { + color: #005cb1 + } + +.pun a:hover, .pun a:active, .pun a:focus { + color: #b42000 + } + +.pun h2 a:link, .pun h2 a:visited, +#brdmenu a:link, #brdmenu a:visited { + color: #fff + } + +.pun h2 a:hover, .pun h2 a:active, +#brdmenu a:hover, #brdmenu a:active { + color: #fff + } + +.pun .postreport a:link, .pun .postreport a:visited, +.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { + color: #888 + } + +.pun .postreport a:hover, .pun .postreport a:active, +.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { + color: #aaa + } + +.pun .maintenancelink a:link, .pun .maintenancelink a:visited { + color: #b42000 + } + +.pun .maintenancelink a:hover, .pun .maintenancelink a:active { + color: #b42000 + } + +/* Status Indicators +----------------------------------------------------------------*/ + +.pun .icon { + border-color: #e6e6e6 #dedede #dadada #e2e2e2 + } + +.pun .iredirect .icon { + border-color: #f1f1f1 #f1f1f1 #f1f1f1 #f1f1f1 + } + +.pun .inew { + border-color: #0080d7 #0065c0 #0058b3 #0072ca + } \ No newline at end of file diff --git a/upload/style/Radium.css b/upload/style/Radium.css index 4824f84..3e649c8 100644 --- a/upload/style/Radium.css +++ b/upload/style/Radium.css @@ -1,247 +1,1023 @@ +/***************************************************************** +1. INITIAL SETTINGS +*****************************************************************/ + +/* Limited Reset +----------------------------------------------------------------*/ + +.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, +.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, +.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { + margin: 0; + padding: 0; + border: 0; + } + +.pun ul, .pun ol { + list-style: none + } + + +/* Structural Settings +----------------------------------------------------------------*/ + +.pun .clearer, .pun .nosize { + height: 0; + width: 0; + line-height: 0; + font-size: 0; + overflow: hidden + } + +.pun .clearer, .pun .clearb { + clear: both + } + +.pun .nosize { + position: absolute; + left: -9999em; + text-indent: -9999em; + width: 0; + } + +* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { + height: 1px + } + +.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { + min-height: 1px + } + + +/* Hidden Elements +----------------------------------------------------------------*/ + +#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, +#modcontrols dt, #searchlinks dt, div.postright h3 { + position: absolute; + display: block; + overflow: hidden; + width: 0; + left: -9999em; + text-indent: -9999em; + } + +/***************************************************************** +2. TEXT & CONTENT +*****************************************************************/ + +/* Text Defaults +----------------------------------------------------------------*/ + +.pun { + font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; + } + +.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea { + font-size: 1em; + font-family: verdana, helvetica, arial, sans-serif; + } + +.pun pre, .pun code { + font-size: 1.182em; + font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace + } + +.pun pre code { + font-size: 1em; + } + +.pun strong { + font-weight: bold; + } + +.pun em { + font-style: italic; + } + + +/* Content Defaults +----------------------------------------------------------------*/ + +.pun p, .pun ul, .pun ol, .pun dl { + font-size: 1em; + padding: 3px 0; + } + +.pun h2 { + font-size: 1em; + font-weight: normal; + padding: 4px 7px; + } + +.pun h3 { + font-size: 1.091em; + padding: 3px 0; + } + +.pun table p, .pun table h3 { + padding: 0; + } + +.pun span.warntext, .pun p.warntext { + font-weight: bold + } + +/* User Content (Announcements, Rules, Posts) +----------------------------------------------------------------*/ + +.pun .usercontent p, .pun .postmsg p { + padding: 0.75em 0 + } + +.pun .usercontent ul, .pun .postmsg ul { + padding: 0.75em 1em 0.75em 2.5em; + list-style: disc + } + +.pun .usercontent ol, .pun .postmsg ol { + padding: 0.75em 1em 0.75em 2.5em; + list-style: decimal + } + +.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { + list-style: lower-alpha + } + +.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { + padding: 0.25em 1em 0.75em 2.5em + } + +.pun .usercontent li p, .pun .postmsg li p { + padding: 0 + } + +.pun .usercontent h1 { + font-size: 1.4em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h2 { + font-size: 1.2em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h3 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { + font-size: 1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .quotebox cite { + font-weight: bold; + font-style: normal; + padding: 0.75em 0.75em 0 0.75em + } + +.pun span.bbu { + text-decoration: underline + } + +.pun div.postmsg h5, #helpfile h5 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0; + } + + +/***************************************************************** +3. COMMON STYLES +*****************************************************************/ + +/* Page Layout +----------------------------------------------------------------*/ + +#punwrap { + margin: 12px 20px + } + +#punredirect .block, #punmaint .block { + margin: 50px 20% 12px 20% + } + + +/* Vertical Element Spacing +----------------------------------------------------------------*/ + +#brdheader { + margin: 0 0 12px 0; + } + +#announce, #brdstats { + margin: 12px 0 12px 0; + } + +.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { + margin-bottom: 12px + } + +#punindex .blocktable, .pun .blockpost { + margin-bottom: 6px + } + +#postreview .box { + margin-bottom: 3px; + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-bottom: 0px + } + +.pun .linkst, .pun .linksb { + margin-top: -12px + } + +.pun .postlinksb { + margin-top: -6px + } + + +/* External Borders +----------------------------------------------------------------*/ + +.pun .box { + border-style: solid; + border-width: 1px; + } + +#brdheader .box { + border-top-width: 4px; + } + +/* Default Internal Spacing +----------------------------------------------------------------*/ + +.pun .block .inbox, .pun .blockmenu .inbox { + padding: 3px 6px + } + +/***************************************************************** +4. COMMON BOARD ELEMENTS +*****************************************************************/ + +/* Board Header +----------------------------------------------------------------*/ + +#brdtitle h1 { + font-size: 1.454em; + font-weight: bold; + line-height: 1em; + padding: 3px 0 0 0; + } + +#brdmenu li { + display: inline; + margin-right: 12px; + } + +#brdmenu a:link, #brdmenu a:visited { + text-decoration: none + } + +#brdmenu a:hover, #brdmenu a:active { + text-decoration: underline + } + +#brdwelcome .conl { + float: left; + } + +#brdwelcome .conr { + float: right; + text-align: right; + } + +/* Breadcrumbs and Post Links +----------------------------------------------------------------*/ + +.pun .linkst { + padding: 8px 6px 3px 6px + } + +.pun .linksb, .pun .postlinksb { + padding: 3px 6px 8px 6px + } + +.pun .crumbs { + clear: both; + width: 100%; + overflow: hidden; + } + +.pun .crumbs li { + display: inline; + white-space: nowrap; + font-weight: bold; + } + +.pun .pagelink { + float: left; + white-space: nowrap; + } + +.pun .postlink { + font-weight: bold; + white-space: nowrap; + } + +.pun .postlink, .pun .modbuttons { + float: right; + text-align: right; + } + +.pun .modbuttons { + padding: 1px 0; + white-space: nowrap; + } + +.pun .modbuttons input { + margin-left: 6px; + } + +.pun .postlink a:link, .pun .postlink a:visited { + text-decoration: none + } + +.pun .postlink a:hover, .pun .postlink a:active { + text-decoration: underline; + } + + +/* Board Footer +----------------------------------------------------------------*/ + +#brdfooter .conl { + float: left; + } + +#brdfooter .conr { + float: right; + text-align: right; + } + + +/* Board Stats +----------------------------------------------------------------*/ + +#brdstats .conl { + float: left; + } + +#brdstats .conr { + float: right; + text-align: right; + } + +#onlinelist dd, #onlinelist dt { + display: inline; + } + + +/***************************************************************** +5. MAIN TABLES +*****************************************************************/ + +.pun table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; + } + +.pun .blocktable table { + table-layout: fixed; + } + +.pun td, .pun th { + padding: 4px 6px; + line-height: 1.273em; + text-align: left; + font-weight: normal; + } + +.pun td { + border-style: solid none none solid; + border-width: 1px; + } + +.pun .tcl { + border-left: 0; + width: auto; + } + +.pun .tc2, .pun .tc3, .pun .tcmod { + width: 10%; + text-align: center; + padding: 4px 0; + } + +.pun .tcr { + width: 30%; + } + +.pun .tcl h3 { + font-size: 1.091em; + font-weight: bold; + } + +.pun .tcl span.newtext, .pun .tcl span.pagestext { + white-space: nowrap + } + +.pun .tcl p { + padding: 5px 0 0 0 + } + +#punsearch #vf .tc2 { + width: 18%; + text-align: left; + padding: 4px 6px; + } + +#users1 .tcr { + width: 25% + } + +#users1 .tc2 { + width: 25%; + text-align: left; + padding: 4px 6px; + } + +#debug .tcl { + width: 10% + } + +#debug .tcr { + width: 90%; + white-space: normal + } + +#punindex .tcr .byuser { + display: block + } + +.pun .blocktable .tclcon { + padding: 0 11px 0 12px; + overflow: hidden; + height: 1%; + min-height: 1px; + position: relative; + } + +.pun .blocktable .tclcon div { + width: 100%; + overflow: hidden; + } + +.pun .icon { + border-width: 7px; + border-style: solid; + height: 0; + width: 0; + overflow: hidden; + float: left; + } + +.pun .icon div { + position: absolute; + left: -9999em; + text-indent: -9999em; + height: 0; + } + +.pun .iposted .ipost { + position: absolute; + left: 0; + font-weight: bold; + width: 8px; + padding-left: 4px; + text-align: center; + top: 0; + } + +/***************************************************************** +6. MAIN FORMS +*****************************************************************/ + +.pun .blockform form, .pun .fakeform { + PADDING: 20px 20px 15px 20px + } + +.pun .forminfo { + margin-bottom: 12px; + padding: 9px 10px; + border-style: solid; + border-width: 1px; + } + +.pun .forminfo h3 { + font-weight: bold; + } + +.pun .inform { + padding-bottom: 12px + } + +.pun fieldset { + padding: 0px 12px 0px 12px; + border-style: solid; + border-width: 1px + } + +.pun legend { + padding: 0px 6px + } + +.pun .infldset { + padding: 9px 0px 12px 0 + } + +.pun label { + display: block; + padding: 3px 0 + } + +.pun label.conl { + float: left; + overflow: visible; + margin-right: 10px + } + +.pun select { + padding-top: 1px; + padding-bottom: 1px; + } + +.pun fieldset .rbox { + } + +.pun fieldset .rbox br { + display: none; + } + +.pun fieldset .rbox label { + padding: 3px 0 3px 25px; + position: relative; + vertical-align: middle; + } + +.pun fieldset .rbox input { + margin: 0 9px 0 -25px; + padding: 0; + width: 16px; + position: relative; + vertical-align: middle; + } + +.pun .txtarea { + width: 75% + } + +.pun .txtarea textarea, .pun input.longinput { + width: 100% + } + +.pun .bblinks { + padding-bottom: 10px; + padding-left: 4px + } + +.pun .bblinks li { + display: inline; + padding-right: 20px + } + +.pun .blockform .buttons { + padding-left: 12px; + } + +.pun .blockform .buttons input { + margin-right: 8px; + } + +#posterror ul { + list-style: square; + padding: 3px 0 3px 24px; + } + +.pun .deletemsg { + border-style: solid; + border-width: 1px; + padding: 6px 15px; + } + + +/***************************************************************** +7. PROFILES AND ADMIN +*****************************************************************/ + +.pun .block2col { + padding-bottom: 1px + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-left: 14em + } + +.pun .blockmenu { + float:left; + width: 13em + } + +.pun .blockmenu li { + padding: 3px 0; + font-weight: bold; + } + +.pun .blockmenu a:link, .pun .blockmenu a:visited { + text-decoration: none + } + +.pun .blockmenu a:hover, .pun .blockmenu a:active { + text-decoration: underline + } + +#viewprofile dl { + float: left; + width: 100%; + overflow: hidden + } + +#viewprofile dd { + margin-left: 14em; + padding: 3px; + } + +#viewprofile dt { + float: left; + width: 13em; + margin: 3px 0; + } + +#profileavatar img { + float: right; + margin-left: 1em + } + +/***************************************************************** +8. MAIN POSTS +*****************************************************************/ + +.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { + text-decoration: none; + } + +.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { + text-decoration: underline; + } + +.pun .blockpost h2 .conr { + float: right; + text-align: right; + } + +#punsearch .blockpost h2 span { + white-space: nowrap; + } + +.pun .blockpost .box { + overflow: hidden; + } + +.pun .postleft, .pun .postfootleft { + float:left; + width: 18em; + overflow: hidden; + position: relative; + overflow: hidden; + } + +.pun .postleft dl { + padding: 0.75em 6px; + } + +.pun .postleft .usercontacts, .pun .postleft .icon { + margin-top: 6px + } + +.pun .postleft .postavatar, .pun .postleft .usertitle { + margin-bottom: 6px; + display: block; + } + +.pun .blockpost dt { + font-size: 1.091em; + font-weight: bold; + } + +.pun .blockpost dt a:link, .pun .blockpost dt a:visited { + text-decoration: none; + } + +.pun .blockpost dt a:hover, .pun .blockpost dt a:active { + text-decoration: underline; + } + +.pun .postright, .pun .postfootright { + border-left-width: 18em; + border-left-style: solid + } + +#postpreview .postright { + border-left: 0 + } + +.pun .postright { + padding: 0 6px; + } + +.pun .postfootright, .pun .multidelete { + text-align: right + } + +.pun .postmsg { + width:98%; + overflow: hidden; + padding-bottom: 6px; + } + +.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, +.pun .postfootleft p { + padding: 6px 6px 6px 6px; + } + +.pun .postfootright li { + display: inline; + } + +.pun .postfootright a:link, .pun .postfootright a:visited { + text-decoration: none + } + +.pun .postfootright a:hover, .pun .postfootright a:active { + text-decoration: underline + } + +.pun .codebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0; + } + +.pun .quotebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0 0.75em; + } + +.pun .quotebox cite { + display: block; + padding: 0.75em 0 0 0; + } + +.pun .quotebox blockquote { + width: 100%; + overflow: hidden + } + +.pun .codebox pre { + overflow: auto; + width: 100%; + overflow-y:hidden + } + +* html .pun .codebox pre { + padding-bottom: 10px; + } + +*+html .pun .codebox pre { + padding-bottom: 10px + } + +.pun .codebox pre code { + display: block; + padding: 0.75em; + } + +.pun .codebox pre.vscroll { + height: 32em; + overflow: auto; + overflow-y: auto + } + +.pun .postmsg img.postimg, .pun .postmsg a img.postimg { + max-width: 100% + vertical-align: middle; + } + +.pun .postmsg img { + vertical-align: bottom; + } + +.pun .postsignature hr { + margin-left: 0px; + width: 200px; + text-align: left; + height: 1px; + border:none + } + +.pun .blockpost label { + padding: 3px 6px; + border-style: solid; + border-width: 1px; + vertical-align: middle; + display: inline-block; + } + +.pun .blockpost label * { + vertical-align: middle; + margin: 0; + padding: 0; + } + /****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ +/* 9. HELP FILES AND MISC. */ /****************************************************************/ -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Radium_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -#debug .tcr, .pun PRE {FONT-FAMILY: Consolas, monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} +#helpfile h2 { + margin-top: 12px + } + +#helpfile div.box { + padding: 10px + } + +/***************************************************************** +COLOUR SCHEME +*****************************************************************/ + +/* Background / Text +----------------------------------------------------------------*/ + +body { + background: #2a2a2a; + color: #d4d4d4 + } + +.pun { + color: #d4d4d4 + } + +.pun .box, #adminconsole fieldset th { + background-color: #383838 + } + +.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, +#adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { + background-color: #424242 + } + +.pun h2, #brdmenu { + background-color: #565656; + color: #d4d4d4 + } + +.pun th { + background-color: #484848 + } + +.pun legend { + color: #60c860 + } + +.pun .blockmenu li.isactive a, #posterror li strong { + color: #d4d4d4 + } + +.pun .usercontent * { + background: transparent; + color: #d4d4d4 + } + +.pun textarea, .pun input, .pun select { + background-color: #2a2a2a; + color: #d4d4d4 + } + +/* Posts +----------------------------------------------------------------*/ + +.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { + background-color: #383838 + } + +.pun .postright, .pun .postfootright { + border-left-color: #424242 + } + +.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { + background-color: #424242 + } + +.pun .blockpost h2 { + background-color: #565656 + } + +.pun .blockpost h2 span.conr { + color: #a19e96 + } + +.pun hr { + background-color: #606060; + color: #606060 + } + +/* Borders +----------------------------------------------------------------*/ + +.pun .box { + border-color:#565656 + } + +.pun td { + border-color: #565656 + } + +.pun th, .pun fieldset { + border-color: #484848 + } + +#adminconsole td, #adminconsole th { + border-color: #383838 + } + +.pun .quotebox, .pun .codebox, .pun .forminfo, +.pun .blockpost label, .pun .deletemsg { + border-color: #606060 + } + +/* Links +----------------------------------------------------------------*/ + +.pun a:link, .pun a:visited { + color: #60c860 + } + +.pun a:hover, .pun a:active, .pun a:focus { + color: #80ee80 + } + +.pun h2 a:link, .pun h2 a:visited, +#brdmenu a:link, #brdmenu a:visited { + color: #d4d4d4 + } + +.pun h2 a:hover, .pun h2 a:active, +#brdmenu a:hover, #brdmenu a:active { + color: #d4d4d4 + } + +.pun .postreport a:link, .pun .postreport a:visited, +.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { + color: #888 + } + +.pun .postreport a:hover, .pun .postreport a:active, +.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { + color: #aaa + } + +.pun .maintenancelink a:link, .pun .maintenancelink a:visited { + color: #ff4000 + } + +.pun .maintenancelink a:hover, .pun .maintenancelink a:active { + color: #ff5010 + } + +/* Status Indicators +----------------------------------------------------------------*/ + +.pun .icon { + border-color: #484848 #404040 #3c3c3c #444444 + } + +.pun .iredirect .icon { + border-color: #383838 #383838 #383838 #383838 + } + +.pun .inew { + border-color: #60c860 #54af54 #499849 #59b657 + } \ No newline at end of file diff --git a/upload/style/Sulfur.css b/upload/style/Sulfur.css index 2ef1451..9407427 100644 --- a/upload/style/Sulfur.css +++ b/upload/style/Sulfur.css @@ -1,247 +1,1022 @@ +/***************************************************************** +1. INITIAL SETTINGS +*****************************************************************/ + +/* Limited Reset +----------------------------------------------------------------*/ + +.pun table, .pun div, .pun form, .pun p, .pun h1, .pun h2, .pun h3, +.pun h4, .pun h5, .pun pre, .pun blockquote, .pun ul, .pun ol, .pun li, .pun dl, +.pun dt, .pun dd, .pun th, .pun td, .pun fieldset, .pun img, .pun abbr, .pun cite { + margin: 0; + padding: 0; + border: 0; + } + +.pun ul, .pun ol { + list-style: none + } + + +/* Structural Settings +----------------------------------------------------------------*/ + +.pun .clearer, .pun .nosize { + height: 0; + width: 0; + line-height: 0; + font-size: 0; + overflow: hidden + } + +.pun .clearer, .pun .clearb { + clear: both + } + +.pun .nosize { + position: absolute; + left: -9999em; + text-indent: -9999em; + width: 0; + } + +* html .inbox, * html .inform, * html .pun, * html .tclcon, * html .codebox { + height: 1px + } + +.pun, .pun .inbox, .pun .inform, .pun .tclcon, .pun .codebox { + min-height: 1px + } + + +/* Hidden Elements +----------------------------------------------------------------*/ + +#brdfooter h2, #brdstats h2, #brdstats .conl dt, #brdstats .conr dt, +#modcontrols dt, #searchlinks dt, div.postright h3 { + position: absolute; + display: block; + overflow: hidden; + width: 0; + left: -9999em; + text-indent: -9999em; + } + +/***************************************************************** +2. TEXT & CONTENT +*****************************************************************/ + +/* Text Defaults +----------------------------------------------------------------*/ + +.pun { + font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif; + } + +.pun table, .pun td, .pun th, .pun input, .pun select, .pun optgroup, .pun textarea { + font-size: 1em; + font-family: verdana, helvetica, arial, sans-serif; + } + +.pun pre, .pun code { + font-size: 1.182em; + font-family: consolas, monaco, "bitstream vera sans mono", "courier new", courier, monospace + } + +.pun pre code { + font-size: 1em; + } + +.pun strong { + font-weight: bold; + } + +.pun em { + font-style: italic; + } + + +/* Content Defaults +----------------------------------------------------------------*/ + +.pun p, .pun ul, .pun ol, .pun dl { + font-size: 1em; + padding: 3px 0; + } + +.pun h2 { + font-size: 1em; + font-weight: normal; + padding: 4px 7px; + } + +.pun h3 { + font-size: 1.091em; + padding: 3px 0; + } + +.pun table p, .pun table h3 { + padding: 0; + } + +.pun span.warntext, .pun p.warntext { + font-weight: bold + } + +/* User Content (Announcements, Rules, Posts) +----------------------------------------------------------------*/ + +.pun .usercontent p, .pun .postmsg p { + padding: 0.75em 0 + } + +.pun .usercontent ul, .pun .postmsg ul { + padding: 0.75em 1em 0.75em 2.5em; + list-style: disc + } + +.pun .usercontent ol, .pun .postmsg ol { + padding: 0.75em 1em 0.75em 2.5em; + list-style: decimal + } + +.pun .usercontent ol.alpha, .pun .postmsg ol.alpha { + list-style: lower-alpha + } + +.pun .usercontent li ol, .pun .usercontent li ul, .pun .postmsg li ol, .pun .postmsg li ul { + padding: 0.25em 1em 0.75em 2.5em + } + +.pun .usercontent li p, .pun .postmsg li p { + padding: 0 + } + +.pun .usercontent h1 { + font-size: 1.4em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h2 { + font-size: 1.2em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h3 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .usercontent h4, .pun .usercontent h5, .pun .usercontent h6 { + font-size: 1em; + font-weight: bold; + padding: 0.75em 0 0 0 + } + +.pun .quotebox cite { + font-weight: bold; + font-style: normal; + padding: 0.75em 0.75em 0 0.75em + } + +.pun span.bbu { + text-decoration: underline + } + +.pun div.postmsg h5, #helpfile h5 { + font-size: 1.1em; + font-weight: bold; + padding: 0.75em 0 0 0; + } + + +/***************************************************************** +3. COMMON STYLES +*****************************************************************/ + +/* Page Layout +----------------------------------------------------------------*/ + +#punwrap { + margin: 12px 20px + } + +#punredirect .block, #punmaint .block { + margin: 50px 20% 12px 20% + } + + +/* Vertical Element Spacing +----------------------------------------------------------------*/ + +#brdheader { + margin: 0 0 12px 0; + } + +#announce, #brdstats { + margin: 12px 0 12px 0; + } + +.pun .blocktable, .pun .block, .pun .blockform, .pun .block2col, #postreview { + margin-bottom: 12px + } + +#punindex .blocktable, .pun .blockpost { + margin-bottom: 6px + } + +#postreview .box { + margin-bottom: 3px; + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-bottom: 0px + } + +.pun .linkst, .pun .linksb { + margin-top: -12px + } + +.pun .postlinksb { + margin-top: -6px + } + + +/* External Borders +----------------------------------------------------------------*/ + +.pun .box { + border-style: solid; + border-width: 1px; + } + +#brdheader .box { + border-top-width: 4px; + } + +/* Default Internal Spacing +----------------------------------------------------------------*/ + +.pun .block .inbox, .pun .blockmenu .inbox { + padding: 3px 6px + } + +/***************************************************************** +4. COMMON BOARD ELEMENTS +*****************************************************************/ + +/* Board Header +----------------------------------------------------------------*/ + +#brdtitle h1 { + font-size: 1.454em; + font-weight: bold; + line-height: 1em; + padding: 3px 0 0 0; + } + +#brdmenu li { + display: inline; + margin-right: 12px; + } + +#brdmenu a:link, #brdmenu a:visited { + text-decoration: none + } + +#brdmenu a:hover, #brdmenu a:active { + text-decoration: underline + } + +#brdwelcome .conl { + float: left; + } + +#brdwelcome .conr { + float: right; + text-align: right; + } + +/* Breadcrumbs and Post Links +----------------------------------------------------------------*/ + +.pun .linkst { + padding: 8px 6px 3px 6px + } + +.pun .linksb, .pun .postlinksb { + padding: 3px 6px 8px 6px + } + +.pun .crumbs { + clear: both; + width: 100%; + overflow: hidden; + } + +.pun .crumbs li { + display: inline; + white-space: nowrap; + font-weight: bold; + } + +.pun .pagelink { + float: left; + white-space: nowrap; + } + +.pun .postlink { + font-weight: bold; + white-space: nowrap; + } + +.pun .postlink, .pun .modbuttons { + float: right; + text-align: right; + } + +.pun .modbuttons { + padding: 1px 0; + white-space: nowrap; + } + +.pun .modbuttons input { + margin-left: 6px; + } + +.pun .postlink a:link, .pun .postlink a:visited { + text-decoration: none + } + +.pun .postlink a:hover, .pun .postlink a:active { + text-decoration: underline; + } + + +/* Board Footer +----------------------------------------------------------------*/ + +#brdfooter .conl { + float: left; + } + +#brdfooter .conr { + float: right; + text-align: right; + } + + +/* Board Stats +----------------------------------------------------------------*/ + +#brdstats .conl { + float: left; + } + +#brdstats .conr { + float: right; + text-align: right; + } + +#onlinelist dd, #onlinelist dt { + display: inline; + } + + +/***************************************************************** +5. MAIN TABLES +*****************************************************************/ + +.pun table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; + } + +.pun .blocktable table { + table-layout: fixed; + } + +.pun td, .pun th { + padding: 4px 6px; + line-height: 1.273em; + text-align: left; + font-weight: normal; + } + +.pun td { + border-style: solid none none solid; + border-width: 1px; + } + +.pun .tcl { + border-left: 0; + width: auto; + } + +.pun .tc2, .pun .tc3, .pun .tcmod { + width: 10%; + text-align: center; + padding: 4px 0; + } + +.pun .tcr { + width: 30%; + } + +.pun .tcl h3 { + font-size: 1.091em; + font-weight: bold; + } + +.pun .tcl span.newtext, .pun .tcl span.pagestext { + white-space: nowrap + } + +.pun .tcl p { + padding: 5px 0 0 0 + } + +#punsearch #vf .tc2 { + width: 18%; + text-align: left; + padding: 4px 6px; + } + +#users1 .tcr { + width: 25% + } + +#users1 .tc2 { + width: 25%; + text-align: left; + padding: 4px 6px; + } + +#debug .tcl { + width: 10% + } + +#debug .tcr { + width: 90%; + white-space: normal + } + +#punindex .tcr .byuser { + display: block + } + +.pun .blocktable .tclcon { + padding: 0 11px 0 12px; + overflow: hidden; + height: 1%; + min-height: 1px; + position: relative; + } + +.pun .blocktable .tclcon div { + width: 100%; + overflow: hidden; + } + +.pun .icon { + border-width: 7px; + border-style: solid; + height: 0; + width: 0; + overflow: hidden; + float: left; + } + +.pun .icon div { + position: absolute; + left: -9999em; + text-indent: -9999em; + height: 0; + } + +.pun .iposted .ipost { + position: absolute; + left: 0; + font-weight: bold; + width: 8px; + padding-left: 4px; + text-align: center; + top: 0; + } + +/***************************************************************** +6. MAIN FORMS +*****************************************************************/ + +.pun .blockform form, .pun .fakeform { + PADDING: 20px 20px 15px 20px + } + +.pun .forminfo { + margin-bottom: 12px; + padding: 9px 10px; + border-style: solid; + border-width: 1px; + } + +.pun .forminfo h3 { + font-weight: bold; + } + +.pun .inform { + padding-bottom: 12px + } + +.pun fieldset { + padding: 0px 12px 0px 12px; + border-style: solid; + border-width: 1px + } + +.pun legend { + padding: 0px 6px + } + +.pun .infldset { + padding: 9px 0px 12px 0 + } + +.pun label { + display: block; + padding: 3px 0 + } + +.pun label.conl { + float: left; + overflow: visible; + margin-right: 10px + } + +.pun select { + padding-top: 1px; + padding-bottom: 1px; + } + +.pun fieldset .rbox { + } + +.pun fieldset .rbox br { + display: none; + } + +.pun fieldset .rbox label { + padding: 3px 0 3px 25px; + position: relative; + vertical-align: middle; + } + +.pun fieldset .rbox input { + margin: 0 9px 0 -25px; + padding: 0; + width: 16px; + position: relative; + vertical-align: middle; + } + +.pun .txtarea { + width: 75% + } + +.pun .txtarea textarea, .pun input.longinput { + width: 100% + } + +.pun .bblinks { + padding-bottom: 10px; + padding-left: 4px + } + +.pun .bblinks li { + display: inline; + padding-right: 20px + } + +.pun .blockform .buttons { + padding-left: 12px; + } + +.pun .blockform .buttons input { + margin-right: 8px; + } + +#posterror ul { + list-style: square; + padding: 3px 0 3px 24px; + } + +.pun .deletemsg { + border-style: solid; + border-width: 1px; + padding: 6px 15px; + } + + +/***************************************************************** +7. PROFILES AND ADMIN +*****************************************************************/ + +.pun .block2col { + padding-bottom: 1px + } + +.pun .block2col .blockform, .pun .block2col .block { + margin-left: 14em + } + +.pun .blockmenu { + float:left; + width: 13em + } + +.pun .blockmenu li { + padding: 3px 0; + font-weight: bold; + } + +.pun .blockmenu a:link, .pun .blockmenu a:visited { + text-decoration: none + } + +.pun .blockmenu a:hover, .pun .blockmenu a:active { + text-decoration: underline + } + +#viewprofile dl { + float: left; + width: 100%; + overflow: hidden + } + +#viewprofile dd { + margin-left: 14em; + padding: 3px; + } + +#viewprofile dt { + float: left; + width: 13em; + margin: 3px 0; + } + +#profileavatar img { + float: right; + margin-left: 1em + } + +/***************************************************************** +8. MAIN POSTS +*****************************************************************/ + +.pun .blockpost h2 a:link, .pun .blockpost h2 a:visited { + text-decoration: none; + } + +.pun .blockpost h2 a:hover, .pun .blockpost h2 a:active { + text-decoration: underline; + } + +.pun .blockpost h2 .conr { + float: right; + text-align: right; + } + +#punsearch .blockpost h2 span { + white-space: nowrap; + } + +.pun .blockpost .box { + overflow: hidden; + } + +.pun .postleft, .pun .postfootleft { + float:left; + width: 18em; + overflow: hidden; + position: relative; + overflow: hidden; + } + +.pun .postleft dl { + padding: 0.75em 6px; + } + +.pun .postleft .usercontacts, .pun .postleft .icon { + margin-top: 6px + } + +.pun .postleft .postavatar, .pun .postleft .usertitle { + margin-bottom: 6px; + display: block; + } + +.pun .blockpost dt { + font-size: 1.091em; + font-weight: bold; + } + +.pun .blockpost dt a:link, .pun .blockpost dt a:visited { + text-decoration: none; + } + +.pun .blockpost dt a:hover, .pun .blockpost dt a:active { + text-decoration: underline; + } + +.pun .postright, .pun .postfootright { + border-left-width: 18em; + border-left-style: solid + } + +#postpreview .postright { + border-left: 0 + } + +.pun .postright { + padding: 0 6px; + } + +.pun .postfootright, .pun .multidelete { + text-align: right + } + +.pun .postmsg { + width:98%; + overflow: hidden; + padding-bottom: 6px; + } + +.pun .postfootright ul, .pun .postfootright div, .pun .postfootright p, +.pun .postfootleft p { + padding: 6px 6px 6px 6px; + } + +.pun .postfootright li { + display: inline; + } + +.pun .postfootright a:link, .pun .postfootright a:visited { + text-decoration: none + } + +.pun .postfootright a:hover, .pun .postfootright a:active { + text-decoration: underline + } + +.pun .codebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0; + } + +.pun .quotebox { + border-style: solid; + border-width: 1px; + margin: 0.75em 1em; + padding: 0 0.75em; + } + +.pun .quotebox cite { + display: block; + padding: 0.75em 0 0 0; + } + +.pun .quotebox blockquote { + width: 100%; + overflow: hidden + } + +.pun .codebox pre { + overflow: auto; + width: 100%; + overflow-y:hidden + } + +* html .pun .codebox pre { + padding-bottom: 10px; + } + +*+html .pun .codebox pre { + padding-bottom: 10px + } + +.pun .codebox pre code { + display: block; + padding: 0.75em; + } + +.pun .codebox pre.vscroll { + height: 32em; + overflow: auto; + overflow-y: auto + } + +.pun .postmsg img.postimg, .pun .postmsg a img.postimg { + max-width: 100% + vertical-align: middle; + } + +.pun .postmsg img { + vertical-align: bottom; + } + +.pun .postsignature hr { + margin-left: 0px; + width: 200px; + text-align: left; + height: 1px; + border:none + } + +.pun .blockpost label { + padding: 3px 6px; + border-style: solid; + border-width: 1px; + vertical-align: middle; + display: inline-block; + } + +.pun .blockpost label * { + vertical-align: middle; + margin: 0; + padding: 0; + } + /****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ +/* 9. HELP FILES AND MISC. */ /****************************************************************/ -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Sulfur_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -#debug .tcr, .pun PRE {FONT-FAMILY: Consolas, monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} +#helpfile h2 { + margin-top: 12px + } + +#helpfile div.box { + padding: 10px + } + +/***************************************************************** +COLOUR SCHEME +*****************************************************************/ + +/* Background / Text +----------------------------------------------------------------*/ + +body { + background: #fff; + color: #333 + } + +.pun { + color: #333 + } + +.pun .box, #adminconsole fieldset th { + background-color: #f1f1f1 + } + +.pun td.tc2, .pun td.tc3, .pun td.tcmod, #postpreview, #viewprofile dd, .pun .forminfo, +#adminconsole fieldset td, .pun .blockmenu .box, #adstats dd { + background-color: #dedfdf + } + +.pun h2, #brdmenu { + background-color: #b84623; + color: #fff + } + +.pun th { + background-color: #d1d1d1 + } + +.pun legend { + color: #822100 + } + +.pun .blockmenu li.isactive a, #posterror li strong { + color: #333 + } + +.pun .usercontent * { + background: transparent; + color: #333 + } + +/* Posts +----------------------------------------------------------------*/ + +.pun .blockpost .box, .pun .postright, .pun .postfootright, .pun .deletemsg { + background-color: #dedfdf + } + +.pun .postright, .pun .postfootright { + border-left-color: #f1f1f1 + } + +.pun .postleft, .pun .postfootleft, .pun .blockpost label, .pun .codebox, .pun .quotebox { + background-color: #f1f1f1 + } + +#helpfile .codebox, #helpfile .quotebox { + background-color: #f9f9f9; + } + +.pun .blockpost h2 { + background-color: #d25028 + } + +.pun .blockpost h2 span.conr { + color: #fccfc1 + } + +.pun hr { + background-color: #333; + color: #333 + } + +/* Borders +----------------------------------------------------------------*/ + +.pun .box { + border-color: #b84623 + } + +.pun td { + border-color: #e1c3c3 + } + +.pun th, .pun fieldset { + border-color: #d1d1d1 + } + +#adminconsole td, #adminconsole th { + border-color: #f1f1f1 + } + +.pun .quotebox, .pun .codebox, .pun .forminfo, +.pun .blockpost label, .pun .deletemsg { + border-color: #aca899 #fff #fff #aca899 + } + +/* Links +----------------------------------------------------------------*/ + +.pun a:link, .pun a:visited { + color: #822100 + } + +.pun a:hover, .pun a:active, .pun a:focus { + color: #ca3300 + } + +.pun h2 a:link, .pun h2 a:visited, +#brdmenu a:link, #brdmenu a:visited { + color: #fff + } + +.pun h2 a:hover, .pun h2 a:active, +#brdmenu a:hover, #brdmenu a:active { + color: #fff + } + +.pun .postreport a:link, .pun .postreport a:visited, +.pun .iclosed td.tcl a:link, .pun .iclosed td.tcl a:visited { + color: #888 + } + +.pun .postreport a:hover, .pun .postreport a:active, +.pun .iclosed td.tcl a:hover, .pun .iclosed td.tcl a:active { + color: #aaa + } + +.pun .maintenancelink a:link, .pun .maintenancelink a:visited { + color: #b42000 + } + +.pun .maintenancelink a:hover, .pun .maintenancelink a:active { + color: #b42000 + } + +/* Status Indicators +----------------------------------------------------------------*/ + +.pun .icon { + border-color: #e6e6e6 #dedede #dadada #e2e2e2 + } + +.pun .iredirect .icon { + border-color: #f1f1f1 #f1f1f1 #f1f1f1 #f1f1f1 + } + +.pun .inew { + border-color: #c23000 #af2c00 #992600 #ac2b00 + } \ No newline at end of file diff --git a/upload/style/imports/Cobalt_cs.css b/upload/style/imports/Cobalt_cs.css deleted file mode 100644 index c46f72b..0000000 --- a/upload/style/imports/Cobalt_cs.css +++ /dev/null @@ -1,117 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #2A2A2A} - -.pun {COLOR: #D4D4D4} - -DIV.box, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #383838} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #383838} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #brdfooter DIV.box {BACKGROUND-COLOR: #424242} -#adminconsole FIELDSET TD, #viewprofile DD, DIV.forminfo, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #484848} - -.pun BLOCKQUOTE, DIV.codebox {BACKGROUND-COLOR: #353533} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #565656; COLOR: #D4D4D4} - -/* 1.4 Table header rows */ - -.pun TH, .bgc4 {BACKGROUND-COLOR: #484848} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #60A0DC} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #D4D4D4} - -/* 1.7 Dark background for form elements */ - -.pun TEXTAREA, .pun INPUT, .pun SELECT {BACKGROUND-COLOR: #2A2A2A; COLOR: #D4D4D4} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright, #postpreview {BACKGROUND-COLOR: #383838} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #424242} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #424242} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #565656} -DIV.blockpost H2 SPAN.conr {COLOR: #A19E96} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #606060; COLOR: #606060} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders (H1 is the board title) */ - -DIV.box {BORDER-COLOR: #565656} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #565656 #525252 #525252} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #565656} -.pun TH {BORDER-COLOR: #484848} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #606060} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #60A0DC} -.pun A:hover {COLOR: #80D6FF} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited {COLOR: #D4D4D4} -.pun H2 A:hover {COLOR: #D4D4D4} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #FF4000} -LI.maintenancelink A:hover {COLOR: #FF5010} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #484848 #404040 #3C3C3C #444444} -TR.iredirect DIV.icon {BORDER-COLOR: #383838 #383838 #383838 #383838} -DIV.inew {BORDER-COLOR: #5496D8 #4B85C0 #4377AC #4F8DCB} \ No newline at end of file diff --git a/upload/style/imports/Lithium_cs.css b/upload/style/imports/Lithium_cs.css deleted file mode 100644 index 2c2f03b..0000000 --- a/upload/style/imports/Lithium_cs.css +++ /dev/null @@ -1,111 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #FFF} - -.pun {COLOR: #333} - -DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, -#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #6C8A3F; COLOR: #FFF} - -/* 1.4 Table header rows */ - -.pun TH, .bgc4 {BACKGROUND-COLOR: #D1D1D1} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #6C8A3F} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #F1F1F1} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #7EA34B} -DIV.blockpost H2 SPAN.conr {COLOR: #B7D094} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders */ - -DIV.box {BORDER-COLOR: #6C8A3F} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #7EA34B #6C8A3F #6C8A3F} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #CEDEB9} -.pun TH {BORDER-COLOR: #D1D1D1} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #638137} -.pun A:hover {COLOR: #8EB653} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} -.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} -LI.maintenancelink A:hover {COLOR: #B42000} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} -TR.iredirect DIV.icon {BORDER-COLOR: #F1F1F1 #F1F1F1 #F1F1F1 #F1F1F1} -DIV.inew {BORDER-COLOR: #8BB453 #7A9E48 #709142 #799C47} \ No newline at end of file diff --git a/upload/style/imports/Mercury_cs.css b/upload/style/imports/Mercury_cs.css deleted file mode 100644 index e5a7268..0000000 --- a/upload/style/imports/Mercury_cs.css +++ /dev/null @@ -1,117 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #2A2A2A} - -.pun {COLOR: #D4D4D4} - -DIV.box, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #383838} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #383838} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #brdfooter DIV.box {BACKGROUND-COLOR: #424242} -#adminconsole FIELDSET TD, #viewprofile DD, DIV.forminfo, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #484848} - -.pun BLOCKQUOTE, DIV.codebox {BACKGROUND-COLOR: #353533} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #565656; COLOR: #D4D4D4} - -/* 1.4 Table header rows */ - -.pun TH {BACKGROUND-COLOR: #484848} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #F6B620} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #D4D4D4} - -/* 1.7 Dark background for form elements */ - -.pun TEXTAREA, .pun INPUT, .pun SELECT {BACKGROUND-COLOR: #2A2A2A; COLOR: #D4D4D4} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright, #postpreview {BACKGROUND-COLOR: #383838} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #424242} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #424242} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #565656} -DIV.blockpost H2 SPAN.conr {COLOR: #A19E96} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #606060; COLOR: #606060} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders (H1 is the board title) */ - -DIV.box {BORDER-COLOR: #565656} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #565656 #525252 #525252} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #565656} -.pun TH {BORDER-COLOR: #484848} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #565656} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #909090} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #F6B620} -.pun A:hover {COLOR: #FFEE40} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited {COLOR: #D4D4D4} -.pun H2 A:hover {COLOR: #D4D4D4} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #FF4000} -LI.maintenancelink A:hover {COLOR: #FF5010} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #484848 #404040 #3C3C3C #444444} -TR.iredirect DIV.icon {BORDER-COLOR: #383838 #383838 #383838 #383838} -DIV.inew {BORDER-COLOR: #F6B620 #ECAE1F #D09A1B #E1A61D} \ No newline at end of file diff --git a/upload/style/imports/Oxygen_cs.css b/upload/style/imports/Oxygen_cs.css deleted file mode 100644 index fcb3218..0000000 --- a/upload/style/imports/Oxygen_cs.css +++ /dev/null @@ -1,111 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #FFF} - -.pun {COLOR: #333} - -DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, -#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #0066B9; COLOR: #FFF} - -/* 1.4 Table header rows */ - -.pun TH {BACKGROUND-COLOR: #D1D1D1} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #005CB1} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #f1f1f1} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #006FC9} -DIV.blockpost H2 SPAN.conr {COLOR: #AABDCD} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders */ - -DIV.box {BORDER-COLOR: #0066B9} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #006fC9 #0066B9 #0066B9} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #BBCEDE} -.pun TH {BORDER-COLOR: #D1D1D1} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #005CB1} -.pun A:hover {COLOR: #B42000} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} -.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} -LI.maintenancelink A:hover {COLOR: #B42000} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} -TR.iredirect DIV.icon {BORDER-COLOR: #F1F1F1 #F1F1F1 #F1F1F1 #F1F1F1} -DIV.inew {BORDER-COLOR: #0080D7 #0065C0 #0058B3 #0072CA} \ No newline at end of file diff --git a/upload/style/imports/Radium_cs.css b/upload/style/imports/Radium_cs.css deleted file mode 100644 index 825f85e..0000000 --- a/upload/style/imports/Radium_cs.css +++ /dev/null @@ -1,122 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #2A2A2A} - -.pun {COLOR: #D4D4D4} - -DIV.box, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #383838} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #383838} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #brdfooter DIV.box {BACKGROUND-COLOR: #424242} -#adminconsole FIELDSET TD, #viewprofile DD, DIV.forminfo, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #484848} - -.pun BLOCKQUOTE, DIV.codebox {BACKGROUND-COLOR: #353533} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #565656; COLOR: #D4D4D4} - -/* 1.4 Table header rows */ - -.pun TH, .bgc4 {BACKGROUND-COLOR: #484848} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #60C860} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #D4D4D4} - -/* 1.7 Dark background for form elements */ - -.pun TEXTAREA, .pun INPUT, .pun SELECT {BACKGROUND-COLOR: #2A2A2A; COLOR: #D4D4D4} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright, #postpreview {BACKGROUND-COLOR: #383838} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #424242} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #424242} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #565656} -DIV.blockpost H2 SPAN.conr {COLOR: #A19E96} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #606060; COLOR: #606060} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders (H1 is the board title) */ - -DIV.box {BORDER-COLOR: #565656} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #565656 #525252 #525252} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #565656} -.pun TH {BORDER-COLOR: #484848} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #606060} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #60C860} -.pun A:hover {COLOR: #80EE80} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited {COLOR: #D4D4D4} -.pun H2 A:hover {COLOR: #D4D4D4} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #FF4000} -LI.maintenancelink A:hover {COLOR: #FF5010} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #484848 #404040 #3C3C3C #444444} -TR.iredirect DIV.icon {BORDER-COLOR: #383838 #383838 #383838 #383838} -DIV.inew {BORDER-COLOR: #60C860 #54AF54 #499849 #59B657} - -/* 5.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} diff --git a/upload/style/imports/Sulfur_cs.css b/upload/style/imports/Sulfur_cs.css deleted file mode 100644 index 9e21b2f..0000000 --- a/upload/style/imports/Sulfur_cs.css +++ /dev/null @@ -1,111 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #FFF} - -.pun {COLOR: #333} - -DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, -#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #B84623; COLOR: #FFF} - -/* 1.4 Table header rows */ - -.pun TH {BACKGROUND-COLOR: #D1D1D1} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #822100} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #F1F1F1} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #D25028} -DIV.blockpost H2 SPAN.conr {COLOR: #FCCFC1} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders */ - -DIV.box {BORDER-COLOR: #B84623} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #D25028 #B84623 #B84623} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #E1C3C3} -.pun TH {BORDER-COLOR: #D1D1D1} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #822100} -.pun A:hover {COLOR: #CA3300} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} -.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} -LI.maintenancelink A:hover {COLOR: #B42000} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} -TR.iredirect DIV.icon {BORDER-COLOR: #F1F1F1 #F1F1F1 #F1F1F1 #F1F1F1} -DIV.inew {BORDER-COLOR: #C23000 #AF2C00 #992600 #AC2B00} \ No newline at end of file diff --git a/upload/style/imports/base.css b/upload/style/imports/base.css deleted file mode 100644 index ffb2313..0000000 --- a/upload/style/imports/base.css +++ /dev/null @@ -1,289 +0,0 @@ -/****************************************************************/ -/* 1. INITIAL SETTINGS */ -/****************************************************************/ - -.pun TABLE, .pun DIV, .pun FORM, .pun P, .pun H1, .pun H2, .pun H3, -.pun H4, .pun PRE, .pun BLOCKQUOTE, .pun UL, .pun OL, .pun LI, .pun DL, -.pun DT, .pun DD, .pun TH, .pun TD, .pun FIELDSET, .pun IMG { - MARGIN: 0px; - PADDING: 0px; - FONT-WEIGHT: normal; - LIST-STYLE: none; -} - -.pun IMG {BORDER: none} - -.pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {MARGIN: 0} - -/****************************************************************/ -/* 2. STRUCTURAL SETTINGS - VERY IMPORTANT - DO NOT CHANGE */ -/****************************************************************/ - -/* 2.1 Clearing floats and invisible items */ -.pun .clearer, .pun .nosize { - HEIGHT: 0; - WIDTH: 0; - LINE-HEIGHT: 0; - FONT-SIZE: 0; - OVERFLOW: hidden -} - -.pun .clearer, .pun .clearb {CLEAR: both} -.pun .nosize {POSITION: absolute; LEFT: -10000px} - -/* 2.2 Overflow settings for posts */ - -DIV.blockpost DIV.box, DIV.postleft, DIV.postsignature, DIV.postmsg {OVERFLOW: hidden} - -/****************************************************************/ -/* 3. BUG FIXES - VERY IMPORTANT - DO NOT CHANGE */ -/****************************************************************/ - -/* 3.1 This attempts to eliminate rounding errors in Gecko browsers. */ - -DIV>DIV>DIV.postfootleft, DIV>DIV>DIV.postfootright {PADDING-TOP: 1px; MARGIN-TOP: -1px} - -/* 3.2 This is only visible to IE6 Windows and cures various bugs. Do not alter comments */ - -/* Begin IE6Win Fix \*/ -* HTML .inbox, * HTML .inform, * HTML .pun, * HTML .intd, * HTML .tclcon {HEIGHT: 1px} -* HTML .inbox DIV.postmsg {WIDTH: 98%} -/* End of IE6Win Fix */ - -/* 3.3 This is the equivelant of 3.2 but for IE7. It is visible to other browsers -but does no harm */ - -/*Begin IE7Win Fix */ -.pun, .pun .inbox, .pun .inform, .pun .intd, .pun .tclcon {min-height: 1px} -/* End of IE7Win Fix */ - -/****************************************************************/ -/* 4. HIDDEN ELEMENTS */ -/****************************************************************/ - -/* These are hidden in normal display. Add comments to make them visible */ - -#brdfooter H2, #brdstats H2, #brdstats .conl DT, #brdstats .conr DT, -#modcontrols DT, #searchlinks DT, DIV.postright H3 { - POSITION: absolute; - DISPLAY: block; - OVERFLOW: hidden; - WIDTH: 1em; - LEFT: -999em -} - -/****************************************************************/ -/* 5. BOX CONTAINERS AND FLOATS */ -/****************************************************************/ - -/* 5.1. Setup all left and right content using floats. */ - -.conr { - FLOAT: right; - TEXT-ALIGN: right; - CLEAR: right; - WIDTH: 40% -} - -.conl { - FLOAT: left; - WIDTH: 55%; - OVERFLOW: hidden; - WHITE-SPACE: nowrap -} - -LABEL.conl { - WIDTH: auto; - OVERFLOW: visible; - MARGIN-RIGHT: 10px -} - -/* 5.2 Set up page numbering and posts links */ - -DIV.linkst .conl, DIV.linksb .conl, DIV.postlinksb .conl {WIDTH:32em} - -DIV.linkst .conr, DIV.linksb .conr, DIV.postlinksb .conr {WIDTH:16em} - -FORM DIV.linksb .conr {WIDTH: 32em} - -/* 5.3 Keep breadcrumbs from shifting to the right when wrapping */ - -.linkst UL, linksb UL, .postlinksb UL {MARGIN-LEFT: 18em} - -/* 5.4 Settings for Profile and Admin interface.*/ - -DIV.block2col {PADDING-BOTTOM: 1px} - -DIV.block2col DIV.blockform, DIV.block2col DIV.block, #viewprofile DD {MARGIN-LEFT: 14em} - -DIV.blockmenu, #viewprofile DT { - FLOAT:left; - WIDTH: 13em -} - -#profileavatar IMG { - FLOAT: right; - MARGIN-LEFT: 1em -} - -#viewprofile DL {FLOAT: left; WIDTH: 100%; OVERFLOW: hidden} - -/****************************************************************/ -/* 6. TABLE SETUP */ -/****************************************************************/ - -/* 6.1 Table Basic Setup */ - -.pun TABLE {WIDTH: 100%} - -/* 6.2 Fixed Table Setup */ - -#punindex TABLE, #vf TABLE {TABLE-LAYOUT: fixed} - -.tcl {TEXT-ALIGN: left; WIDTH: 50%} - -.tc2, .tc3, .tcmod {WIDTH: 9%; TEXT-ALIGN: center} - -.tcr {WIDTH: 32%; TEXT-ALIGN: left} - -#punsearch #vf .tcl, #punmoderate #vf .tcl {WIDTH: 41%} - -#punsearch #vf .tc2 {WIDTH: 18%; TEXT-ALIGN: left} - -.tcl, .tcr {OVERFLOW: HIDDEN} - -/* 6.3 Other Table Setup */ - -#users1 .tcl {WIDTH: 40%} - -#users1 .tcr {WIDTH: 25%} - -#users1 .tc2 {WIDTH: 25%; TEXT-ALIGN: left} - -#users1 .tc3 {WIDTH: 10%; TEXT-ALIGN: center} - -#debug .tcl {WIDTH: 10%} -#debug .tcr {WIDTH: 90%; WHITE-SPACE: normal} - -#punindex TD.tcr SPAN.byuser {DISPLAY: block} - -/****************************************************************/ -/* 7. VIEWTOPIC SETUP */ -/****************************************************************/ - -/* 7.1 This is the basic structure. */ - -DIV.postleft, DIV.postfootleft { - FLOAT:left; - WIDTH: 18em; - OVERFLOW: hidden; - POSITION: relative; -} - -DIV.postright, DIV.postfootright { - BORDER-LEFT-WIDTH: 18em; - BORDER-LEFT-STYLE: solid -} - -DIV.postfootright, P.multidelete {TEXT-ALIGN: right} - -DIV.blockpost>DIV>DIV.inbox {PADDING-BOTTOM: 1px} - -/* 7.3 This is the div which actually contains the post and is inside .postright */ - -DIV.postmsg {WIDTH:100%} -DIV.postmsg P {MARGIN: 0 0 1.5em} -DIV.postmsg UL, DIV.postmsg OL {MARGIN: 0 0 1.5em 0.5em;PADDING-LEFT: 1.5em} -DIV.postmsg OL {MARGIN: 0 0 1.5em 1em} -DIV.postmsg UL LI {LIST-STYLE-TYPE: circle} -DIV.postmsg OL.decimal LI {LIST-STYLE-TYPE: decimal} -DIV.postmsg OL.alpha LI {LIST-STYLE-TYPE: lower-alpha} - -/* 7.4 These items control overflow and scrolling within posts. */ - -DIV.incqbox {WIDTH: 100%; OVERFLOW: hidden} -DIV.scrollbox {WIDTH: 100%; OVERFLOW: auto} -IMG.postimg {max-width: 100%} -A .postimg {max-width: 100%} - -/* 7.5 Turn off the poster information column for preview */ - -#postpreview DIV.postright {BORDER-LEFT: none} - -/* 7.6 Create the horizontal line above signatures */ - -DIV.postsignature HR { - MARGIN-LEFT: 0px; - WIDTH: 200px; - TEXT-ALIGN: left; - HEIGHT: 1px; - BORDER:none -} - -/* 7.7 Maximum height for search results as posts. Position go to post link */ - -DIV.searchposts DIV.postmsg {HEIGHT: 8em} -DIV.searchposts DD P {PADDING-TOP: 3em} - -/* 7.8 Class for bbcode [u] */ - -SPAN.bbu {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 8. LISTS SPECIAL SETTINGS */ -/****************************************************************/ - -/* 8.1 Horizontal display of online list, main navigation menu and breadcrumbs */ - -#onlinelist DD, #onlinelist DT, #brdmenu LI, DIV.linkst LI, DIV.linksb LI, DIV.postlinksb LI, -DIV.postfootright LI, UL.bblinks LI { - DISPLAY: inline; - HEIGHT: 0 -} - -/* 8.2 Turn on square icon for posterror list */ - -#posterror UL LI {LIST-STYLE: square inside} - -/* 8.3 Right alignment of descriptions in ordinary member view of other members profiles */ - -#viewprofile DT {TEXT-ALIGN: right} - -/****************************************************************/ -/* 9. FORM SETTINGS */ -/****************************************************************/ - -/* 9.1 Makes textareas and long text inputs shrink with page */ - -DIV.txtarea {WIDTH: 75%} - -DIV.txtarea TEXTAREA, INPUT.longinput {WIDTH: 100%} - -.pun LABEL {DISPLAY: block} - -#qjump SELECT {WIDTH: 50%} - -/****************************************************************/ -/* 10. HELP FILES AND MISC. */ -/****************************************************************/ - -/* 10.1 Put some space between sections of the help file */ - -#helpfile H2 {MARGIN-TOP: 12px} - -/* 10.2 Internal padding */ - -#helpfile DIV.box {PADDING: 10px} - -/* 10.3 Other templates */ - -#punredirect DIV.block, #punmaint DIV.block {MARGIN: 50px 20% 12px 20%} - -/* 10.4 Paragraphs and lists */ - -#helpfile P {MARGIN: 0 0 1.5em} -#helpfile UL, #helpfile OL {MARGIN: 0 0 1.5em 0.5em;PADDING-LEFT: 1.5em} -#helpfile OL {MARGIN: 0 0 1.5em 1em} -#helpfile UL LI {LIST-STYLE-TYPE: circle} -#helpfile OL.decimal LI {LIST-STYLE-TYPE: decimal} -#helpfile OL.alpha LI {LIST-STYLE-TYPE: lower-alpha} diff --git a/upload/style/imports/base_admin.css b/upload/style/imports/base_admin.css index 61eb576..d2a9a7d 100644 --- a/upload/style/imports/base_admin.css +++ b/upload/style/imports/base_admin.css @@ -34,8 +34,8 @@ TABLE#forumperms .atcl {TEXT-ALIGN: left; WIDTH: 15em; WHITE-SPACE: nowrap} /*** User Search Result Tables ***/ #users2 TH, #users2 TH {TEXT-ALIGN: left} -#users2 .tcl, #users2 .tc3, #users2 .tc5 {WIDTH: 15%; TEXT-ALIGN: left} -#users2 .tc2 {WIDTH: 22%; TEXT-ALIGN: left} +#users2 .tcl, #users2 .tc3, #users2 .tc5 {WIDTH: 15%; TEXT-ALIGN: left; padding: 4px 6px} +#users2 .tc2 {WIDTH: 22%; TEXT-ALIGN: left; padding: 4px 6px} #users2 .tc4 {WIDTH: 8%} #users2 .tc4 {TEXT-ALIGN: center} #users2 .tcr {WHITE-SPACE: nowrap} diff --git a/upload/userlist.php b/upload/userlist.php index d7653fe..d4847de 100644 --- a/upload/userlist.php +++ b/upload/userlist.php @@ -1,27 +1,12 @@ 2) ? -1 : intval($_GET['show_group']); +$show_group = !isset($_GET['show_group']) ? -1 : intval($_GET['show_group']); $sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$show_post_count)) ? 'username' : $_GET['sort_by']; -$sort_dir = (!isset($_GET['sort_dir']) || $_GET['sort_dir'] != 'ASC' && $_GET['sort_dir'] != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']); +$sort_dir = (!isset($_GET['sort_dir']) || $_GET['sort_dir'] != 'ASC' && $_GET['sort_dir'] != 'DESC') ? 'ASC' : utf8_strtoupper($_GET['sort_dir']); + +// Create any SQL for the WHERE clause +$where_sql = array(); +$like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE'; + +if ($pun_user['g_search_users'] == '1' && $username != '') + $where_sql[] = 'u.username '.$like_command.' \''.$db->escape(str_replace('*', '%', $username)).'\''; +if ($show_group > -1) + $where_sql[] = 'u.group_id='.$show_group; + +// Fetch user count +$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'users AS u WHERE u.id>1 AND u.group_id!='.PUN_UNVERIFIED.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '')) or error('Unable to fetch user list count', __FILE__, __LINE__, $db->error()); +$num_users = $db->result($result); +// Determine the user offset (based on $_GET['p']) +$num_pages = ceil($num_users / 50); + +$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : intval($_GET['p']); +$start_from = 50 * ($p - 1); $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['User list']; if ($pun_user['g_search_users'] == '1') $focus_element = array('userlist', 'username'); +// Generate paging links +$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'userlist.php?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.strtoupper($sort_dir)); + + define('PUN_ALLOW_INDEX', 1); require PUN_ROOT.'header.php'; @@ -59,15 +66,15 @@ require PUN_ROOT.'header.php';

    -
    -
    -
    - -
    - - + - - -

    -
    -
    -
    -

    -
    + +
    + + +

    +
    + +
    +

    +
    -escape(str_replace('*', '%', $username)).'\''; -if ($show_group > -1) - $where_sql[] = 'u.group_id='.$show_group; - -// Fetch user count -$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'users AS u WHERE u.id>1 AND u.group_id!='.PUN_UNVERIFIED.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '')) or error('Unable to fetch user list count', __FILE__, __LINE__, $db->error()); -$num_users = $db->result($result); - - -// Determine the user offset (based on $_GET['p']) -$num_pages = ceil($num_users / 50); - -$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : intval($_GET['p']); -$start_from = 50 * ($p - 1); - -// Generate paging links -$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'userlist.php?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.strtoupper($sort_dir)); - - -?>
    +
    @@ -163,13 +144,13 @@ if ($db->num_rows($result)) $user_title_field = get_title($user_data); ?> - - '.pun_htmlspecialchars($user_data['username']).'' ?> - - + + '.pun_htmlspecialchars($user_data['username']).'' ?> + + - - + +
    +
    +
      +
    • +
    • » 
    • +
    -
    •  
    • » 
    @@ -140,7 +128,7 @@ else $result = $db->query($sql) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error()); -// If there are topics in this forum. +// If there are topics in this forum if ($db->num_rows($result)) { while ($cur_topic = $db->fetch_assoc($result)) @@ -174,7 +162,7 @@ if ($db->num_rows($result)) $item_status .= ' inew'; $icon_type = 'icon inew'; $subject = ''.$subject.''; - $subject_new_posts = ''.$lang_common['New posts'].' ]'; + $subject_new_posts = '[ '.$lang_common['New posts'].' ]'; } else $subject_new_posts = null; @@ -183,9 +171,10 @@ if ($db->num_rows($result)) if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1') { if ($cur_topic['has_posted'] == $pun_user['id']) - $subject = '· '.$subject; - else - $subject = '  '.$subject; + { + $subject = '· '.$subject; + $item_status .= ' iposted'; + } } if ($cur_topic['sticky'] == '1') @@ -198,23 +187,23 @@ if ($db->num_rows($result)) $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); if ($num_pages_topic > 1) - $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]'; + $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]'; else $subject_multipage = null; // Should we show the "New posts" and/or the multipage links? if (!empty($subject_new_posts) || !empty($subject_multipage)) { - $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : ''); + $subject .= !empty($subject_new_posts) ? ' '.$subject_new_posts : ''; $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : ''; } ?> > -
    -
    -
    +
    +
    +
    @@ -250,7 +239,10 @@ else
    -
    •  
    • » 
    +
      +
    • +
    • » 
    • +
    diff --git a/upload/viewtopic.php b/upload/viewtopic.php index 664573e..d70c875 100644 --- a/upload/viewtopic.php +++ b/upload/viewtopic.php @@ -1,27 +1,12 @@ '.$lang_topic['Is subscribed'].' - '.$lang_topic['Unsubscribe'].'

    '."\n"; + $subscraction = ''."\n"; else $subscraction = ''."\n"; } else - $subscraction = '
    '."\n"; + $subscraction = ''; $page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['subject']); define('PUN_ALLOW_INDEX', 1); @@ -180,9 +165,13 @@ require PUN_ROOT.'header.php'; ?>
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    -
    •  » 
    •  » 
    @@ -192,8 +181,7 @@ require PUN_ROOT.'header.php'; require PUN_ROOT.'include/parser.php'; -$bg_switch = true; // Used for switching background color in posts -$post_count = 0; // Keep track of post numbers +$post_count = 0; // Keep track of post numbers // Retrieve the posts (and their respective poster/online status) $result = $db->query('SELECT u.email, u.title, u.url, u.location, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); @@ -207,7 +195,7 @@ while ($cur_post = $db->fetch_assoc($result)) $is_online = ''; $signature = ''; - // If the poster is a registered user. + // If the poster is a registered user if ($cur_post['poster_id'] > 1) { if ($pun_user['g_view_users'] == '1') @@ -247,11 +235,11 @@ while ($cur_post = $db->fetch_assoc($result)) if ($pun_config['o_show_post_count'] == '1' || $pun_user['is_admmod']) $user_info[] = '
    '.$lang_common['Posts'].': '.forum_number_format($cur_post['num_posts']); - // Now let's deal with the contact links (E-mail and URL) + // Now let's deal with the contact links (Email and URL) if ((($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['is_admmod']) && $pun_user['g_send_email'] == '1') - $user_contacts[] = ''.$lang_common['E-mail'].''; + $user_contacts[] = ''.$lang_common['Email'].''; else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') - $user_contacts[] = ''.$lang_common['E-mail'].''; + $user_contacts[] = ''.$lang_common['Email'].''; if ($cur_post['url'] != '') $user_contacts[] = ''.$lang_topic['Website'].''; @@ -275,7 +263,7 @@ while ($cur_post = $db->fetch_assoc($result)) $user_info[] = '
    '.$lang_topic['IP'].': '.$cur_post['poster_ip'].''; if ($pun_config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') - $user_contacts[] = ''.$lang_common['E-mail'].''; + $user_contacts[] = ''.$lang_common['Email'].''; } // Generation post action array (quote, edit, delete etc.) @@ -299,13 +287,7 @@ while ($cur_post = $db->fetch_assoc($result)) } } else - $post_actions[] = '
  • '.$lang_topic['Report'].''.$lang_topic['Link separator'].'
  • '.$lang_topic['Delete'].''.$lang_topic['Link separator'].'
  • '.$lang_topic['Edit'].''.$lang_topic['Link separator'].'
  • '.$lang_topic['Quote'].''; - - - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' roweven' : ' rowodd'; - + $post_actions[] = '
  • '.$lang_topic['Report'].''.$lang_common['Link separator'].'
  • '.$lang_topic['Delete'].''.$lang_common['Link separator'].'
  • '.$lang_topic['Edit'].''.$lang_common['Link separator'].'
  • '.$lang_topic['Quote'].''; // Perform the main parsing of the message (BBCode, smilies, censor words etc) $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); @@ -323,30 +305,35 @@ while ($cur_post = $db->fetch_assoc($result)) } ?> -
    -

    # 

    +
    +

    #

    -
    -
    -
    -
    -'.$user_avatar.'
  • '; ?> -'."\n\t\t\t\t\t", $user_info).''."\n"; ?> -'.implode('  ', $user_contacts).''."\n"; ?> - -
    -
    -

    1) echo ' Re: '; ?>

    -
    - -'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')

    '."\n"; ?> +
    +
    +
    +
    +
    +'.$user_avatar.''; ?> +'."\n\t\t\t\t\t\t", $user_info).''."\n"; ?> +'.implode('  ', $user_contacts).''."\n"; ?> +
    +
    +
    +

    1) echo 'Re: '; ?>

    +
    + +'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')

    '."\n"; ?> +
    +
    '.$signature.'
    '."\n"; ?>
    -
    '.$signature.'
    '."\n"; ?>
    -
    -
    1) echo '

    '.$is_online.'

    '; ?>
    -
    '.implode($lang_topic['Link separator'].'', $post_actions).'
    '."\n" : '
     
    '."\n" ?> + +
    +
    +
    1) echo '

    '.$is_online.'

    '; ?>
    +
    '.implode($lang_common['Link separator'].'', $post_actions).'
    '."\n" : '
     
    '."\n" ?> +
    @@ -360,8 +347,13 @@ while ($cur_post = $db->fetch_assoc($result))
    -
    •  » 
    •  » 
    +
      +
    • +
    • » 
    • +
    • » 
    • +
    +
    @@ -372,7 +364,7 @@ if ($quickpost) { ?> -
    +

    @@ -381,8 +373,8 @@ if ($quickpost)
    - - + +
    -

    +