Новый <!DOCTYPE> - HTML5; фикс добавления поисковых слов в базу, если поисковым движком выбран Sphinx; удаление seo_link (бессмысленная функция, никакой роли в современном SEO не играющая); удаление QUIRKS_MODE (морально устарело); фикс ссылки поиска пользователя; пустая папка upgrade для будущих ревизий. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@568 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08@gmail.com 2014-01-26 18:28:56 +00:00
commit f577e79564
12 changed files with 31 additions and 56 deletions

View file

@ -19,7 +19,7 @@ error_reporting(E_ALL);
@ini_set('display_errors', 1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">

View file

@ -15,7 +15,7 @@ while (@ob_end_flush());
ob_implicit_flush();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">

View file

@ -15,7 +15,7 @@ $user->session_start();
while (@ob_end_flush());
ob_implicit_flush();
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
?><!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">

View file

@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 (unstable)';
$bb_cfg['tp_release_date'] = '23-01-2014';
$bb_cfg['tp_release_state'] = 'R567';
$bb_cfg['tp_release_date'] = '26-01-2014';
$bb_cfg['tp_release_state'] = 'R568';
// Database
$charset = 'utf8';
@ -537,7 +537,4 @@ $bb_cfg['captcha'] = array(
'img_path' => BB_PATH .'/images/captcha/', # without '/'
);
// SEO
$bb_cfg['seo_link_home_page'] = false;
define('BB_CFG_LOADED', true);

View file

@ -419,11 +419,13 @@ function replace_synonyms ($text)
function add_search_words ($post_id, $post_message, $topic_title = '', $only_return_words = false)
{
global $bb_cfg;
$text = $topic_title .' '. $post_message;
$text = strip_bbcode_uid($text);
$words = ($text) ? extract_search_words($text) : array();
if ($only_return_words)
if ($only_return_words || $bb_cfg['search_engine_type'] == 'sphinx')
{
return join("\n", $words);
}

View file

@ -2024,7 +2024,7 @@ function redirect ($url)
if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
{
header('Refresh: 0; URL='. $redirect_url);
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="refresh" content="0; url='. $redirect_url .'"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="'. $redirect_url .'">HERE</a> to be redirected</div></body></html>';
echo '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="refresh" content="0; url='. $redirect_url .'"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="'. $redirect_url .'">HERE</a> to be redirected</div></body></html>';
exit;
}
@ -2827,16 +2827,3 @@ function profile_url ($data)
return $profile;
}
function seo_link_header ($str)
{
/**
* Функция обработки url. Сверяет url с переданным выражением.
*/
global $bb_cfg;
$regexp = "/{$str}\.php/";
$return = ($bb_cfg['seo_link_home_page']) ? ((preg_match($regexp, $_SERVER['SCRIPT_NAME'])) ? false : true) : true;
return $return;
}

View file

@ -165,25 +165,13 @@ if ($bb_cfg['reports_enabled'])
else $report_list = '';
// Report [END]
// FOR SEO
$template->assign_vars(array(
'SEO_LINK_INDEX_PAGE' => seo_link_header('index'),
'SEO_LINK_TRACKER_PAGE' => seo_link_header('tracker'),
'SEO_LINK_SEARCH_PAGE' => seo_link_header('search'),
'SEO_LINK_FAQ_PAGE' => seo_link_header('faq'),
'SEO_LINK_GROUP_PAGE' => seo_link_header('groupcp'),
'SEO_LINK_MEMEBERLIST_PAGE' => seo_link_header('memberlist'),
));
$template->assign_vars(array(
'SIMPLE_HEADER' => !empty($gen_simple_header),
'IN_ADMIN' => defined('IN_ADMIN'),
'QUIRKS_MODE' => !empty($page_cfg['quirks_mode']),
'SHOW_ADS' => (!$logged_in || isset($bb_cfg['show_ads_users'][$user->id]) || (!($is_admin || $is_mod) && $user->show_ads)),
'USER_HIDE_CAT' => (BB_SCRIPT == 'index'),
'USER_HIDE_CAT' => (BB_SCRIPT == 'index'),
'USER_RUS' => ($userdata['user_lang'] != 'english') ? true : false,

View file

@ -114,7 +114,7 @@ elseif ($do == 'info')
$in_info = true;
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
?><!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

View file

@ -295,7 +295,7 @@ if (empty($_GET) && empty($_POST))
'THIS_USER_ID' => $userdata['user_id'],
'THIS_USER_NAME' => addslashes($userdata['username']),
'SEARCH_ACTION' => "search.php",
'U_SEARCH_USER' => "search.php?mode=searchuser&input_name=$poster_name_key",
'U_SEARCH_USER' => "search.php?mode=searchuser&amp;input_name=$poster_name_key",
'ONLOAD_FOCUS_ID' => 'text_match_input',
'MY_TOPICS_ID' => 'my_topics',
@ -501,14 +501,14 @@ if ($post_mode)
if ($text_match_sql)
{
$search_match_topics_csv = '';
$title_match_topics = get_title_match_topics($text_match_sql, $forum_selected);
$title_match_topics = get_title_match_topics($text_match_sql, $forum_selected);
if (!$search_match_topics_csv = join(',', $title_match_topics))
{
bb_die($lang['NO_SEARCH_MATCH']);
}
$where_id = ($title_match) ? 'topic_id' : 'post_id';
$where_id = ($title_match) ? 'topic_id' : 'post_id';
$SQL['WHERE'][] = "$tbl.$where_id IN($search_match_topics_csv)";
prevent_huge_searches($SQL);

View file

@ -1,7 +1,7 @@
<!-- IF TPL_ADMIN_FRAMESET -->
<!--========================================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!DOCTYPE html>
<html dir="{L_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={L_CONTENT_ENCODING}" />

View file

@ -15,7 +15,7 @@ if (!empty($_POST['message']))
$message .= $_POST['message'];
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

View file

@ -1,4 +1,5 @@
<!-- IF QUIRKS_MODE --><!-- ELSE --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><!-- ENDIF -->
<!DOCTYPE html>
<html dir="{L_CONTENT_DIRECTION}">
<head>
@ -378,21 +379,21 @@ if (top != self) {
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="nowrap">
<!-- IF SEO_LINK_INDEX_PAGE --><a href="{U_INDEX}"><!-- ENDIF --><b>{L_HOME}</b><!-- IF SEO_LINK_INDEX_PAGE --></a><!-- ENDIF --><span style="color:#CDCDCD;">|</span>
<!-- IF SEO_LINK_TRACKER_PAGE --><a href="{U_TRACKER}"><!-- ENDIF --><b>{L_TRACKER}</b><!-- IF SEO_LINK_TRACKER_PAGE --></a><!-- ENDIF --><span style="color:#CDCDCD;">|</span>
<!-- IF SEO_LINK_SEARCH_PAGE --><a href="{U_SEARCH}"><!-- ENDIF --><b>{L_SEARCH}</b><!-- IF SEO_LINK_SEARCH_PAGE --></a><!-- ENDIF --><span style="color:#CDCDCD;">|</span>
<a href="{U_INDEX}"><b>{L_HOME}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_TRACKER}"><b>{L_TRACKER}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_SEARCH}"><b>{L_SEARCH}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_TERMS}"><b>{L_TERMS}</b></a><span style="color:#CDCDCD;">|</span>
<!-- IF SEO_LINK_FAQ_PAGE --><a href="{U_FAQ}"><!-- ENDIF --><b style="color: #993300; cursor: help;">{L_FAQ}</b><!-- IF SEO_LINK_FAQ_PAGE --></a><!-- ENDIF --><span style="color:#CDCDCD;">|</span>
<!-- IF SEO_LINK_GROUP_PAGE --><a href="{U_GROUP_CP}"><!-- ENDIF --><b>{L_USERGROUPS}</b><!-- IF SEO_LINK_GROUP_PAGE --></a><!-- ENDIF --><span style="color:#CDCDCD;">|</span>
<!-- IF SEO_LINK_MEMEBERLIST_PAGE --><a href="{U_MEMBERLIST}"><!-- ENDIF --><b>{L_MEMBERLIST}</b><!-- IF SEO_LINK_MEMEBERLIST_PAGE --></a><!-- ENDIF --><span style="color:#CDCDCD;">|</span>
<a href="{U_FAQ}"><b style="color: #993300; cursor: help;">{L_FAQ}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_GROUP_CP}"><b>{L_USERGROUPS}</b></a><span style="color:#CDCDCD;">|</span>
<a href="{U_MEMBERLIST}"><b>{L_MEMBERLIST}</b></a><span style="color:#CDCDCD;">|</span>
</td>
<td class="nowrap" align="right">
<!-- BEGIN switch_report_list -->
<a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST}</a> &#0183;
<!-- END switch_report_list -->
<!-- BEGIN switch_report_list_new -->
<strong><a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST} &#0183; </a></strong>
<!-- END switch_report_list_new -->
<!-- BEGIN switch_report_list -->
<a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST}</a> &#0183;
<!-- END switch_report_list -->
<!-- BEGIN switch_report_list_new -->
<strong><a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST} &#0183; </a></strong>
<!-- END switch_report_list_new -->
<!-- IF LOGGED_IN -->
<!-- IF HAVE_NEW_PM || HAVE_UNREAD_PM -->
@ -411,7 +412,7 @@ if (top != self) {
<div id="logo">
<!--<h1>{SITENAME}</h1>
<h6>{SITE_DESCRIPTION}</h6> -->
<!-- IF SEO_LINK_INDEX_PAGE --><a href="{U_INDEX}"><!-- ENDIF --><img src="images/logo/logo.png" alt="{SITENAME}" /><!-- IF SEO_LINK_INDEX_PAGE --></a><!-- ENDIF -->
<a href="{U_INDEX}"><img src="images/logo/logo.png" alt="{SITENAME}" /></a>
</div>
<!--/logo-->