===================================================== |
Вывод заголовка страницы |
===================================================== |
*/ |
$titl_e = ''; |
$nam_e = ''; |
$rss_url = ''; |
|
if ($do == "cat" and $category != '' and $subaction == '') { |
|
$metatags['description'] = ($cat_info[$category_id]['descr'] != '') ? $cat_info[$category_id]['descr'] : $metatags['description']; |
$metatags['keywords'] = ($cat_info[$category_id]['keywords'] != '') ? $cat_info[$category_id]['keywords'] : $metatags['keywords']; |
|
if ($cat_info[$category_id]['metatitle'] != '') $metatags['header_title'] = $cat_info[$category_id]['metatitle']; |
else $nam_e = stripslashes ( $cat_info[$category_id]['name'] ); |
|
if ($config['allow_alt_url'] == "yes") { |
$rss_url = $url_page . "/" . "rss.xml"; |
} else { |
$rss_url = $config['http_home_url'] . "engine/rss.php?do=cat&category=" . $cat_info[$category_id]['alt_name']; |
} |
|
} elseif ($subaction == 'userinfo') { |
$nam_e = $user; |
|
if ($config['allow_alt_url'] == "yes") { |
$rss_url = $url_page . "/" . "rss.xml"; |
} else { |
$rss_url = $config['http_home_url'] . "engine/rss.php?subaction=allnews&user=" . urlencode ( $user ); |
} |
|
} elseif ($subaction == 'allnews') { |
$nam_e = $lang['show_user_news'] . ' ' . $user; |
|
if ($config['allow_alt_url'] == "yes") { |
$rss_url = $config['http_home_url'] . "user/" . urlencode ( $user ) . "/" . "rss.xml"; |
} else { |
$rss_url = $config['http_home_url'] . "engine/rss.php?subaction=allnews&user=" . urlencode ( $user ); |
} |
|
} elseif ($subaction == 'newposts') $nam_e = $lang['title_new']; |
elseif ($do == 'stats') $nam_e = $lang['title_stats']; |
elseif ($do == 'addnews') $nam_e = $lang['title_addnews']; |
elseif ($do == 'register') $nam_e = $lang['title_register']; |
elseif ($do == 'favorites') $nam_e = $lang['title_fav']; |
elseif ($do == 'pm') $nam_e = $lang['title_pm']; |
elseif ($do == 'feedback') $nam_e = $lang['title_feed']; |
elseif ($do == 'lastcomments') $nam_e = $lang['title_last']; |
elseif ($do == 'lostpassword') $nam_e = $lang['title_lost']; |
elseif ($do == 'search') $nam_e = $lang['title_search']; |
elseif ($do == 'static') $titl_e = $static_descr; |
elseif ($do == 'lastnews') $nam_e = $lang['last_news']; |
elseif ($do == 'alltags') $nam_e = $lang['tag_cloud']; |
elseif ($do == 'tags') $nam_e = $tag; |
elseif ($catalog != "") $nam_e = $lang['title_catalog'] . ' » ' . $catalog; |
else { |
|
if ($year != '' and $month == '' and $day == '') $nam_e = $lang['title_date'] . ' ' . $year . ' ' . $lang['title_year']; |
if ($year != '' and $month != '' and $day == '') $nam_e = $lang['title_date'] . ' ' . $r[$month - 1] . ' ' . $year . ' ' . $lang['title_year1']; |
if ($year != '' and $month != '' and $day != '' and $subaction == '') $nam_e = $lang['title_date'] . ' ' . $day . '.' . $month . '.' . $year; |
if (($subaction != '' or $newsid != '') and $news_found) $titl_e = $metatags['title']; |
|
} |
|
if ($nam_e) { |
$metatags['title'] = $nam_e . ' » ' . $metatags['title']; |
$rss_title = $metatags['title']; |
} |
|
|
|
if ($titl_e) { |
$metatags['title'] = $titl_e . ''/* . $config['home_title']*/; |
} |
|
|
/*if ($titl_e) $metatags['title']; = $titl_e . ' »»» ' . $config['home_title']; УБИРПАЕМ ЛИШНИЙ ТАЙТЛ В ПОЛНОЙ НОВОСТИ */ |
|
if ( $metatags['header_title'] ) $metatags['title'] = stripslashes($metatags['header_title']); |
|
if (! $rss_url) { |
|
if ($config['allow_alt_url'] == "yes") { |
$rss_url = $config['http_home_url'] . "rss.xml"; |
} else { |
$rss_url = $config['http_home_url'] . "engine/rss.php"; |
} |
|
$rss_title = $config['home_title']; |
} |
|
if(!empty($newsid)) $title_dop = "ла ла ла лалал"; |
$metatags = <<<HTML |
<meta http-equiv="Content-Type" content="text/html; charset={$config['charset']}" /> |
<title>{$metatags['title']}{$title_dop}</title> |
<meta name="description" content="{$metatags['description']}" /> |
<meta name="keywords" content="{$metatags['keywords']}" /> |
<meta name="generator" content="ла ла ла лалал" /> |
<meta name="robots" content="all" /> |
<meta name="revisit-after" content="1 days" /> |
<link rel="search" type="application/opensearchdescription+xml" href="{$config['http_home_url']}engine/opensearch.php" title="{$config['home_title']}" /> |
HTML; |
|
if ($config['allow_rss']) $metatags .= <<<HTML |
|
<link rel="alternate" type="application/rss+xml" title="{$rss_title}" href="{$rss_url}" /> |
HTML; |