Mod İsmi: Sitemap
Yazar: SlammedDime
Uyumluluk: 1.1.8, 2.0 RC1
Açıklama: Site haritası.
Mod Linki: Linklerin Görülmesine İzin Verilmiyor.
Üye Ol ya da
Giriş YapAdmin panel, Modlar ve Eklentiler bölümünden Sitemap ayarlarını yapabilirsiniz.
sitemap.xml oluşturmak için
.htaccess dosyasına şı kodu ekleyin.
RewriteEngine on
RewriteRule ^sitemap.xml$ /index.php?action=sitemap;xml
forum klasöründeyse şunu ekleyin
RewriteEngine on
RewriteRule ^sitemap.xml$ /forum/index.php?action=sitemap;xml
2.0 İçin Manueli:./index.php bul
'smstats' => array('Stats.php', 'SMStats'),
öncesine ekle
'sitemap' => array('Sitemap.php', 'ShowSiteMap'),
./Sources/Admin.php bul
// Note the comma!! The setting with automatically appear with the first mod to be added.
sonrasına ekle
'sitemap' => array($txt['sitemap']),
./Sources/ManageSettings.php bul
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.
sonrasına ekle
'sitemap' => 'ModifySitemapSettings',
bul
'description' => $txt['modification_settings_desc'],
'tabs' => array(
'general' => array(
),
sonrasına ekle
'sitemap' => array(
),
bul
?>
öncesine ekle
function ModifySitemapSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc, $modSettings;
$config_vars = array(
array('check', 'sitemap_xml'),
array('int', 'sitemap_topic_count'),
'',
array('select', 'sitemap_30day_priority', array('1.0' => '1.0', '0.9' => '0.9', '0.8' => '0.8', '0.7' => '0.7', '0.6' => '0.6', '0.5' => '0.5', '0.4' => '0.4', '0.3' => '0.3', '0.2' => '0.2', '0.1' => '0.1', '0.0' => '0.0')),
array('select', 'sitemap_60day_priority', array('1.0' => '1.0', '0.9' => '0.9', '0.8' => '0.8', '0.7' => '0.7', '0.6' => '0.6', '0.5' => '0.5', '0.4' => '0.4', '0.3' => '0.3', '0.2' => '0.2', '0.1' => '0.1', '0.0' => '0.0')),
array('select', 'sitemap_90day_priority', array('1.0' => '1.0', '0.9' => '0.9', '0.8' => '0.8', '0.7' => '0.7', '0.6' => '0.6', '0.5' => '0.5', '0.4' => '0.4', '0.3' => '0.3', '0.2' => '0.2', '0.1' => '0.1', '0.0' => '0.0')),
array('select', 'sitemap_91day_priority', array('1.0' => '1.0', '0.9' => '0.9', '0.8' => '0.8', '0.7' => '0.7', '0.6' => '0.6', '0.5' => '0.5', '0.4' => '0.4', '0.3' => '0.3', '0.2' => '0.2', '0.1' => '0.1', '0.0' => '0.0')),
);
if ($return_config)
return $config_vars;
$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=sitemap';
$context['settings_title'] = $txt['sitemap'];
// Saving?
if (isset($_GET['save']))
{
checkSession();
$save_vars = $config_vars;
saveDBSettings($save_vars);
redirectexit('action=admin;area=modsettings;sa=sitemap');
}
prepareDBSettingContext($config_vars);
}
./Themes/default/index.template.php bul
<li class="copywrite">', theme_copyright(), '</li>
sonrasına ekle
<li><a href="', $scripturl, '?action=sitemap"><span>', $txt['sitemap'] ,'</span></a></li>
./Themes/default/languages/Help.turkish.php bul
?>
öncesine ekle
// SMF Sitemap Strings
$helptxt['sitemap_xml'] = 'When unchecked, the <em>link</em> to the XML sitemap will only be shown to admins. When checked, anyone can see it.';
$helptxt['sitemap_topic_count'] = 'This is the maximum number of topics that will be displayed in the XML sitemap. Default is 20000. You can set this to 0 to display all topics on your board';
./Themes/default/languages/Modifications.english.php bul
?>
öncesine ekle
// SMF Sitemap Strings
$txt['sitemap'] = 'Sitemap';
$txt['sitemap_boards'] = 'Boards';
$txt['sitemap_xml'] = 'Show Sitemap XML <em>link</em>';
$txt['sitemap_topic_count'] = 'Maximum number of topics to display in XML sitemap<div class="smalltext">0 to show all (<strong class="error">NOT RECOMMENDED ON LARGE BOARDS</strong>)</div>';
$txt['sitemap_board_none'] = 'No boards to display';
$txt['sitemap_topic_none'] = 'No topics to display';
$txt['sitemap_30day_priority'] = 'Priority for topics active in the last 30 days';
$txt['sitemap_60day_priority'] = 'Priority for topics active in the last 60 days';
$txt['sitemap_90day_priority'] = 'Priority for topics active in the last 90 days';
$txt['sitemap_91day_priority'] = 'Priority for topics older than 90 days';
./Themes/default/languages/Who.turkish.php bul
?>
öncesine ekle
$txt['whoall_sitemap'] = '<a href="' . $scripturl . '?action=sitemap">' . $txt['sitemap'] . '</a> a bakıyor.';
Paketteki
Sitemap.php dosyası ./Sources klasörüne
Sitemap.template.php ./Themes/default klasörüne
add_settings.php dosyasını ise anadizine atıp 1 kere çalıştırmalısınız.