Soniks
28.06.2005, 13:03
Обновляем в ручную форум BBtoNuke (phpbb для PHP-NUKE) с версии 2.0.15 до 2.0.16:
Откройте: modules/Forums/admin/admin_ug_auth.php
Найдите (843):
@reset($auth_user);
Замените на:
// @reset($auth_user);
Откройте: includes/bbcode.php
Найдите(211):
$patterns[] = "#\+?://[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB (([\w) code.. (no xxxx:// prefix).
$patterns[] = "#\*?)\]([^?].*?)\[/url\]#i";
Замените на:
$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB (((www|ftp)\.[^ \"\n\r\t<) code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
Откройте: includes/usercp_avatar.php
Найдите (205):
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
Замените на:
if ( $width > 0 && $height > 0 && $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
Откройте: includes/usercp_register.php
Найдите (755):
$avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
}
Ниже добавьте:
else
Откройте: modules/Forums/modcp.php
Найдите (477):
$new_forum_id = intval($HTTP_POST_VARS['new_forum']);
$old_forum_id = $forum_id;
Ниже добавьте:
$sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}
if (!$db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}
$db->sql_freeresult($result);
Найдите (790):
$new_forum_id = intval($HTTP_POST_VARS['new_forum_id']);
$topic_time = time();
Ниже добавьте:
$sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}
if (!$db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}
$db->sql_freeresult($result);
Откройте: modules/Forums/viewtopic.php
Найдите (1150):
$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
Замените на:
$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
Выполните SQL запрос:
UPDATE `nuke_bbconfig` SET `config_value` = '.0.16' WHERE `config_name` = 'version'
Заменяя nuke_ на свой префикс!
Откройте: modules/Forums/admin/admin_ug_auth.php
Найдите (843):
@reset($auth_user);
Замените на:
// @reset($auth_user);
Откройте: includes/bbcode.php
Найдите(211):
$patterns[] = "#\+?://[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB (([\w) code.. (no xxxx:// prefix).
$patterns[] = "#\*?)\]([^?].*?)\[/url\]#i";
Замените на:
$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];
// [url=www.phpbb.com]phpBB (((www|ftp)\.[^ \"\n\r\t<) code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
Откройте: includes/usercp_avatar.php
Найдите (205):
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
Замените на:
if ( $width > 0 && $height > 0 && $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
Откройте: includes/usercp_register.php
Найдите (755):
$avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
}
Ниже добавьте:
else
Откройте: modules/Forums/modcp.php
Найдите (477):
$new_forum_id = intval($HTTP_POST_VARS['new_forum']);
$old_forum_id = $forum_id;
Ниже добавьте:
$sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}
if (!$db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}
$db->sql_freeresult($result);
Найдите (790):
$new_forum_id = intval($HTTP_POST_VARS['new_forum_id']);
$topic_time = time();
Ниже добавьте:
$sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}
if (!$db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}
$db->sql_freeresult($result);
Откройте: modules/Forums/viewtopic.php
Найдите (1150):
$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
Замените на:
$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
Выполните SQL запрос:
UPDATE `nuke_bbconfig` SET `config_value` = '.0.16' WHERE `config_name` = 'version'
Заменяя nuke_ на свой префикс!