mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
r593
Добавлена карта сайта. Необходимо протестировать работоспособность и локализовать.
This commit is contained in:
parent
375f9c2dd2
commit
f0317fa7c2
9 changed files with 502 additions and 1 deletions
|
@ -557,8 +557,10 @@ INSERT INTO `bb_config` VALUES ('seed_bonus_points', '');
|
|||
INSERT INTO `bb_config` VALUES ('seed_bonus_tor_size', '0');
|
||||
INSERT INTO `bb_config` VALUES ('seed_bonus_user_regdate', '0');
|
||||
INSERT INTO `bb_config` VALUES ('site_desc', 'A little text to describe your forum');
|
||||
INSERT INTO `bb_config` VALUES ('sitemap_time', '');
|
||||
INSERT INTO `bb_config` VALUES ('sitename', 'TorrentPier II - Torrent Tracker');
|
||||
INSERT INTO `bb_config` VALUES ('smilies_path', 'images/smiles');
|
||||
INSERT INTO `bb_config` VALUES ('static_sitemap', '');
|
||||
INSERT INTO `bb_config` VALUES ('topics_per_page', '50');
|
||||
INSERT INTO `bb_config` VALUES ('xs_use_cache', '1');
|
||||
INSERT INTO `bb_config` VALUES ('active_ads', '');
|
||||
|
@ -642,6 +644,7 @@ INSERT INTO `bb_cron` VALUES (18, 1, 'Seeder last seen', 'tr_update_seeder_last_
|
|||
INSERT INTO `bb_cron` VALUES (19, 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (20, 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0);
|
||||
INSERT INTO `bb_cron` VALUES (22, 1, 'Sitemap update', 'sitemap.php', 'daily', NULL, '06:00:00', 30, '', '', NULL, 0, '', 0, 0, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
Заходим в phpmyadmin, открываем или создаем новую базу, потом импортируем дамп (install/sql/mysql.sql)
|
||||
Правим файл конфигурации config.php (изменяем данные входа в БД, остальное по усмотрению)
|
||||
|
||||
* Файлы favicon.ico (меняем на свою иконку, если есть), robots.txt(допуск или запрет ботам поисковиков к серверу, блокирует не все, меняем адреса в строках Host: и Sitemap: на свои адреса)
|
||||
* favicon.ico (меняем на свою иконку, если есть)
|
||||
* robots.txt (меняем адреса в строках Host: и Sitemap: на свои)
|
||||
|
||||
************************************
|
||||
** Права доступа на папки и файлы **
|
||||
|
@ -24,6 +25,7 @@
|
|||
- images/ranks
|
||||
- images/smiles
|
||||
- log
|
||||
- sitemap
|
||||
- triggers
|
||||
|
||||
************************************
|
||||
|
|
52
upload/admin/admin_sitemap.php
Normal file
52
upload/admin/admin_sitemap.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
if (!empty($setmodules))
|
||||
{
|
||||
$module['Mods']['Sitemap'] = basename(__FILE__);
|
||||
return;
|
||||
}
|
||||
require('./pagestart.php');
|
||||
|
||||
require(INC_DIR .'functions_selects.php');
|
||||
|
||||
$sql = "SELECT * FROM " . BB_CONFIG;
|
||||
|
||||
if (!$result = DB()->sql_query($sql))
|
||||
{
|
||||
bb_die('Could not query config information in admin_sitemap');
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_params = array();
|
||||
|
||||
while ($row = DB()->sql_fetchrow($result))
|
||||
{
|
||||
$config_name = $row['config_name'];
|
||||
$config_value = $row['config_value'];
|
||||
$default_config[$config_name] = $config_value;
|
||||
$new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
|
||||
|
||||
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name])
|
||||
{
|
||||
$new_params[$config_name] = $new[$config_name];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
if (!empty($new_params))
|
||||
{
|
||||
bb_update_config($new_params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$s_mess = 'Файл индекса создан <b>'.bb_date($new['sitemap_time'], $bb_cfg['post_date_format']).'</b> доступен по адресу: <a href="'.make_url('/sitemap/sitemap.xml').'" target="_blank">'.make_url('/sitemap/sitemap.xml').'</a>';
|
||||
$message = (@file_exists(BB_ROOT. "/sitemap/sitemap.xml")) ? $s_mess : 'Файл индекса не создан';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'STATIC_SITEMAP' => $new['static_sitemap'],
|
||||
'MESSAGE' => $message,
|
||||
));
|
||||
|
||||
print_page('admin_sitemap.tpl', 'admin');
|
|
@ -55,6 +55,10 @@ switch ($ajax->action)
|
|||
case 'group_membership':
|
||||
require(INC_DIR . 'functions_group.php');
|
||||
break;
|
||||
|
||||
case 'sitemap';
|
||||
require(INC_DIR .'class.sitemap.php');
|
||||
break;
|
||||
}
|
||||
|
||||
// position in $ajax->valid_actions['xxx']
|
||||
|
@ -78,6 +82,7 @@ class ajax_common
|
|||
'change_user_opt' => array('admin'),
|
||||
'manage_user' => array('admin'),
|
||||
'manage_admin' => array('admin'),
|
||||
'sitemap' => array('admin'),
|
||||
|
||||
'mod_action' => array('mod'),
|
||||
'topic_tpl' => array('mod'),
|
||||
|
@ -406,4 +411,9 @@ class ajax_common
|
|||
{
|
||||
require(AJAX_DIR . 'chat.php');
|
||||
}
|
||||
|
||||
function sitemap()
|
||||
{
|
||||
require(AJAX_DIR .'sitemap.php');
|
||||
}
|
||||
}
|
64
upload/ajax/sitemap.php
Normal file
64
upload/ajax/sitemap.php
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||
|
||||
global $bb_cfg;
|
||||
|
||||
$mode = (string) $this->request['mode'];
|
||||
$map = new sitemap();
|
||||
$html = '';
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'create':
|
||||
$map->create();
|
||||
if (@file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
|
||||
{
|
||||
$html .= 'Файл индекса создан <b>'.bb_date(TIMENOW, $bb_cfg['post_date_format']).'</b> доступен по адресу: <a href="'.make_url('/sitemap/sitemap.xml').'" target="_blank">'.make_url('/sitemap/sitemap.xml').'</a>';
|
||||
} else {
|
||||
$html .= 'Файл индекса не создан';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'search_update':
|
||||
if (!@file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
|
||||
{
|
||||
$map->create();
|
||||
}
|
||||
|
||||
$map_link = make_url('/sitemap/sitemap.xml');
|
||||
|
||||
if (strpos($map->send_url("http://google.com/webmasters/sitemaps/ping?sitemap=", $map_link), "successfully added") !== false) {
|
||||
$html .= '<br />Уведомление поисковой системы Google: <font style="color: green;">отправка завершена</font>';
|
||||
} else {
|
||||
$html .= '<br />Уведомление поисковой системы Google: <font style="color: red;">ошибка отправки</font> URL: <a href="http://google.com/webmasters/sitemaps/ping?sitemap='.urlencode($map_link).'" target="_blank">http://google.com/webmasters/sitemaps/ping?sitemap='.$map_link.'</a>';
|
||||
}
|
||||
|
||||
if (strpos($map->send_url("http://ping.blogs.yandex.ru/ping?sitemap=", $map_link), "OK") !== false) {
|
||||
$html .= '<br />Уведомление поисковой системы Yandex: <font style="color: green;">отправка завершена</font>';
|
||||
} else {
|
||||
$html .= '<br />Уведомление поисковой системы Yandex: <font style="color: red;">ошибка отправки</font> URL: <a href="http://ping.blogs.yandex.ru/ping?sitemap='.urlencode($map_link).'" target="_blank">http://ping.blogs.yandex.ru/ping?sitemap='.$map_link.'</a>';
|
||||
}
|
||||
|
||||
if ($map->send_url("http://www.bing.com/webmaster/ping.aspx?siteMap=", $map_link)) {
|
||||
$html .= '<br />Уведомление поисковой системы Bing: <font style="color: green;">отправка завершена</font>';
|
||||
} else {
|
||||
$html .= '<br />Уведомление поисковой системы Bing: <font style="color: red;">ошибка отправки</font>';
|
||||
}
|
||||
|
||||
if (strpos ($map->send_url("http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url=", $map_link), "Thanks for the ping") !== false) {
|
||||
$html .= '<br />Уведомление поисковой системы Weblogs: <font style="color: green;">отправка завершена</font>';
|
||||
} else {
|
||||
$html .= '<br />Уведомление поисковой системы Weblogs: <font style="color: red;">ошибка отправки</font> URL: <a href="http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url='.urlencode($map_link).'" target="_blank">http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url='.$map_link.'</a>';
|
||||
}
|
||||
|
||||
if ($map->send_url("http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=", $map_link)) {
|
||||
$html .= '<br />Уведомление поисковой системы Yahoo: <font style="color: green;">отправка завершена</font>';
|
||||
} else {
|
||||
$html .= '<br />Уведомление поисковой системы Yahoo: <font style="color: red;">ошибка отправки</font> URL: <a href="http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap='.urlencode($map_link).'" target="_blank">http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url='.$map_link.'</a>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$this->response['html'] = $html;
|
||||
$this->response['mode'] = $mode;
|
229
upload/includes/class.sitemap.php
Normal file
229
upload/includes/class.sitemap.php
Normal file
|
@ -0,0 +1,229 @@
|
|||
<?php
|
||||
|
||||
class sitemap
|
||||
{
|
||||
var $home = "";
|
||||
var $limit = 0;
|
||||
var $topic_priority = "0.5";
|
||||
var $stat_priority = "0.5";
|
||||
var $priority = "0.6";
|
||||
var $cat_priority = "0.7";
|
||||
|
||||
function sitemap () {
|
||||
global $bb_cfg;
|
||||
$this->home = 'http://'.$bb_cfg['server_name'].'/';
|
||||
}
|
||||
|
||||
function build_map () {
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$map .= $this->get_static();
|
||||
$map .= $this->get_forum();
|
||||
$map .= $this->get_topic();
|
||||
$map .= "</urlset>";
|
||||
|
||||
return $map;
|
||||
}
|
||||
|
||||
function build_index ($count) {
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$lastmod = date("Y-m-d");
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap1.xml</loc>\n<lastmod>{$lastmod}</lastmod>\n</sitemap>\n";
|
||||
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$t = $i + 2;
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap{$t}.xml</loc>\n<lastmod>{$lastmod}</lastmod>\n</sitemap>\n";
|
||||
}
|
||||
|
||||
$map .= "</sitemapindex>";
|
||||
|
||||
return $map;
|
||||
}
|
||||
|
||||
function build_stat () {
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$map .= $this->get_static();
|
||||
$map .= $this->get_forum();
|
||||
$map .= "</urlset>";
|
||||
|
||||
return $map;
|
||||
}
|
||||
|
||||
function build_map_topic ($n) {
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
|
||||
$map .= $this->get_topic($n);
|
||||
$map .= "</urlset>";
|
||||
|
||||
return $map;
|
||||
}
|
||||
|
||||
function get_forum () {
|
||||
global $datastore;
|
||||
|
||||
$this->priority = $this->cat_priority;
|
||||
$xml = "";
|
||||
$lastmod = date( "Y-m-d" );
|
||||
|
||||
if (!$forums = $datastore->get('cat_forums'))
|
||||
{
|
||||
$datastore->update('cat_forums');
|
||||
$forums = $datastore->get('cat_forums');
|
||||
}
|
||||
$not_forums_id = $forums['not_auth_forums']['guest_view'];
|
||||
|
||||
$ignore_forum_sql = ($not_forums_id) ? "WHERE forum_id NOT IN($not_forums_id)" : '';
|
||||
|
||||
$sql = DB()->sql_query("SELECT forum_id, forum_topics, forum_parent, forum_name FROM ".BB_FORUMS." ".$ignore_forum_sql." ORDER BY forum_id ASC");
|
||||
|
||||
while ($row = DB()->sql_fetchrow($sql)) {
|
||||
if (function_exists('seo_url')) $loc = $this->home . seo_url(FORUM_URL . $row['forum_id'], $row['forum_name']);
|
||||
else $loc = $this->home . FORUM_URL. $row['forum_id'];
|
||||
$xml .= $this->get_xml( $loc, $lastmod );
|
||||
}
|
||||
|
||||
return $xml;
|
||||
}
|
||||
|
||||
function get_topic ($page = false) {
|
||||
global $datastore;
|
||||
|
||||
$xml = "";
|
||||
$this->priority = $this->topic_priority;
|
||||
|
||||
if ($page) {
|
||||
$page = $page - 1;
|
||||
$page = $page * 40000;
|
||||
$this->limit = " LIMIT {$page},40000";
|
||||
} else {
|
||||
if ($this->limit < 1) $this->limit = false;
|
||||
if( $this->limit ) {
|
||||
$this->limit = " LIMIT 0," . $this->limit;
|
||||
} else {
|
||||
$this->limit = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$forums = $datastore->get('cat_forums')) {
|
||||
$datastore->update('cat_forums');
|
||||
$forums = $datastore->get('cat_forums');
|
||||
}
|
||||
|
||||
$not_forums_id = $forums['not_auth_forums']['guest_view'];
|
||||
$ignore_forum_sql = ($not_forums_id) ? "WHERE forum_id NOT IN($not_forums_id)" : '';
|
||||
|
||||
$sql = DB()->sql_query("SELECT topic_id, topic_title, topic_time FROM " . BB_TOPICS . " ".$ignore_forum_sql." ORDER BY topic_time DESC" . $this->limit);
|
||||
|
||||
while ($row = DB()->sql_fetchrow($sql)) {
|
||||
if (function_exists('seo_url')) $loc = $this->home . seo_url(TOPIC_URL . $row['topic_id'], $row['topic_title']);
|
||||
else $loc = $this->home . TOPIC_URL. $row['topic_id'];
|
||||
$xml .= $this->get_xml($loc, date("Y-m-d", $row['topic_time']));
|
||||
}
|
||||
|
||||
return $xml;
|
||||
}
|
||||
|
||||
function get_static () {
|
||||
global $bb_cfg;
|
||||
|
||||
$xml = "";
|
||||
$lastmod = date("Y-m-d");
|
||||
$this->priority = $this->stat_priority;
|
||||
|
||||
if (isset($bb_cfg['static_sitemap'])) {
|
||||
$static_url = preg_replace("/\s/", '', $bb_cfg['static_sitemap']); //вырезаем переносы строк
|
||||
preg_match_all ('#(https?://[\w-]+[\.\w-]+/((?!https?://)[\w- ./?%&=])+)#', $static_url, $out);
|
||||
|
||||
$static_url = count($out['0']);
|
||||
if ($static_url > 0)
|
||||
{
|
||||
foreach($out['0'] as $url)
|
||||
{
|
||||
$loc = $url;
|
||||
$xml .= $this->get_xml($loc, $lastmod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $xml;
|
||||
}
|
||||
|
||||
function get_xml ($loc, $lastmod) {
|
||||
$xml = "\t<url>\n";
|
||||
|
||||
$xml .= "\t\t<loc>$loc</loc>\n";
|
||||
$xml .= "\t\t<lastmod>$lastmod</lastmod>\n";
|
||||
$xml .= "\t\t<priority>" . $this->priority . "</priority>\n";
|
||||
$xml .= "\t</url>\n";
|
||||
|
||||
return $xml;
|
||||
}
|
||||
|
||||
function send_url ($url, $map) {
|
||||
$data = false;
|
||||
$file = $url.urlencode($map);
|
||||
|
||||
if (function_exists('curl_init')) {
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, $file);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
|
||||
$data = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
return $data;
|
||||
} else {
|
||||
return @file_get_contents($file);
|
||||
}
|
||||
}
|
||||
|
||||
function create () {
|
||||
$row = DB()->fetch_row("SELECT COUNT(*) AS count FROM ". BB_TOPICS);
|
||||
|
||||
if (!$this->limit) $this->limit = $row['count'];
|
||||
if ($this->limit > 40000) {
|
||||
$pages_count = @ceil($row['count'] / 40000);
|
||||
|
||||
$sitemap = $this->build_index($pages_count);
|
||||
|
||||
$handler = fopen(BB_ROOT. "/sitemap/sitemap.xml", "wb+");
|
||||
fwrite($handler, $sitemap);
|
||||
fclose($handler);
|
||||
@chmod(BB_ROOT. "/sitemap/sitemap.xml", 0666);
|
||||
|
||||
$sitemap = $this->build_stat();
|
||||
|
||||
$handler = fopen(BB_ROOT. "/sitemap/sitemap1.xml", "wb+");
|
||||
fwrite($handler, $sitemap);
|
||||
fclose($handler);
|
||||
@chmod(BB_ROOT. "/sitemap/sitemap.xml", 0666);
|
||||
|
||||
for ($i = 0; $i < $pages_count; $i++) {
|
||||
$t = $i + 2;
|
||||
$n = $i + 1;
|
||||
|
||||
$sitemap = $this->build_map_topic($n);
|
||||
$handler = fopen(BB_ROOT. "/sitemap/sitemap{$t}.xml", "wb+");
|
||||
fwrite($handler, $sitemap);
|
||||
fclose($handler);
|
||||
@chmod(BB_ROOT. "/sitemap/sitemap{$t}.xml", 0666);
|
||||
}
|
||||
} else {
|
||||
$sitemap = $this->build_map();
|
||||
|
||||
$handler = fopen(BB_ROOT. "/sitemap/sitemap.xml", "wb+");
|
||||
fwrite($handler, $sitemap);
|
||||
fclose($handler);
|
||||
@chmod(BB_ROOT. "/sitemap/sitemap.xml", 0666);
|
||||
}
|
||||
|
||||
$params['sitemap_time'] = TIMENOW;
|
||||
bb_update_config($params);
|
||||
}
|
||||
}
|
19
upload/includes/cron/jobs/sitemap.php
Normal file
19
upload/includes/cron/jobs/sitemap.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
||||
require(INC_DIR .'class.sitemap.php');
|
||||
|
||||
$map = new sitemap();
|
||||
$map->create();
|
||||
|
||||
if (@file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
|
||||
{
|
||||
$map_link = make_url('/sitemap/sitemap.xml');
|
||||
|
||||
$map->send_url("http://google.com/webmasters/sitemaps/ping?sitemap=", $map_link);
|
||||
$map->send_url("http://ping.blogs.yandex.ru/ping?sitemap=", $map_link);
|
||||
$map->send_url("http://www.bing.com/webmaster/ping.aspx?siteMap=", $map_link);
|
||||
$map->send_url("http://rpc.weblogs.com/pingSiteForm?name=InfraBlog&url=", $map_link);
|
||||
$map->send_url("http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=", $map_link);
|
||||
}
|
0
upload/sitemap/.keep
Normal file
0
upload/sitemap/.keep
Normal file
122
upload/templates/admin/admin_sitemap.tpl
Normal file
122
upload/templates/admin/admin_sitemap.tpl
Normal file
|
@ -0,0 +1,122 @@
|
|||
<style>
|
||||
.btn{
|
||||
color: rgb(255, 255, 255);
|
||||
text-decoration: none;
|
||||
padding: 2px 7px;
|
||||
font-size: 12px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.btn-success {
|
||||
background-image: -moz-linear-gradient(top, #62c462, #51a351);
|
||||
background-image: -ms-linear-gradient(top, #62c462, #51a351);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
|
||||
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
|
||||
background-image: -o-linear-gradient(top, #62c462, #51a351);
|
||||
background-image: linear-gradient(top, #62c462, #51a351);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
|
||||
border-color: #51a351 #51a351 #387038;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
|
||||
}
|
||||
.btn-success:active,
|
||||
.btn-success:disabled,
|
||||
.btn-success:focus,
|
||||
.btn-success:hover,
|
||||
.btn-warning:active,
|
||||
.btn-warning:disabled,
|
||||
.btn-warning:focus,
|
||||
.btn-warning:hover {
|
||||
text-decoration: none;
|
||||
color: rgb(255, 255, 255);
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.btn-warning:active,
|
||||
.btn-warning:disabled,
|
||||
.btn-warning:focus,
|
||||
.btn-warning:hover {
|
||||
background-color: #f89406;
|
||||
}
|
||||
.btn-success:active,
|
||||
.btn-success:disabled,
|
||||
.btn-success:focus,
|
||||
.btn-success:hover {
|
||||
background-color: #51a351;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #faa732;
|
||||
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
|
||||
background-image: -ms-linear-gradient(top, #fbb450, #f89406);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
|
||||
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
|
||||
background-image: -o-linear-gradient(top, #fbb450, #f89406);
|
||||
background-image: linear-gradient(top, #fbb450, #f89406);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
|
||||
border-color: #f89406 #f89406 #ad6704;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
|
||||
}
|
||||
.td_pads { padding: 10px 15px !important; }
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
ajax.sitemap = function(mode) {
|
||||
ajax.exec({
|
||||
action : 'sitemap',
|
||||
mode : mode
|
||||
});
|
||||
}
|
||||
ajax.callback.sitemap = function(data) {
|
||||
if(data.mode == 'create') $('#mess_time').html(data.html);
|
||||
else $('#sitemap').html(data.html);
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1>Меню управления Sitemap</h1>
|
||||
|
||||
<form action="admin_sitemap.php" method="post">
|
||||
<table class="forumline">
|
||||
<tr class="row1">
|
||||
<td width="25%"><span class="gen"><b>Информация</b></span></td>
|
||||
<td class="td_pads"><div id="mess_time">{MESSAGE}</div></td>
|
||||
</tr>
|
||||
<tr class="row1">
|
||||
<td width="25%"><span class="gen"><b>Опции</b></span></td>
|
||||
<td class="td_pads">
|
||||
<a href="#" class="btn btn-success" onclick="ajax.sitemap('create'); return false;">Создать / Обновить файл карты сайта</a> <a href="#" class="btn btn-warning" onclick="ajax.sitemap('search_update'); return false;">Уведомить поисковые системы о наличии новой версии карты сайта</a><br />
|
||||
<div id="sitemap"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">Дополнительные страницы для Sitemap</th>
|
||||
</tr>
|
||||
<tr class="row1">
|
||||
<td class="row1">
|
||||
<span class="gen"><b>Дополнительные страницы</b></span><br />
|
||||
<p>Здесь можно написать дополнительные страницы, например <b>http://domain.ru/faq.php</b></p><br />
|
||||
<b><p>Cсылки должны начинаться с http://</p></b>
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="static_sitemap" rows="5" cols="50">{STATIC_SITEMAP}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="catBottom" colspan="2">
|
||||
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />
|
||||
<input type="reset" value="{L_RESET}" class="liteoption" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">Описание</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" colspan="2">
|
||||
<p>1. Необходимо зарегистрироваться в <a href="https://www.google.com/accounts/ServiceLogin?service=sitemaps&passive=true" target="_blank">Google Sitemaps</a> с использованием вашей учетной записи Google.</p><br />
|
||||
<p>2. Перейдите по ссылке "Добавьте вашу карту сайта".</p><br />
|
||||
<p>3. Необходимо зарегистрироваться в <a href="http://webmaster.yandex.ru/sites/" target="_blank">Yandex Webmaster</a> с использованием вашей учетной записи.</p><br />
|
||||
<p>4. Добавить карту сайта в <a href="http://webmaster.yandex.ru/site/map.xml" target="_blank">Yandex Webmaster</a></p><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue