News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Update to SMF 1.0.1 - Installation Instructions for 1.0

Update to SMF 1.0.1

File Edits ALT + Click to collapse all the operations

./changelog-themes.txt

Find: Select
Changes go downward. Please scroll to the bottom for language changes.
Changelog started with SMF 1.0 RC1; Currently at $Revision: 1.1.2.64 $.
Replace With: Select
Changes go downward. Please scroll to the bottom for language changes.
Changelog started with SMF 1.0 RC1; Currently at $Revision: 1.1.2.65 $.

SMF 1.0.1
================================================================================
Template changes:
--------------------------------------------------------------------------------
* BoardIndex: low importance.
- for internationalization, stopped using $txt[94], lines 320 and 326.
* Profile: low importance.
- fixed a minor layout error in showing a person's posts, line 333.
* Recent: low importance.
- fixed a minor layout error in showing a person's posts, line 29.
* Wireless: low importance.
- changed category ids to start with a letter, lines 28 and 39.


Language file changes:
--------------------------------------------------------------------------------
* index
- Updated copyright to reflect 2005.
* Packages
- Made $txt['package45'] more descriptive.

./changelog.txt

Find: Select
Changes go downward, months go upward. Please scroll to the bottom for a legend.
Changelog started January 1, 2004; Currently at $Revision: 1.1040.2.256 $.
Replace With: Select
Changes go downward, months go upward. Please scroll to the bottom for a legend.
Changelog started January 1, 2004; Currently at $Revision: 1.1040.2.283 $.

SMF 1.0.1 January 13, 2005
================================================================================
January 2005:
--------------------------------------------------------------------------------
! The calendar was not showing birthdates properly at the end of the year. (Calendar.php)
& Fixed a typo in the can't reply to locked topics message. (Errors language files)
! Changed the version numbers of *changed* files to 1.0.1. (all changed files, upgrade.php, smf_1-0.sql)
! Don't show "2: ", or "8: " error level indicator in error messages, show file/line to admins. (Errors.php)
! The attachment directory's size was not being counted properly. (ManageAttachments.php, Post.php)
! Search had some problems still with "temporary table emulation". (Search.php)
! If readfile is disabled, check for null instead of false. (Display.php)
! Fixed a minor typo in the package manager. (PackageGet.php)
! Fixed a minor typo in the profile. (Profile.php)
! Don't log notices from PHP 5 in the error log. (Errors.php)
& Made $txt['package45'] more descriptive. (Packages language files)
! Escape any input made from the login page, just in case. (LogInOut.php)
! Unread topics weren't showing page numbers correctly. (Recent.php)
! Handle attachments with quotes in their names properly. (all converters)
! Update copyright notices. (all changed files, index language files, all converters, help files)
! Use a proper id under WAP for categories. (Wireless template)
! Number format wasn't saving properly from the settings. (Subs.php)
! Moving topics should use default redirect notice in forum's default language. (MoveTopic.php)
! Check to make sure uploaded temp files actually exist when validating them. (Profile.php, Post.php)
! Fix pagination in trackip functionality. (ManageMembers.php)
! For mark unread's purposes, don't check that they aren't the last poster. (Recent.php)
! Whether an email was public or not (email_public) was not properly reflecting guest_hideContacts. (Load.php)
! Edit poll was duplicating slashes, etc., on preview. (Poll.php)
! If there were karma or im options involved with only some members, failure resulted. (yabb_to_smf.php)
! Theme converter was adding too many slashes to PHP code from template.php. (Themes.php)
! GlobalCookies setting was not properly disabled for IP addresses. (Subs-Auth.php)
! Don't cough and die on filenames with tildas in them in the detailed version checker. (Admin.php)
! Minor notice in login if you went to login2 directly. (LogInOut.php)
* Allow the easy uninstallation/upgrade of non-modification packages. (Packages template)
! If Invision's upload directory cannot be found for some reason, use .../uploads. (invision_to_smf.php, invision2_to_smf.php)
! If the package file is zero bytes in size, don't die horribly. (Subs-Package.php)
! Don't create a backup of the "Settings.php" file using the normal tilda method. (Subs-Package.php)
! Blank out url_rewriter.tags so SMF can just do it itself. (Load.php)
! Work a little harder to sanitize filenames. (ManageSmileys.php, Themes.php, QueryString.php)
! Fixed a couple minor typos. (Help files, various files)
! Don't die horribly if the compression data in an archive is corrupt. (Subs-Package.php)


December 2004:
--------------------------------------------------------------------------------
! The package manager tried to show 'package_no_gzip' but it should have been 'package_no_zlib'. (Packages.php)
! Just in case, make sure any files from simplemachines.org don't contain dlattach. (PackageGet.php, Themes.php, ManageSmileys.php)
& Fixed some problems in the Spanish language files. (all language files)
* Don't use $txt[94] + something for total numbers, it's not very internationalizable. (BoardIndex template)
! The XMB converter now properly parses the [align] bbc tag. (xmb_to_smf.php)
& Fixed a minor typo - "through out". (Profile language files, profile help files)
! Fixed a typo in the phpBB converter. (phpbb2_to_smf.php)
! Avoid marking boards and topics read for guests upon deletion. (RemoveTopic.php, MoveTopic.php)
! Smileys couldn't have special characters (<, >, &, etc.) in their alt/description text. (Subs.php)
! Fixed a few problems in the YaBB SE to SMF converter. (yabbse_to_smf.php)
! The YaBB converter is now at the point where it works, and doesn't crash. It may be buggy. (yabb_to_smf.php)
! Don't even allow files to be uploaded as avatars if they have no proper size. (Profile.php)
! Fix a small notice made when you change your password from your profile. (Profile.php)
* Fixed a bit of button display logic. (Recent template, Profile template)

./index.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select

$forum_version = 'SMF 1.0';
Replace With: Select

$forum_version = 'SMF 1.0.1';

./Sources/Admin.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
<div style="margin-top: 1ex;"><b>Mod Developers:</b> Jack.R.Abbit, Aliencowfarm, Big P., Chris Cromer, Cristi&aacute;n &quot;Anguz&quot; L&aacute;vaque, Daniel Diehl, groundup, James &quot;Cheschire&quot; Yarbro, Jesse &quot;Gobalopper&quot; Reid, Spaceman-Spiff.</div>
<div style="margin-top: 1ex;"><b>Coordinators:</b> Adam &quot;Bostasp&quot; Southall and Peter Duggan.</div>
<div style="margin-top: 2ex;">We would also like to give special thanks to not only these members of the Simple Machines Team, but also Babylonking and Alienine (aka. Adrian) for their work on the default theme!</div>
Replace With: Select
<div style="margin-top: 1ex;"><b>Mod Developers:</b> Jack.R.Abbit, Aliencowfarm, Big P., Chris Cromer, Cristi&aacute;n &quot;Anguz&quot; L&aacute;vaque, Daniel Diehl, groundup, James &quot;Cheschire&quot; Yarbro, Jesse &quot;Gobalopper&quot; Reid, Spaceman-Spiff.</div>
<div style="margin-top: 1ex;"><b>Documentation Writers:</b> Peter Duggan, Amacythe, Jerry, and Mattitude.</div>
<div style="margin-top: 1ex;"><b>Language Coordinator:</b> Adam &quot;Bostasp&quot; Southall and Daniel Diehl.</div>
<div style="margin-top: 2ex;">We would also like to give special thanks to not only these members of the Simple Machines Team, but also Babylonking and Alienine (aka. Adrian) for their work on the default theme!</div>
Find: Select
// Look for the version comment in the file header.
if (preg_match('~(?://|/\*)\s*Version:\s+(.+?);\s*' . basename($entry, '.template.php') . '(?:[\s]{2}|\*/)~i', $header, $match) == 1)
$context[$type][$entry] = $match[1];
Replace With: Select
// Look for the version comment in the file header.
if (preg_match('~(?://|/\*)\s*Version:\s+(.+?);\s*' . preg_quote(basename($entry, '.template.php'), '~') . '(?:[\s]{2}|\*/)~i', $header, $match) == 1)
$context[$type][$entry] = $match[1];
Find: Select
// Look for the version comment in the file header.
if (preg_match('~(?://|/\*)\s*Version:\s+(.+?);\s*' . $name . '(?:[\s]{2}|\*/)~i', $header, $match) == 1)
$context['default_language_versions'][$language][$name] = $match[1];
Replace With: Select
// Look for the version comment in the file header.
if (preg_match('~(?://|/\*)\s*Version:\s+(.+?);\s*' . preg_quote($name, '~') . '(?:[\s]{2}|\*/)~i', $header, $match) == 1)
$context['default_language_versions'][$language][$name] = $match[1];

./Sources/Calendar.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
if ($year_low != $year_high)
$age_year = substr($row['birthdate'], 5) <= '12-31' ? $year_low : $year_high;
else
Replace With: Select
if ($year_low != $year_high)
$age_year = substr($row['birthdate'], 5) < substr($high_date, 5) ? $year_high : $year_low;
else

./Sources/Display.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
// On some of the less-bright hosts, readfile() is disabled. It's just a faster, more byte safe, version of what's in the if.
if (@readfile($filename) === false)
echo implode('', file($filename));
Replace With: Select
// On some of the less-bright hosts, readfile() is disabled. It's just a faster, more byte safe, version of what's in the if.
if (@readfile($filename) === null)
echo implode('', file($filename));

./Sources/Errors.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select

if (error_reporting() == 0)
return;
Replace With: Select

// Ignore errors if we're ignoring them or they are strict notices from PHP 5 (which cannot be solved without breaking PHP 4.)
if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT))
return;
Find: Select

log_error($error_level . ': ' . $error_string, $file, $line);
Replace With: Select

$message = log_error($error_level . ': ' . $error_string, $file, $line);
Find: Select
if ($error_level % 255 == E_ERROR || $error_level % 255 == E_WARNING)
fatal_error($error_level . ': ' . $error_string, false);
}
Replace With: Select
if ($error_level % 255 == E_ERROR || $error_level % 255 == E_WARNING)
fatal_error(allowedTo('admin_forum') ? $message : $error_string, false);
}

./Sources/Load.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
if (preg_match('~^a:3:\{i:0;(i:\d{1,6}|s:[1-6]:"\d{1,6}");i:1;s:(0|32):"([a-fA-F0-9]{32})?";i:2;i:\d{1,12};\}$~', $_COOKIE[$cookiename]) == 1)
list ($ID_MEMBER, $password) = @unserialize($_COOKIE[$cookiename]);
$ID_MEMBER = !empty($ID_MEMBER) ? (int) $ID_MEMBER : 0;
}
Replace With: Select
if (preg_match('~^a:3:\{i:0;(i:\d{1,6}|s:[1-6]:"\d{1,6}");i:1;s:(0|32):"([a-fA-F0-9]{32})?";i:2;i:\d{1,12};\}$~', $_COOKIE[$cookiename]) == 1)
{
list ($ID_MEMBER, $password) = @unserialize($_COOKIE[$cookiename]);
$ID_MEMBER = !empty($ID_MEMBER) ? (int) $ID_MEMBER : 0;
}
else
$ID_MEMBER = 0;
}
Find: Select
'hide_email' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || (!empty($profile['hideEmail']) && !empty($modSettings['allow_hideEmail']) && !allowedTo('moderate_forum')),
'email_public' => empty($profile['hideEmail']) || empty($modSettings['allow_hideEmail']),
'registered' => empty($profile['dateRegistered']) ? $txt[470] : timeformat($profile['dateRegistered']),
Replace With: Select
'hide_email' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || (!empty($profile['hideEmail']) && !empty($modSettings['allow_hideEmail']) && !allowedTo('moderate_forum')),
'email_public' => (empty($profile['hideEmail']) || empty($modSettings['allow_hideEmail'])) && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']),
'registered' => empty($profile['dateRegistered']) ? $txt[470] : timeformat($profile['dateRegistered']),
Find: Select
@ini_set('session.use_only_cookies', false);
@ini_set('arg_separator.output', '&amp;');
Replace With: Select
@ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
@ini_set('arg_separator.output', '&amp;');

./Sources/LogInOut.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
elseif (!empty($_POST['cookielength']) && ($_POST['cookielength'] >= 1 || $_POST['cookielength'] <= 525600))
$modSettings['cookieTime'] = $_POST['cookielength'];
Replace With: Select
elseif (!empty($_POST['cookielength']) && ($_POST['cookielength'] >= 1 || $_POST['cookielength'] <= 525600))
$modSettings['cookieTime'] = (int) $_POST['cookielength'];
Find: Select
// Set up the default/fallback stuff.
$context['default_username'] = &$_REQUEST['user'];
$context['default_password'] = '';
Replace With: Select
// Set up the default/fallback stuff.
$context['default_username'] = isset($_REQUEST['user']) ? htmlspecialchars(stripslashes($_REQUEST['user'])) : '';
$context['default_password'] = '';

./Sources/ManageAttachments.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
while ($file = readdir($dir))
$attachmentDirSize += filesize($modSettings['attachmentUploadDir'] . '/' . $file);
closedir($dir);
Replace With: Select
while ($file = readdir($dir))
{
if (substr($file, 0, -1) == '.')
continue;

$attachmentDirSize += filesize($modSettings['attachmentUploadDir'] . '/' . $file);
}
closedir($dir);

./Sources/ManageBoards.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *

./Sources/ManageMembers.php

Find: Select
$context['error_start'] = isset($_GET['err']) ? $_REQUEST['start'] : 0;
$context['message_page_index'] = constructPageIndex($scripturl . '?action=profile;' . ($memID == 0 ? 'searchip=' . $context['ip'] : 'u=' . $memID) . ';sa=trackIP;mes', $context['message_start'], $totalMessages, 20);
$context['error_page_index'] = constructPageIndex($scripturl . '?action=profile;' . ($memID == 0 ? 'searchip=' . $context['ip'] : 'u=' . $memID) . ';sa=trackIP;err', $context['error_start'], $totalErrors, 20);
Replace With: Select
$context['error_start'] = isset($_GET['err']) ? $_REQUEST['start'] : 0;
$context['message_page_index'] = constructPageIndex($scripturl . '?action=' . ($memID == 0 ? 'trackip;searchip=' . $context['ip'] : 'profile;u=' . $memID . ';sa=trackIP') . ';mes', $context['message_start'], $totalMessages, 20);
$context['error_page_index'] = constructPageIndex($scripturl . '?action=' . ($memID == 0 ? 'trackip;searchip=' . $context['ip'] : 'profile;u=' . $memID . ';sa=trackIP') . ';err', $context['error_start'], $totalErrors, 20);

./Sources/ManageSmileys.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
$name = strtok(basename(isset($_FILES['set_gz']) ? $_FILES['set_gz']['name'] : $_REQUEST['set_gz']), '.');
Replace With: Select
$name = strtok(basename(isset($_FILES['set_gz']) ? $_FILES['set_gz']['name'] : $_REQUEST['set_gz']), '.');
$name = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $name);
Find: Select
// Check that the theme is from simplemachines.org, for now... maybe add mirroring later.
if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['set_gz']) == 0)
fatal_lang_error('not_on_simplemachines');
Replace With: Select
// Check that the theme is from simplemachines.org, for now... maybe add mirroring later.
if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['set_gz']) == 0 || strpos($_REQUEST['set_gz'], 'dlattach') !== false)
fatal_lang_error('not_on_simplemachines');

./Sources/ModSettings.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
array('text', 'time_format'),
array('select', 'number_format', array('1234.00', '1,234.00', '1.234,00', '1 234,00', '1234,00')),
array('float', 'time_offset'),
Replace With: Select
array('text', 'time_format'),
array('select', 'number_format', array('1234.00' => '1234.00', '1,234.00' => '1,234.00', '1.234,00' => '1.234,00', '1 234,00' => '1 234,00', '1234,00' => '1234,00')),
array('float', 'time_offset'),

./Sources/MoveTopic.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
{
global $txt, $board, $topic, $db_prefix, $user_info, $context, $ID_MEMBER;
Replace With: Select
{
global $txt, $board, $topic, $db_prefix, $user_info, $context, $ID_MEMBER, $language;
Find: Select
$context['page_title'] = $txt[132];

$context['back_to_topic'] = isset($_REQUEST['goback']);

// Register this form and get a sequence number in $context.
Replace With: Select
$context['page_title'] = $txt[132];
$context['back_to_topic'] = isset($_REQUEST['goback']);

if ($user_info['language'] != $language)
{
loadLanguage('index', $language);
$temp = $txt['movetopic_default'];
loadLanguage('index');

$txt['movetopic_default'] = $temp;
}

// Register this form and get a sequence number in $context.
Find: Select
// Mark inserted topic as read.
db_query("
REPLACE INTO {$db_prefix}log_topics
(ID_TOPIC, ID_MEMBER, logTime)
VALUES ($remnantTopic, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__);
}
Replace With: Select
// Mark inserted topic as read.
if (!$user_info['is_guest'])
db_query("
REPLACE INTO {$db_prefix}log_topics
(ID_TOPIC, ID_MEMBER, logTime)
VALUES ($remnantTopic, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__);
}
Find: Select
{
global $db_prefix, $ID_MEMBER;
Replace With: Select
{
global $db_prefix, $ID_MEMBER, $user_info;
Find: Select

if (!empty($isSeen))
{
Replace With: Select

if (!empty($isSeen) && !$user_info['is_guest'])
{

./Sources/PackageGet.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
$package['is_current'] = $package['is_installed'] && ($installed_mods[$package['id']] == $package['version']);
$package['is_newer'] = $package['is_installed'] && ($installed_mods[$packageInfo['id']] > $packageInfo['version']);
Replace With: Select
$package['is_current'] = $package['is_installed'] && ($installed_mods[$package['id']] == $package['version']);
$package['is_newer'] = $package['is_installed'] && ($installed_mods[$package['id']] > $package['version']);
Find: Select

if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['package']) == 1 && isset($_REQUEST['auto']))
redirectexit('action=packages;sa=install;package=' . $package_name);
Replace With: Select

if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['package']) == 1 && strpos($_REQUEST['package'], 'dlattach') === false && isset($_REQUEST['auto']))
redirectexit('action=packages;sa=install;package=' . $package_name);

./Sources/Packages.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
if (!function_exists('gzinflate'))
fatal_lang_error('package_no_gzip');
Replace With: Select
if (!function_exists('gzinflate'))
fatal_lang_error('package_no_zlib');

./Sources/Poll.php

Find: Select
{
$label = preg_replace('~&amp;#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $label);
Replace With: Select
{
$label = stripslashes(preg_replace('~&amp;#(\d{4,5}|[3-9]\d{2,4}|2[6-9]\d);~', '&#$1;', $label));

./Sources/Post.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
{
// Make sure that the user has not entered a ridiculus amount of options..
if (empty($_POST['poll_max_votes']) || $_POST['poll_max_votes'] <= 0)
Replace With: Select
{
// Make sure that the user has not entered a ridiculous number of options..
if (empty($_POST['poll_max_votes']) || $_POST['poll_max_votes'] <= 0)
Find: Select

if (!is_uploaded_file($_FILES['attachment']['tmp_name'][$n]))
fatal_lang_error('smf124');
Replace With: Select

if (!is_uploaded_file($_FILES['attachment']['tmp_name'][$n]) || !file_exists($_FILES['attachment']['tmp_name'][$n]))
fatal_lang_error('smf124');
Find: Select

// Have we reached the maximum amount of files we are allowed?
$quantity++;
Replace With: Select

// Have we reached the maximum number of files we are allowed?
$quantity++;
Find: Select
while ($file = readdir($dir))
$dirSize += filesize($modSettings['attachmentUploadDir'] . '/' . $file);
closedir($dir);
Replace With: Select
while ($file = readdir($dir))
{
if (substr($file, 0, -1) == '.')
continue;

$dirSize += filesize($modSettings['attachmentUploadDir'] . '/' . $file);
}
closedir($dir);

./Sources/Profile.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
$sizes = @getimagesize($_FILES['attachment']['tmp_name']);
if (is_array($sizes) && (($sizes[0] > $modSettings['avatar_max_width_upload'] && !empty($modSettings['avatar_max_width_upload'])) || ($sizes[1] > $modSettings['avatar_max_height_upload'] && !empty($modSettings['avatar_max_height_upload']))))
Replace With: Select
$sizes = @getimagesize($_FILES['attachment']['tmp_name']);

if (is_array($sizes) && (($sizes[0] > $modSettings['avatar_max_width_upload'] && !empty($modSettings['avatar_max_width_upload'])) || ($sizes[1] > $modSettings['avatar_max_height_upload'] && !empty($modSettings['avatar_max_height_upload']))))
Find: Select
}
else
{
Replace With: Select
}
elseif (is_array($sizes))
{
Find: Select
);
$extension = isset($extensions[$sizes[2]]) ? $extensions[$sizes[2]] : (strpos($_FILES['attachment']['name'], '.') ? strrchr($_FILES['attachment']['name'], '.') : '.bmp');
Replace With: Select
);
$extension = isset($extensions[$sizes[2]]) ? $extensions[$sizes[2]] : '.bmp';
Find: Select

if (!is_uploaded_file($_FILES['attachment']['tmp_name']))
fatal_lang_error('smf124');
Replace With: Select

if (!is_uploaded_file($_FILES['attachment']['tmp_name']) || !file_exists($_FILES['attachment']['tmp_name']))
fatal_lang_error('smf124');
Find: Select
'smiley_set' => array(
'id' => isset($_POST['smileySet']) ? $_POST['smileySet'] : $context['member']['smiley_set'],
'name' => isset($context['member']['smiley_set']['name']) ? $context['member']['smiley_set']['name'] : ''
),
Replace With: Select
'smiley_set' => array(
'id' => isset($_POST['smileySet']) ? $_POST['smileySet'] : (isset($context['member']['smiley_set']) ? $context['member']['smiley_set'] : ''),
'name' => isset($context['member']['smiley_set']) ? $context['member']['smiley_set']['name'] : ''
),

./Sources/QueryString.php

Find: Select
$_SERVER = addslashes__recursive($_SERVER);
}
Replace With: Select
$_SERVER = addslashes__recursive($_SERVER);

// FILES work like this: k -> name -> array. So be careful.
foreach ($_FILES as $k => $dummy)
$_FILES[$k]['name'] = addslashes__recursive($_FILES[$k]['name']);
}

./Sources/Recent.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
$context['linktree'][] = array(
'url' => $scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : ''),
'name' => $context['page_title']
Replace With: Select
$context['linktree'][] = array(
'url' => $scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : '') . (empty($board) ? '' : ';board=' . $board . '.0'),
'name' => $context['page_title']
Find: Select
// Make sure the starting place makes sense and construct the page index.
$context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : ''), $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']);
$context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics'];
Replace With: Select
// Make sure the starting place makes sense and construct the page index.
$context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : '') . (empty($board) ? '' : ';board=' . $board . '.0'), $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']);
$context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics'];
Find: Select
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)
WHERE t.ID_MEMBER_UPDATED != $ID_MEMBER
AND m.ID_TOPIC = t.ID_TOPIC
AND m.ID_MEMBER = $ID_MEMBER
Replace With: Select
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)
WHERE m.ID_TOPIC = t.ID_TOPIC
AND m.ID_MEMBER = $ID_MEMBER
Find: Select
// Make sure the starting place makes sense and construct the page index.
$context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'], $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']);
$context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics'];
Replace With: Select
// Make sure the starting place makes sense and construct the page index.
$context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'] . (empty($board) ? '' : ';board=' . $board . '.0'), $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']);
$context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics'];

./Sources/RemoveTopic.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
{
global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER;
Replace With: Select
{
global $db_prefix, $sourcedir, $modSettings, $ID_MEMBER, $user_info;
Find: Select
{
// Check if the recycleboard exists.
$request = db_query("
Replace With: Select
{
// Check if the recycle board exists and if so get the read status.
$request = db_query("
Find: Select
// Mark recycled topic as read.
db_query("
REPLACE INTO {$db_prefix}log_topics
(ID_TOPIC, ID_MEMBER, logTime)
VALUES ($topicID, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__);

// Mark recycle board as seen, if it was marked as seen before.
if (!empty($isRead))
db_query("
Replace With: Select
// Mark recycled topic as read.
if (!$user_info['is_guest'])
db_query("
REPLACE INTO {$db_prefix}log_topics
(ID_TOPIC, ID_MEMBER, logTime)
VALUES ($topicID, $ID_MEMBER, " . time() . ")", __FILE__, __LINE__);

// Mark recycle board as seen, if it was marked as seen before.
if (!empty($isRead) && !$user_info['is_guest'])
db_query("

./Sources/Search.php

Find: Select
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it *
Replace With: Select
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it *
Find: Select
$request = db_query("
DROP TABLE {$db_prefix}matches", __FILE__, __LINE__);
}

// Create temporary tables is disabled, we're gonna need to use PHP's memory and sorting.
else
{
Replace With: Select
$request = db_query("
DROP TABLE {$db_prefix}matches", __FILE__, __LINE__);
}
// Create temporary tables is disabled, we're gonna need to use PHP's memory and sorting.
else
{
Find: Select
}

// Get all the topics with a subject match.
db_query("
SELECT m.ID_TOPIC AS ID_TOPIC, m.ID_MSG, t.numReplies, 1 AS is_subject
FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m
WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : "
Replace With: Select
}

// Get all the topics with a subject match.
$request = db_query("
SELECT m.ID_TOPIC AS ID_TOPIC, m.ID_MSG, t.numReplies, 1 AS is_subject
FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m
WHERE m.ID_MSG = t.ID_FIRST_MSG" . (empty($search_params['brd']) ? '' : "
Find: Select
$sort = array();
$request = db_query("
SELECT
t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch
FROM {$db_prefix}topics AS t
LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? '
WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : "
Replace With: Select
$sort = array();
$request = db_query("
SELECT
t.ID_TOPIC, COUNT(m.ID_MSG) AS numMsg, MAX(m.ID_MSG) AS lastMatch, MIN(m.ID_MSG) AS firstMatch,
COUNT(m.ID_MSG) AS num_matches
FROM {$db_prefix}topics AS t
LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC = t.ID_TOPIC AND $searchQuery)" . (empty($userQuery) ? '
WHERE t.ID_TOPIC IN (' . implode(', ', array_keys($matchingTopics)) . ')' : "
Find: Select
AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . "
GROUP BY t.ID_TOPIC
LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$relevance =
$weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) +
$weight['age'] * ($row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) +
$weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) +
$weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] +
$weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0);
Replace With: Select
AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . "
GROUP BY t.ID_TOPIC
LIMIT $_REQUEST[start], $modSettings[search_results_per_page]", __FILE__, __LINE__);
$tmp = array();
while ($row = mysql_fetch_assoc($request))
{
$relevance =
$weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) +
$weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) +
$weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) +
$weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] +
$weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0);
Find: Select
WHERE $userQuery
AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . "
GROUP BY t.ID_TOPIC", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$relevance =
$weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) +
$weight['age'] * ($row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) +
$weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) +
$weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] +
$weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0);
Replace With: Select
WHERE $userQuery
AND t.ID_TOPIC IN (" . implode(', ', array_keys($matchingTopics)) . ")") . "
GROUP BY t.ID_TOPIC", __FILE__, __LINE__);
$tmp = array();
while ($row = mysql_fetch_assoc($request))
{
$relevance =
$weight['frequency'] * ($row['numMsg'] == 0 ? 0 : $row['numMsg'] / ($matchingTopics[$row['ID_TOPIC']]['numReplies'] + 1)) +
$weight['age'] * (!isset($row['ID_MSG']) || $row['ID_MSG'] === null || $row['lastMatch'] < $minMsg ? 0 : ($row['lastMatch'] - $minMsg) / $recentMsg) +
$weight['length'] * ($matchingTopics[$row['ID_TOPIC']]['numReplies'] < $humungousTopicPosts ? $matchingTopics[$row['ID_TOPIC']]['numReplies'] / $humungousTopicPosts : 1) +
$weight['subject'] * $matchingTopics[$row['ID_TOPIC']]['is_subject'] +
$weight['first_message'] * ($row['firstMatch'] == $matchingTopics[$row['ID_TOPIC']]['ID_FIRST_MSG'] ? 1 : 0);

./Sources/Subs-Auth.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select

// Globalize cookies across domains?
if (!empty($modSettings['globalCookies']))
{
// If we can't figure it out, it's probably an IP so just skip it.
if (preg_match('~(?:[^\.]+\.)?([^\.]{3,}\..+)\z~i', $parsed_url['host'], $parts) == 1)
$parsed_url['host'] = '.' . $parts[1];
Replace With: Select

// Globalize cookies across domains (filter out IP-addresses)?
if (!empty($modSettings['globalCookies']) && !preg_match('~^\d{1,3}(\.\d{1,3}){3}$~', $parsed_url['host']))
{
// If we can't figure it out, just skip it.
if (preg_match('~(?:[^\.]+\.)?([^\.]{2,}\..+)\z~i', $parsed_url['host'], $parts) == 1)
$parsed_url['host'] = '.' . $parts[1];

./Sources/Subs-Package.php

Find: Select
* Subs-Package.php *
*******************************************************************************
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it *
* under the terms of the provided license as published by Lewis Media. *
* *
Replace With: Select
* Subs-Package.php *
*******************************************************************************
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it *
* under the terms of the provided license as published by Lewis Media. *
* *
Find: Select
{
umask(0);
if ($destination !== null && !file_exists($destination) && !$single_file)
mkdir($destination, 0777);

$id = unpack('H2a/H2b', substr($data, 0, 2));
if (strtolower($id['a'] . $id['b']) != '1f8b')
{
// Okay, this ain't no tar.gz, but maybe it's a zip file.
if (substr($data, 0, 2) == 'PK')
Replace With: Select
{
umask(0);
if ($destination !== null && !file_exists($destination) && !$single_file)
mkdir($destination, 0777);

// No signature?
if (strlen($data) < 2)
return false;

$id = unpack('H2a/H2b', substr($data, 0, 2));
if (strtolower($id['a'] . $id['b']) != '1f8b')
{
// Okay, this ain't no tar.gz, but maybe it's a zip file.
if (substr($data, 0, 2) == 'PK')
Find: Select
$actions[] = array(
'type' => 'chmod',
'filename' => $working_file
);

if (!$testing)
{
if (!empty($modSettings['package_make_backups']) && file_exists($working_file))
copy($working_file, $working_file . '~');

file_put_contents($working_file, $working_data);
}

$actions[] = array(
Replace With: Select
$actions[] = array(
'type' => 'chmod',
'filename' => $working_file
);

if (basename($working_file) == 'Settings_bak.php')
continue;

if (!$testing)
{
if (!empty($modSettings['package_make_backups']) && file_exists($working_file))
{
// No, no, not Settings.php!
if (basename($working_file) == 'Settings.php')
copy($working_file, dirname($working_file) . '/Settings_bak.php');
else
copy($working_file, $working_file . '~');
}

file_put_contents($working_file, $working_data);
}

$actions[] = array(
Find: Select
if (file_exists($working_file) && !is_writable($working_file))
@chmod($working_file, 0777);
elseif (!is_writable(dirname($working_file)))
@chmod(dirname($working_file), 0777);

if (!is_writable($working_file))
$actions[] = array(
'type' => 'chmod',
'filename' => $working_file
);

if (!$testing)
{
if (!empty($modSettings['package_make_backups']) && file_exists($working_file))
copy($working_file, $working_file . '~');

file_put_contents($working_file, $working_data);
}
}
Replace With: Select
if (file_exists($working_file) && !is_writable($working_file))
@chmod($working_file, 0777);
elseif (!is_writable(dirname($working_file)))
@chmod(dirname($working_file), 0777);

// Don't even dare.
if (basename($working_file) == 'Settings_bak.php')
continue;

if (!is_writable($working_file))
$actions[] = array(
'type' => 'chmod',
'filename' => $working_file
);

if (!$testing)
{
if (!empty($modSettings['package_make_backups']) && file_exists($working_file))
{
if (basename($working_file) == 'Settings.php')
copy($working_file, dirname($working_file) . '/Settings_bak.php');
else
copy($working_file, $working_file . '~');
}

file_put_contents($working_file, $working_data);
}
}
Find: Select
$file_info['data'] = gzinflate($file_info['data']);
Replace With: Select
$file_info['data'] = @gzinflate($file_info['data']);

./Sources/Subs.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
$smileyfromcache[] = '/(?<=[>:\?\.\s\xA0[\]()*\\\;])(' . preg_quote($smileysfrom[$i], '/') . '|' . preg_quote(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), '/') . ')(?=[^[:alpha:]0-9]|$)/';
$smileytocache[] = '<img src="' . $modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i] . '" alt="' . $smileysdescs[$i] . '" border="0" />';
}
Replace With: Select
$smileyfromcache[] = '/(?<=[>:\?\.\s\xA0[\]()*\\\;])(' . preg_quote($smileysfrom[$i], '/') . '|' . preg_quote(htmlspecialchars($smileysfrom[$i], ENT_QUOTES), '/') . ')(?=[^[:alpha:]0-9]|$)/';
$smileytocache[] = '<img src="' . $modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i] . '" alt="' . htmlspecialchars($smileysdescs[$i]) . '" border="0" />';
}
Find: Select
echo '
The administrator doesn\'t want a copyright notice saying this is copyright 2001-2004 by <a href="http://www.lewismedia.com/" target="_blank">Lewis Media</a>, and named <a href="http://www.simplemachines.org/">SMF</a>, so the forum will honor this request.';
}
Replace With: Select
echo '
The administrator doesn\'t want a copyright notice saying this is copyright 2001-2005 by <a href="http://www.lewismedia.com/" target="_blank">Lewis Media</a>, and named <a href="http://www.simplemachines.org/">SMF</a>, so the forum will honor this request.';
}

./Sources/Themes.php

Find: Select
* =========================================================================== *
* Software Version: SMF 1.0 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Replace With: Select
* =========================================================================== *
* Software Version: SMF 1.0.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
Find: Select
$theme_name = strtok(basename(isset($_FILES['theme_gz']) ? $_FILES['theme_gz']['name'] : $_REQUEST['theme_gz']), '.');
$theme_dir = $boarddir . '/Themes/' . $theme_name;
Replace With: Select
$theme_name = strtok(basename(isset($_FILES['theme_gz']) ? $_FILES['theme_gz']['name'] : $_REQUEST['theme_gz']), '.');
$theme_name = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $theme_name);
$theme_dir = $boarddir . '/Themes/' . $theme_name;
Find: Select
// Check that the theme is from simplemachines.org, for now... maybe add mirroring later.
if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['theme_gz']) == 0)
fatal_lang_error('not_on_simplemachines');
Replace With: Select
// Check that the theme is from simplemachines.org, for now... maybe add mirroring later.
if (preg_match('~^http://[\w_\-]+\.simplemachines\.org/~', $_REQUEST['theme_gz']) == 0 || strpos($_REQUEST['theme_gz'], 'dlattach') !== false)
fatal_lang_error('not_on_simplemachines');
Find: Select
// First remove the slashes from the single quotes.
$string = strtr($string, array('\\\'' => '\''));
Replace With: Select
// First remove the slashes from the single quotes.
$string = strtr(stripslashes($string), array('\\\'' => '\''));

./Themes/classic/BoardIndex.template.php

Find: Select
<?php
// Version: 1.0; BoardIndex
Replace With: Select
<?php
// Version: 1.0.1; BoardIndex
Find: Select
<td class="smalltext">
', $txt[490], ': <b>', $modSettings['totalTopics'], '</b> &nbsp;&nbsp;&nbsp;&nbsp; ', $txt[94], ' ', $txt[95], ': <b>', $modSettings['totalMessages'], '</b><br />
', !empty($context['latest_post']) ? $txt[659] . ':
Replace With: Select
<td class="smalltext">
', $txt[490], ': <b>', $modSettings['totalTopics'], '</b> &nbsp;&nbsp;&nbsp;&nbsp; ', $txt[489], ': <b>', $modSettings['totalMessages'], '</b><br />
', !empty($context['latest_post']) ? $txt[659] . ':
Find: Select
<td class="smalltext">
', $txt[94], ' ', $txt[19], ': <b>', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $modSettings['memberCount'] . '</a>' : $modSettings['memberCount'], '</b><br />
', $txt[656], ': <b>', $context['latest_member']['link'], '</b><br />';
Replace With: Select
<td class="smalltext">
', $txt[488], ': <b>', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $modSettings['memberCount'] . '</a>' : $modSettings['memberCount'], '</b><br />
', $txt[656], ': <b>', $context['latest_member']['link'], '</b><br />';

./Themes/classic/Post.template.php

Find: Select

// Show an extra link for addionial smileys (if there are any).
if (!empty($context['smileys']['popup']))
Replace With: Select

// Show an extra link for additional smileys (if there are any).
if (!empty($context['smileys']['popup']))

./Themes/default/BoardIndex.template.php

Find: Select
<?php
// Version: 1.0; BoardIndex
Replace With: Select
<?php
// Version: 1.0.1; BoardIndex
Find: Select
<td class="smalltext">
<div style="float: left; width: 50%;">', $txt[490], ': <b>', $modSettings['totalTopics'], '</b></div>', $txt[94], ' ', $txt[95], ': <b>', $modSettings['totalMessages'], '</b><br />', !empty($context['latest_post']) ? '
' . $txt[659] . ': &quot;' . $context['latest_post']['link'] . '&quot; (' . $context['latest_post']['time'] . ')<br />' : '', '
Replace With: Select
<td class="smalltext">
<div style="float: left; width: 50%;">', $txt[490], ': <b>', $modSettings['totalTopics'], '</b></div>', $txt[489], ': <b>', $modSettings['totalMessages'], '</b><br />', !empty($context['latest_post']) ? '
' . $txt[659] . ': &quot;' . $context['latest_post']['link'] . '&quot; (' . $context['latest_post']['time'] . ')<br />' : '', '
Find: Select
<td width="32%" class="smalltext" valign="top">
', $txt[94], ' ', $txt[19], ': <b><a href="', $scripturl, '?action=mlist">', $modSettings['memberCount'], '</a></b><br />
', $txt[656], ': <b>', $context['latest_member']['link'], '</b><br />';
Replace With: Select
<td width="32%" class="smalltext" valign="top">
', $txt[488], ': <b><a href="', $scripturl, '?action=mlist">', $modSettings['memberCount'], '</a></b><br />
', $txt[656], ': <b>', $context['latest_member']['link'], '</b><br />';

./Themes/default/help/index.english.html

Find: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2004 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>
Replace With: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2005 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>

./Themes/default/help/index.english.xml

Find: Select
<copyright>
Copyright &copyright; 2001-2004 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>
Replace With: Select
<copyright>
Copyright &copyright; 2001-2005 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>

./Themes/default/help/loginout.english.html

Find: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2004 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>
Replace With: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2005 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>

./Themes/default/help/loginout.english.xml

Find: Select
<copyright>
Copyright &copyright; 2001-2004 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>
Replace With: Select
<copyright>
Copyright &copyright; 2001-2005 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>

./Themes/default/help/pm.english.html

Find: Select
<td>Date and time of message</td>
<td>Another Member</td>
<td><a href="#interface" class="board">Message Subject</a></td>
<td align="center"><input type="checkbox" class="check" /></td>
Replace With: Select
<td>Date and time of message</td>
<td><a href="#interface" class="board">Message Subject</a></td>
<td>Another Member</td>
<td align="center"><input type="checkbox" class="check" /></td>
Find: Select
<li>The <strong>Reload</strong> button checks for new messages by refreshing the page.</li>
<li>The <strong>Date</strong>, <strong>From</strong> and <strong>Subject</strong> links enable you to sort the columns by these parameters (with <strong>Date</strong> also toggling between descending and ascending order as indicated by the little arrow).</li>
<li>The main subject title links to the start of the message, which will be further down the same page.</li>
Replace With: Select
<li>The <strong>Reload</strong> button checks for new messages by refreshing the page.</li>
<li>The <strong>Date</strong>, <strong>Subject</strong>, and <strong>From</strong> links enable you to sort the columns by these parameters (with <strong>Date</strong> also toggling between descending and ascending order as indicated by the little arrow).</li>
<li>The main subject title links to the start of the message, which will be further down the same page.</li>
Find: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2004 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>
Replace With: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2005 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>

./Themes/default/help/pm.english.xml

Find: Select
<item>The <action>Reload</action> button checks for new messages by refreshing the page.</item>
<item>The <sort-by>Date</sort-by>, <sort-by>From</sort-by> and <sort-by>Subject</sort-by> links enable you to sort the columns by these parameters (with <sort-by>Date</sort-by> also toggling between descending and ascending order as indicated by the little arrow).</item>
<item>The main subject title links to the start of the message, which will be further down the same page.</item>
Replace With: Select
<item>The <action>Reload</action> button checks for new messages by refreshing the page.</item>
<item>The <sort-by>Date</sort-by>, <sort-by>Subject</sort-by>, and <sort-by>From</sort-by> links enable you to sort the columns by these parameters (with <sort-by>Date</sort-by> also toggling between descending and ascending order as indicated by the little arrow).</item>
<item>The main subject title links to the start of the message, which will be further down the same page.</item>
Find: Select
<copyright>
Copyright &copyright; 2001-2004 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>
Replace With: Select
<copyright>
Copyright &copyright; 2001-2005 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>

./Themes/default/help/pm.xslt

Find: Select
<xsl:value-of select="date-time" />
</td>
<td>
<xsl:value-of select="member" />
</td>
<td>
<a href="#interface" class="board">
<xsl:value-of select="about" />
</a>
</td>
<td align="center">
<input type="checkbox" class="check" />
Replace With: Select
<xsl:value-of select="date-time" />
</td>
<td>
<a href="#interface" class="board">
<xsl:value-of select="about" />
</a>
</td>
<td>
<xsl:value-of select="member" />
</td>
<td align="center">
<input type="checkbox" class="check" />

./Themes/default/help/posting.english.html

Find: Select
<html xmlns="http://www.w3.org/1999/xhtml">
Replace With: Select
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Find: Select
<hr noshade="noshade" size="1" />
<p>Copyright &#169; 2001-2004 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>
Replace With: Select
<hr noshade="noshade" size="1" />
<p>Copyright &#169; 2001-2005 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>

./Themes/default/help/posting.english.xml

Find: Select
<copyright>
Copyright &copyright; 2001-2004 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>
Replace With: Select
<copyright>
Copyright &copyright; 2001-2005 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>

./Themes/default/help/profile.english.html

Find: Select
<td width="40%"><b>Time Format:</b><br />
<a href="../../../index.php?action=helpadmin;help=time_format" onclick="return reqWin(this.href);" class="help"><img src="../images/helptopics.gif" alt="Help" border="0" align="left" style="padding-right: 1ex;" /></a> <span class="smalltext">The format here will be used to show dates through out this forum.</span></td>
<td><select style="margin-bottom: 4px;">
Replace With: Select
<td width="40%"><b>Time Format:</b><br />
<a href="../../../index.php?action=helpadmin;help=time_format" onclick="return reqWin(this.href);" class="help"><img src="../images/helptopics.gif" alt="Help" border="0" align="left" style="padding-right: 1ex;" /></a> <span class="smalltext">The format here will be used to show dates throughout this forum.</span></td>
<td><select style="margin-bottom: 4px;">
Find: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2004 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>
Replace With: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2005 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>

./Themes/default/help/profile.english.xml

Find: Select
<help>Help</help>
<caption-date>The format here will be used to show dates through out this forum.</caption-date>
<date-option-selected>Forum Default</date-option-selected>
Replace With: Select
<help>Help</help>
<caption-date>The format here will be used to show dates throughout this forum.</caption-date>
<date-option-selected>Forum Default</date-option-selected>
Find: Select
<copyright>
Copyright &copyright; 2001-2004 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>
Replace With: Select
<copyright>
Copyright &copyright; 2001-2005 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>

./Themes/default/help/registering.english.html

Find: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2004 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>
Replace With: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2005 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>

./Themes/default/help/registering.english.xml

Find: Select
<copyright>
Copyright &copyright; 2001-2004 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>
Replace With: Select
<copyright>
Copyright &copyright; 2001-2005 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>

./Themes/default/help/searching.english.html

Find: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2004 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>
Replace With: Select
<hr noshade="noshade" size="1" />
<p>Copyright &copy; 2001-2005 <a href="http://www.lewismedia.com/">Lewis Media</a>. All Rights Reserved.</p>
</div>

./Themes/default/help/searching.english.xml

Find: Select
<copyright>
Copyright &copyright; 2001-2004 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>
Replace With: Select
<copyright>
Copyright &copyright; 2001-2005 <link site="http://www.lewismedia.com/">Lewis Media</link>. All Rights Reserved.
</copyright>

./Themes/default/languages/Errors.english.php

Find: Select
$txt[76] = 'You didn\'t fill the email field out. It is required.';
$txt[90] = 'This topic is locked, you are not allow to post or modify messages...';
$txt[91] = 'Password field empty';
Replace With: Select
$txt[76] = 'You didn\'t fill the email field out. It is required.';
$txt[90] = 'This topic is locked, you are not allowed to post or modify messages...';
$txt[91] = 'Password field empty';

./Themes/default/languages/index.english.php

Find: Select
<?php
// Version: 1.0; index
Replace With: Select
<?php
// Version: 1.0.1; index
Find: Select
$forum_copyright = $context['forum_name'] . ' | Powered by <a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">' . $forum_version . '</a>.<br />
&copy; 2001-2004, <a href="http://www.lewismedia.com/" target="_blank">Lewis Media</a>. All Rights Reserved.';
Replace With: Select
$forum_copyright = $context['forum_name'] . ' | Powered by <a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">' . $forum_version . '</a>.<br />
&copy; 2001-2005, <a href="http://www.lewismedia.com/" target="_blank">Lewis Media</a>. All Rights Reserved.';

./Themes/default/languages/Packages.english.php

Find: Select
<?php
// Version: 1.0; Packages
Replace With: Select
<?php
// Version: 1.0.1; Packages
Find: Select
$txt['package44'] = 'Installing this package will perform the following actions:';
$txt['package45'] = 'There are no installation or uninstallation actions defined!';
$txt['package50'] = 'Create';
Replace With: Select
$txt['package44'] = 'Installing this package will perform the following actions:';
$txt['package45'] = 'The package you are trying to download or install is either corrupt or not compatible with this version of SMF.';
$txt['package50'] = 'Create';

./Themes/default/languages/Profile.english.php

Find: Select
$txt[475] = 'I have my own pic';
$txt[479] = 'The format here will be used to show dates through out this forum.';
$txt[486] = 'Time Format';
Replace With: Select
$txt[475] = 'I have my own pic';
$txt[479] = 'The format here will be used to show dates throughout this forum.';
$txt[486] = 'Time Format';

./Themes/default/Packages.template.php

Find: Select
<?php
// Version: 1.0; Packages

function template_main()
{
global $context, $settings, $options;
}

function template_package_above()
{
global $context, $settings, $options, $txt;
Replace With: Select
<?php
// Version: 1.0.1; Packages

function template_main()
{
global $context, $settings, $options;
}

function template_package_above()
{
global $context, $settings, $options, $txt;
Find: Select

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
Replace With: Select

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
Find: Select
<td>', $package['name'], '</td>
<td>', $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
Replace With: Select
<td>', $package['name'], '</td>
<td>', $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
Find: Select
<td>' . $package['name'] . '</td>
<td>' . $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
Replace With: Select
<td>' . $package['name'] . '</td>
<td>' . $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
Find: Select
<td>' . $package['name'] . '</td>
<td>' . $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>
Replace With: Select
<td>' . $package['name'] . '</td>
<td>' . $package['version'];

if ($package['is_installed'] && !$package['is_newer'])
echo '
<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" border="0" align="middle" style="margin-left: 2ex;" />';

echo '
</td>
<td align="right">';

if ($package['can_uninstall'])
echo '
<a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
elseif ($package['can_upgrade'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
elseif ($package['can_install'])
echo '
<a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

echo '
<a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
<a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
</td>
</tr>';
}

echo '
</table>
</td>

./Themes/default/Profile.template.php

Find: Select
<?php
// Version: 1.0; Profile
Replace With: Select
<?php
// Version: 1.0.1; Profile
Find: Select
<a href="', $scripturl, '?action=profile;u=', $context['current_member'], ';sa=showPosts;start=', $context['start'], ';delete=', $post['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_mark_notify']))
echo '
Replace With: Select
<a href="', $scripturl, '?action=profile;u=', $context['current_member'], ';sa=showPosts;start=', $context['start'], ';delete=', $post['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_reply']))
echo '

./Themes/default/Recent.template.php

Find: Select
<?php
// Version: 1.0; Recent
Replace With: Select
<?php
// Version: 1.0.1; Recent
Find: Select
<a href="', $scripturl, '?action=recent;delete=', $post['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_mark_notify']))
echo '
Replace With: Select
<a href="', $scripturl, '?action=recent;delete=', $post['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
if ($post['can_delete'] && ($post['can_mark_notify'] || $post['can_reply']))
echo '

./Themes/default/Wireless.template.php

Find: Select
<?php
// Version: 1.0; Wireless
Replace With: Select
<?php
// Version: 1.0.1; Wireless
Find: Select
echo '
<p><anchor>', $category['name'], '<go href="#', $category['id'], '" /></anchor><br /></p>';
Replace With: Select
echo '
<p><anchor>', $category['name'], '<go href="#c', $category['id'], '" /></anchor><br /></p>';
Find: Select
echo '
<card id="', $category['id'], '">
<p><b>', $category['name'], '</b><br /></p>';
Replace With: Select
echo '
<card id="c', $category['id'], '">
<p><b>', $category['name'], '</b><br /></p>';
Advertisement: