mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r568
Новый <!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:
parent
357b3708fb
commit
f577e79564
12 changed files with 31 additions and 56 deletions
|
@ -19,7 +19,7 @@ error_reporting(E_ALL);
|
||||||
@ini_set('display_errors', 1);
|
@ini_set('display_errors', 1);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE html>
|
||||||
<html dir="ltr">
|
<html dir="ltr">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||||
|
|
|
@ -15,7 +15,7 @@ while (@ob_end_flush());
|
||||||
ob_implicit_flush();
|
ob_implicit_flush();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE html>
|
||||||
<html dir="ltr">
|
<html dir="ltr">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||||
|
|
|
@ -15,7 +15,7 @@ $user->session_start();
|
||||||
while (@ob_end_flush());
|
while (@ob_end_flush());
|
||||||
ob_implicit_flush();
|
ob_implicit_flush();
|
||||||
|
|
||||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
?><!DOCTYPE html>
|
||||||
<html dir="ltr">
|
<html dir="ltr">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
|
||||||
|
|
|
@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
||||||
|
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
||||||
$bb_cfg['tp_release_date'] = '23-01-2014';
|
$bb_cfg['tp_release_date'] = '26-01-2014';
|
||||||
$bb_cfg['tp_release_state'] = 'R567';
|
$bb_cfg['tp_release_state'] = 'R568';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
$charset = 'utf8';
|
$charset = 'utf8';
|
||||||
|
@ -537,7 +537,4 @@ $bb_cfg['captcha'] = array(
|
||||||
'img_path' => BB_PATH .'/images/captcha/', # without '/'
|
'img_path' => BB_PATH .'/images/captcha/', # without '/'
|
||||||
);
|
);
|
||||||
|
|
||||||
// SEO
|
|
||||||
$bb_cfg['seo_link_home_page'] = false;
|
|
||||||
|
|
||||||
define('BB_CFG_LOADED', true);
|
define('BB_CFG_LOADED', true);
|
|
@ -419,11 +419,13 @@ function replace_synonyms ($text)
|
||||||
|
|
||||||
function add_search_words ($post_id, $post_message, $topic_title = '', $only_return_words = false)
|
function add_search_words ($post_id, $post_message, $topic_title = '', $only_return_words = false)
|
||||||
{
|
{
|
||||||
|
global $bb_cfg;
|
||||||
|
|
||||||
$text = $topic_title .' '. $post_message;
|
$text = $topic_title .' '. $post_message;
|
||||||
$text = strip_bbcode_uid($text);
|
$text = strip_bbcode_uid($text);
|
||||||
$words = ($text) ? extract_search_words($text) : array();
|
$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);
|
return join("\n", $words);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2024,7 +2024,7 @@ function redirect ($url)
|
||||||
if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
|
if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
|
||||||
{
|
{
|
||||||
header('Refresh: 0; URL='. $redirect_url);
|
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;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2827,16 +2827,3 @@ function profile_url ($data)
|
||||||
|
|
||||||
return $profile;
|
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;
|
|
||||||
}
|
|
|
@ -165,23 +165,11 @@ if ($bb_cfg['reports_enabled'])
|
||||||
else $report_list = '';
|
else $report_list = '';
|
||||||
// Report [END]
|
// 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(
|
$template->assign_vars(array(
|
||||||
|
|
||||||
'SIMPLE_HEADER' => !empty($gen_simple_header),
|
'SIMPLE_HEADER' => !empty($gen_simple_header),
|
||||||
|
|
||||||
'IN_ADMIN' => defined('IN_ADMIN'),
|
'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)),
|
'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'),
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ elseif ($do == 'info')
|
||||||
|
|
||||||
$in_info = true;
|
$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">
|
<html dir="ltr">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
|
|
@ -295,7 +295,7 @@ if (empty($_GET) && empty($_POST))
|
||||||
'THIS_USER_ID' => $userdata['user_id'],
|
'THIS_USER_ID' => $userdata['user_id'],
|
||||||
'THIS_USER_NAME' => addslashes($userdata['username']),
|
'THIS_USER_NAME' => addslashes($userdata['username']),
|
||||||
'SEARCH_ACTION' => "search.php",
|
'SEARCH_ACTION' => "search.php",
|
||||||
'U_SEARCH_USER' => "search.php?mode=searchuser&input_name=$poster_name_key",
|
'U_SEARCH_USER' => "search.php?mode=searchuser&input_name=$poster_name_key",
|
||||||
'ONLOAD_FOCUS_ID' => 'text_match_input',
|
'ONLOAD_FOCUS_ID' => 'text_match_input',
|
||||||
|
|
||||||
'MY_TOPICS_ID' => 'my_topics',
|
'MY_TOPICS_ID' => 'my_topics',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
<!-- IF TPL_ADMIN_FRAMESET -->
|
<!-- 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}">
|
<html dir="{L_CONTENT_DIRECTION}">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset={L_CONTENT_ENCODING}" />
|
<meta http-equiv="Content-Type" content="text/html; charset={L_CONTENT_ENCODING}" />
|
||||||
|
|
|
@ -15,7 +15,7 @@ if (!empty($_POST['message']))
|
||||||
$message .= $_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>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
|
|
@ -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}">
|
<html dir="{L_CONTENT_DIRECTION}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
@ -378,13 +379,13 @@ if (top != self) {
|
||||||
<table width="100%" cellpadding="0" cellspacing="0">
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="nowrap">
|
<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>
|
<a href="{U_INDEX}"><b>{L_HOME}</b></a><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>
|
<a href="{U_TRACKER}"><b>{L_TRACKER}</b></a><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_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>
|
<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>
|
<a href="{U_FAQ}"><b style="color: #993300; cursor: help;">{L_FAQ}</b></a><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>
|
<a href="{U_GROUP_CP}"><b>{L_USERGROUPS}</b></a><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_MEMBERLIST}"><b>{L_MEMBERLIST}</b></a><span style="color:#CDCDCD;">|</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="nowrap" align="right">
|
<td class="nowrap" align="right">
|
||||||
<!-- BEGIN switch_report_list -->
|
<!-- BEGIN switch_report_list -->
|
||||||
|
@ -411,7 +412,7 @@ if (top != self) {
|
||||||
<div id="logo">
|
<div id="logo">
|
||||||
<!--<h1>{SITENAME}</h1>
|
<!--<h1>{SITENAME}</h1>
|
||||||
<h6>{SITE_DESCRIPTION}</h6> -->
|
<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>
|
</div>
|
||||||
<!--/logo-->
|
<!--/logo-->
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue