Öncelikle paketi indirin. Kurulumun sonunda paket içerisindeki dosyaları kullanacağız.
Paketi indirmek için tıklayın
Kodlamaya başlıyoruz;
Forum Anadizininiz/SSI.php yi açın ve şu kodları bulun;
require_once($sourcedir . '/QueryString.php'); require_once($sourcedir . '/Subs.php');sonrasına ekleyin;
require_once($sourcedir . '/Subs-Seo4SMF.php');şu kodu bulun;
'new' => !empty($row['isRead']), 'new_from' => $row['new_from'], 'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />', ); } mysql_free_result($request);sonrasına ekleyin;
$context['recent_topics']=$posts;Forum Anadizininiz/index.php yi açın ve şu kodları bulun;
require_once($sourcedir . '/QueryString.php'); require_once($sourcedir . '/Subs.php');Sonrasına ekleyin;
require_once($sourcedir . '/Subs-Seo4SMF.php');şu kodları bulun;
// Fall through to the board index then... require_once($sourcedir . '/BoardIndex.php');sonrasına ekleyin;
header("HTTP/1.0 404 Not Found");şu kodları bulun; '.xml' => array('News.php', 'ShowXmlFeed'),sonrasına ekleyin; 'seo4smfadmin' => array('Seo4SMFAdmin.php', 'Seo4SMFAdmin'),
'seo4smfadminsave' => array('Seo4SMFAdmin.php', 'Seo4SMFAdminSave'),
'seo4smfadminsavexml' => array('Seo4SMFAdmin.php', 'Seo4SMFAdminSaveXML'),
'seo4smfsitemaps' => array('Seo4SMFSitemaps.php', 'Seo4SMFSitemaps'),Forum Ana dizininiz/Sources/BoardIndex.php yi açın ve şu kodları bulun;$this_last_post = array( 'id' => $row_board['ID_MSG'], 'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470], 'timestamp' => forum_time(true, $row_board['posterTime']), 'subject' => $row_board['short_subject'],bununla değiştirin;
$this_last_post = array( 'id' => $row_board['ID_MSG'], 'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470], 'timestamp' => forum_time(true, $row_board['posterTime']), 'subject' => $row_board['short_subject'], 'long_subject' => $row_board['subject'],Forum Ana dizininiz/Sources/Display.php yi açın ve şu kodları bulun;
// Build the link tree. $context['linktree'][] = array( 'url' => $scripturl . '?topic=' . $topic . '.0', 'name' => $topicinfo['subject'], 'extra_before' => $settings['linktree_inline'] ? $txt[118] . ': ' : '' ); // Build a list of this board's moderators. $context['moderators'] = &$board_info['moderators']; $context['link_moderators'] = array();bununla değiştirin;
// Build the link tree.
$context['linktree'][] = array(
'url' => $scripturl . '?topic=' . $topic . '.0',
'name' => $topicinfo['subject'],
'id' => 't'.$topic,
'extra_before' => $settings['linktree_inline'] ? $txt[118] . ': ' : ''
);
// Build a list of this board's moderators.
$context['moderators'] = &$board_info['moderators'];
$context['board_description'] =$board_info['description'];
$context['board_name'] =$board_info['name'];
$context['link_moderators'] = array();Şu kodları bulun;if (empty($options['view_newest_first'])) $counter++; else $counter--;öncesine ekleyin;
if (!isset($context['first_message_body'])) $context['first_message_body']=$message['body'];
if ($context['first_message']==$message['ID_MSG'])
{
$context['seo4smf_usernames']=array();
array_push($context['seo4smf_usernames'],$memberContext[$message['ID_MEMBER']]);
}
else
{
array_push($context['seo4smf_usernames'],$memberContext[$message['ID_MEMBER']]);
}Forum Ana dizininiz/Sources/Load.php yi açın ve şu kodları bulun;array_reverse($board_info['parent_boards']), array(array( 'url' => $scripturl . '?board=' . $board . '.0', 'name' => $board_info['name'] ))bununla değiştirin;
array_reverse($board_info['parent_boards']),
array(array(
'url' => $scripturl . '?board=' . $board . '.0',
'name' => $board_info['name'],
'id' => $board_info['id']
))bunu bulun; while ($row = mysql_fetch_assoc($result))
{
if (!isset($boards[$row['ID_BOARD']]))
{
$id_parent = $row['ID_PARENT'];
$boards[$row['ID_BOARD']] = array(
'url' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'name' => $row['name'],ve bununla değiştirin; while ($row = mysql_fetch_assoc($result))
{
if (!isset($boards[$row['ID_BOARD']]))
{
$id_parent = $row['ID_PARENT'];
$boards[$row['ID_BOARD']] = array(
'url' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'name' => $row['name'],
'id' => $row['ID_BOARD'],Forum Ana dizininiz/Sources/MessageIndex.php yi açın ve şu kodları bulun;$context['boards'][$row['ID_PARENT']]['last_post'] = array( 'id' => $row['ID_MSG'], 'time' => $row['posterTime'] > 0 ? timeformat($row['posterTime']) : $txt[470], 'timestamp' => forum_time(true, $row['posterTime']), 'subject' => $short_subject,bununla değiştirin;
$context['boards'][$row['ID_PARENT']]['last_post'] = array( 'id' => $row['ID_MSG'], 'time' => $row['posterTime'] > 0 ? timeformat($row['posterTime']) : $txt[470], 'timestamp' => forum_time(true, $row['posterTime']), 'subject' => $short_subject, 'long_subject' => $row['subject'],şu kodları bulun;
$context['boards'][$row_board['ID_BOARD']] = array( 'id' => $row_board['ID_BOARD'], 'last_post' => array( 'id' => $row_board['ID_MSG'], 'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470], 'timestamp' => forum_time(true, $row_board['posterTime']), 'subject' => $short_subject,ve bununla değiştirin;
$context['boards'][$row_board['ID_BOARD']] = array( 'id' => $row_board['ID_BOARD'], 'last_post' => array( 'id' => $row_board['ID_MSG'], 'time' => $row_board['posterTime'] > 0 ? timeformat($row_board['posterTime']) : $txt[470], 'timestamp' => forum_time(true, $row_board['posterTime']), 'subject' => $short_subject, 'long_subject' => $row_board['subject'],Az kaldı, sabredin
Forum Ana dizininiz/Sources/QueryString.php yi açın ve şu kodları bulun;
if (empty($_COOKIE) && SID != '' && empty($context['browser']['possibly_robot']) && @version_compare(PHP_VERSION, '4.3.0') != -1)bununla değiştirin;
if (empty($_COOKIE) && SID != '' && empty($context['browser']['possibly_robot']) && @version_compare(PHP_VERSION, '4.3.0') != -1 && ($modSettings['seo4smf_enable']!="on"))bunu bulun;
// If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.
if ($scripturl == '' || !defined('SID'))
return $buffer;sonrasına ekleyin; $scripturl1=str_replace("/index.php","",$scripturl);bunu bulun; else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);bununla değiştirin; if ($modSettings['seo4smf_sb_enable'] == "on")
{
$buffer = preg_replace('/<!-- Seo4SMF Social Bookmark -->/', create_sb() , $buffer);
}
if ($modSettings['seo4smf_enable'] == "on")
{
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic|page)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl1 . '/' . beautify_urls(strtr('\$1', '&;=', '//,')) . '\$2\"'", $buffer);
if ($modSettings['seo4smf_beautify_profiles'] == "on")
{
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=profile;u=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . beautify_url_profiles(strtr('\$1', '&;=', '//,')) . '\$2\"'", $buffer);
}
if ($modSettings['seo4smf_beautify_actions'] == "on")
{
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . beautify_url_action('\$1'). '\$2\"'", $buffer);
}
if ($modSettings['seo4smf_keywords'] == "on")
{
$buffer = preg_replace('<meta name="keywords" content=(.*) />', create_keywords() , $buffer);
}
if ($modSettings['seo4smf_description'] == "on")
{
$buffer = preg_replace('<meta name="description" content=(.*) />', create_description() , $buffer);
}
$buffer = preg_replace('/<a href=\"http:\/\/www.simplemachines.org\/about\/copyright.php\" title=\"Free Forum Software\" target=\"_blank\">SMF © 2006-2007, Simple Machines LLC<\/a>/', '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF © 2006-2007, Simple Machines LLC</a><br /> <a href="http://www.webmasterstalks.com" target="blank_">Seo4Smf v0.2 © Webmaster\'s Talks</a>' , $buffer);
$buffer = preg_replace('/<a href=\"http:\/\/www.simplemachines.org\/about\/copyright.php\" title=\"Free Forum Software\" target=\"_blank\">SMF © 2006, Simple Machines LLC<\/a>/', '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF © 2006, Simple Machines LLC</a><br /> <a href="http://www.webmasterstalks.com" target="blank_">Seo4Smf v0.2 © Webmaster\'s Talks</a>' , $buffer);
$buffer = preg_replace('/<a href=\"http:\/\/www.simplemachines.org\/about\/copyright.php\" title=\"Free Forum Software\" target=\"_blank\">SMF © 2001-2006, Lewis Media<\/a>/', '<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF © 2001-2006, Simple Machines, Lewis Media</a><br /> <a href="http://www.webmasterstalks.com" target="blank_">Seo4Smf v0.2 © Webmaster\'s Talks</a>' , $buffer);
}
else
{
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);
}Forum Ana dizininiz/Sources/Search.php yi açın ve şu kodları bulun;$output['matches'][] = array( 'id' => $message['ID_MSG'], 'attachment' => loadAttachmentContext($message['ID_MSG']), 'alternate' => $counter % 2, 'member' => &$memberContext[$message['ID_MEMBER']], 'icon' => $message['icon'], 'icon_url' => $settings[$context['icon_sources'][$message['icon']]] . '/post/' . $message['icon'] . '.gif', 'subject' => $message['subject'], 'subject_highlighted' => $subject_highlighted, 'time' => timeformat($message['posterTime']), 'timestamp' => forum_time(true, $message['posterTime']), 'counter' => $counter, 'modified' => array( 'time' => timeformat($message['modifiedTime']), 'timestamp' => forum_time(true, $message['modifiedTime']), 'name' => $message['modifiedName'] ), 'body' => $message['body'], 'body_highlighted' => $body_highlighted, 'start' => 'msg' . $message['ID_MSG'] );Sonrasına ekleyin;
$context['search_results'][]=array('id'=>$message['ID_TOPIC'],'subject'=>$message['subject'],'board_id'=>$message['ID_BOARD'],'board_name'=>$message['bName'],'member_name'=>$memberContext[$message['ID_MEMBER']]['username'],'member_id'=>$message['ID_MEMBER'],'last_member_name'=>$message['last_member_name'],'last_member_id'=>$message['last_member_id']);Forum Ana dizininiz/Sources/Subs.php yi açın ve şu kodları bulun;'manage_themes' => '<a href="' . $scripturl . '?action=theme;sa=admin;sesc=' . $sc . '">' . $txt['theme_admin'] . '</a>',Sonrasına ekleyin;
'seo4smfadmin' => '<a href="' . $scripturl . '?action=seo4smfadmin;sesc=' . $sc . '">Seo4SMF Admin</a>',Forum Ana Dizininiz/Themes/temanız/Display.template.php yi açın ve şu kodları bulun;
Not: Anlatım default içindir.
// Show the member's signature? if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))Öncesine ekleyin;
if ($context['first_message']==$message['id'])
{
echo '<!-- Seo4SMF Social Bookmark -->';
}Forum Ana Dizininiz/Themes/temanız/Index.template.php yi açın ve şu kodları bulun;Not: Anlatım default içindir.
<title>', $context['page_title'], '</title>';Şu kodlar ile değiştirin;
<title>', create_title(), '</title>';Forum Ana Dizininiz/Themes/temanız/BoardIndex.template.php yi açın ve şu kodları bulun;
Not: Anlatım default içindir.
// "Users online" - in order of activity.öncesine ekleyin;
if ($modSettings['seo4smf_sitemaps_box']=="on")
{
if ($modSettings['seo4smf_sitemaps_links']!=0)
$how_many_links_per_page=$modSettings['seo4smf_sitemaps_links'];
else
$how_many_links_per_page=100;
echo '
<tr>
<td class="titlebg" colspan="2"> Sitemaps </td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="Sitemaps" border="0" />
</td>
<td class="windowbg2" width="100%">
<div class="smalltext">';
echo'<a href="sitemaps-home.html">Start</a> ';
for($i=0; $i<$modSettings['totalTopics']/$how_many_links_per_page; $i++)
{
echo'<a href="sitemaps-',$i,'.html">Page', $i ,'</a> ';
if (!($i%13) && ($i!=0)) echo "<br />";
}
echo'<br />';
echo '
</div>
</td>
</tr>';
}Forum Ana Dizininiz/Sources/News.php yi açın ve şu kodları bulun; if (empty($modSettings['queryless_urls']) || ($context['server']['is_cgi'] && @ini_get('cgi.fix_pathinfo') == 0) || !$context['server']['is_apache'])
return $val;sonrasına ekleyin; if ($modSettings['seo4smf_enable']=="on")
{
$scripturl1=str_replace("/index.php","",$scripturl);
$val = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic|page)=[^#"]+)(#[^"]*)?$/e', "'' . \$scripturl1 . '/' . beautify_urls(strtr('\$1', '&;=', '//,')) . '\$2'", $val);
if ($modSettings['seo4smf_beautify_profiles']=="on")
{
$val = preg_replace('/^' . preg_quote($scripturl, '/') . '\?action=profile;u=([^#"]+?)?$/e', "'' . \$scripturl1 . '/' . beautify_url_profiles(strtr('\$1', '&;=', '//,')) . '\$2'", $val);
}
}
elseForum Ana Dizininiz/Sources/Subs-post.php yi açın ve şu kodları bulun;$hotmail_fix = false; // No other addresses left? Return instantly. if (empty($to_array)) return $mail_result; }sonrasına ekleyin;
if ($modSettings['seo4smf_enable']=="on")
{
$scripturl1=str_replace("/index.php","",$scripturl);
$message = preg_replace('/' . preg_quote($scripturl, '/') . '\?((?:board|topic|page)=[^#"]+?)(#[^"]*?)?\n/e', "'' . \$scripturl1 . '/' . beautify_urls(strtr('\$1', '&;=', '//,')) . '\$2'", $message);
if ($modSettings['seo4smf_beautify_profiles']=="on")
{
$message = preg_replace('/"' . preg_quote($scripturl, '/') . '\?action=profile;u=([^#"]+?)?"/e', "'\"' . \$scripturl1 . '/' . beautify_url_profiles(strtr('\$1', '&;=', '//,')) . '\$2\"'", $message);
}
}seo4smf_icons, htaccess.txt , seo4smf-copyright.txt, seo4smf-redirect.php, seo4smf-readme.txt, sitemaps.php, urllist.php, ror.php dosyalarını forum ana dizinine atın. Not: Tüm ayarlarınızı yaptıktan sonra htaccess.txt dosyasının ismini .htaccess olarak değiştirin. seo4smf-redirect.php dosyasının chmod ayarını(yazma izni) da 644 yapın.
Seo4SMFAdmin.php, Seo4SMFSitemaps.php, Subs-Seo4SMF.php dosyalarını Sources klasörüne atın.
Seo4SMFAdmin.template.php ve Seo4SMFSitemaps.template.php dosyalarını da default temanın içine attınız mı tamamdır. Son olarak şu kodları phpmyadmin den sorgu olarak çalıştırın;
INSERT INTO `smf_settings` VALUES('seo4smf_sitemaps_links', '100');
INSERT INTO `smf_settings` VALUES('seo4smf_sitemaps_box', 'on');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_postgroups', '1');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_yahoo_enable', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_google_enable', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_technorati_enable', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_delicious_enable', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_furl_enable', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_enable', '');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_digg_enable', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_sb_slashdot_enable', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_keywords_content_boards', '1');
INSERT INTO `smf_settings` VALUES('seo4smf_keywords_content_topics', '1');
INSERT INTO `smf_settings` VALUES('seo4smf_description_content_boards', '1');
INSERT INTO `smf_settings` VALUES('seo4smf_description_content_topics', '1');
INSERT INTO `smf_settings` VALUES('seo4smf_description_content_index', '');
INSERT INTO `smf_settings` VALUES('seo4smf_description_length', '175');
INSERT INTO `smf_settings` VALUES('seo4smf_description', 'on');
INSERT INTO `smf_settings` VALUES('seo4smf_keywords', 'on');
INSERT INTO `smf_settings` VALUES('seo4smf_sql_enable', 'on');
INSERT INTO `smf_settings` VALUES('seo4smf_split_char', '-');
INSERT INTO `smf_settings` VALUES('seo4smf_accented_enable', 'on');
INSERT INTO `smf_settings` VALUES('seo4smf_board_topic', 'off');
INSERT INTO `smf_settings` VALUES('seo4smf_beautify_actions', '');
INSERT INTO `smf_settings` VALUES('seo4smf_beautify_profiles', 'on');
INSERT INTO `smf_settings` VALUES('seo4smf_enable', 'on');
INSERT INTO `smf_settings` VALUES('seo4smf_utf8_language', '');SQL sorgusunu da çalıştırdınız mı tamamdır. Başarılı bir şekilde seo4smf modunu kurdunuz. Tebrikler
Seo konusunda sorularınızı buradan alalım. Elimden geldiğince cevaplayacağım..
