mod kurulduğunda hata genelde hata vermez ama benım gıbı kaldırıp kurmaya çalışırsanız işiniz o zaman zor onun için ben zorlandım ama sizleri kolaylık olsun diye manuel kurulumunu anlatmaya karar verdim...Ben bizzat bu kurulumdan yaptım kimse çalışmıyor demesin

evet arkadaşlar başlıyorum
sources/display.php de bu kodu bul
// Load the proper template and/or sub template.öncesine ekle
if (isset($context['pretty']['oldschoolquery']) && $modSettings['pretty_enable_filters'])
{
$url = 'topic=' . $topic . '.' . (isset($_REQUEST['start']) ? $_REQUEST['start'] : '0') . (isset($_REQUEST['prev_next']) ? ';prev_next=' . $_REQUEST['prev_next'] : '') . (isset($_REQUEST['topicseen']) ? ';topicseen' : '') . (isset($_REQUEST['all']) ? ';all' : '') . (isset($_REQUEST['viewResults']) ? ';viewResults' : '');
redirectexit($url, false, true);
}
sources/MessageIndex.php bul
if (WIRELESS)üstüne koyif ((isset($context['pretty']['oldschoolquery']) || $_REQUEST['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])
{
$url = 'board=' . $board . '.' . (isset($_REQUEST['start']) ? $_REQUEST['start'] : '0') . (isset($_REQUEST['sort']) ? ';sort=' . $_REQUEST['sort'] : '');
redirectexit($url, false, true);
}sources/QueryString.php dosyasında bu kodu bul
global $board, $topic, $boardurl, $scripturl, $modSettings;bununla değiştirfunction cleanRequest()
{
global $board, $topic, $boardurl, $scripturl, $modSettings, $context, $db_prefix;aynı dosyada bu kodu bul
// Now make absolutely sure it's a number.
$board = (int) $_REQUEST['board'];bununla değiştir
// Now make absolutely sure it's a number.
// Check for pretty board URLs too, and possibly redirect if oldschool queries were used.
if (is_numeric($_REQUEST['board']))
{
$board = (int) $_REQUEST['board'];
if (!isset($_REQUEST['pretty']))
$context['pretty']['oldschoolquery'] = true;
} else {
$pretty_board_lookup = unserialize($modSettings['pretty_board_lookup']);
$board = (int) isset($pretty_board_lookup[$_REQUEST['board']]) ? $pretty_board_lookup[$_REQUEST['board']] : 0;
}
aynı dosyada bu kodu bul
$topic = (int) $_REQUEST['topic'];bununla değiştir
// Check for pretty topic URLs, and possibly redirect if oldschool queries were used.
if (is_numeric($_REQUEST['topic']))
{
$topic = (int) $_REQUEST['topic'];
if (!isset($_REQUEST['pretty']))
$context['pretty']['oldschoolquery'] = true;
} else {
$_REQUEST['topic'] = str_replace('\\', '', $_REQUEST['topic']);
$_REQUEST['topic'] = str_replace(''', "\'", $_REQUEST['topic']);
// Are we feeling lucky?
$query = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}pretty_topic_urls
WHERE pretty_url = '$_REQUEST[topic]'
LIMIT 1", __FILE__, __LINE__);
// No? No topic?!
if (mysql_num_rows($query) == 0)
{
$topic = 0;
} else {
while ($row = mysql_fetch_assoc($query))
$topic = (int) $row['ID_TOPIC'];
}
mysql_free_result($query);
// That query should be counted separately
$context['pretty']['db_count']++;
}sources/Subs-Boards.php dosyada bu kodu bul
function modifyBoard($board_id, &$boardOptions)
{
global $sourcedir, $cat_tree, $boards, $boardList, $modSettings, $db_prefix;bunula değiş
function modifyBoard($board_id, &$boardOptions)
{
global $sourcedir, $cat_tree, $boards, $boardList, $modSettings, $db_prefix, $context;aynı dosyada bu kodu bul
if (isset($boardOptions['move_to']))
reorderBoards();bununla değiş
if (isset($boardOptions['move_to']))
reorderBoards();
// Update the pretty board URLs
if (isset($boardOptions['pretty_url']))
{
require_once($sourcedir . '/Subs-PrettyUrls.php');
// Get the current board URLs
$pretty_board_lookup = unserialize($modSettings['pretty_board_lookup']);
// Generate a new one
$pretty_url = generatePrettyUrl($boardOptions['pretty_url']);
// Can't be empty, can't be a number and can't be the same as another
if ($pretty_url == '' || is_numeric($pretty_url) || (isset($pretty_board_lookup[$pretty_url]) && $pretty_board_lookup[$pretty_url] != $board_id))
// Add suffix '-bboard_id' to the pretty url
$pretty_url .= ($pretty_url != '' ? '-b' : 'b') . $board_id;
// Save to the database
$context['pretty']['board_urls'][$board_id] = $pretty_url;
$pretty_board_lookup[$pretty_url] = $board_id;
updateSettings(array(
'pretty_board_lookup' => addslashes(serialize($pretty_board_lookup)),
'pretty_board_urls' => addslashes(serialize($context['pretty']['board_urls'])),
));
// Count that query!
$context['pretty']['db_count']++;
}
aynı dosyada bu kodu bul
// Change the board according to the given specifications.bununla değiş
if (!isset($boardOptions['pretty_url']))
$boardOptions['pretty_url'] = $boardOptions['board_name'];
// Change the board according to the given specifications.
sources/Subs-Post.php dosyada alttaki kodu bul
function createPost(&$msgOptions, &$topicOptions, &$posterOptions)
{
global $db_prefix, $user_info, $ID_MEMBER, $txt, $modSettings;bununla değiş
function createPost(&$msgOptions, &$topicOptions, &$posterOptions)
{
global $db_prefix, $user_info, $ID_MEMBER, $txt, $modSettings, $context, $sourcedir;aynı dosyada bu kodu bul
// There's been a new topic AND a new post today.bu kodla değiştir
// Generate the pretty URL of our exciting new topic
require_once($sourcedir . '/Subs-PrettyUrls.php');
$pretty_text = substr(generatePrettyUrl($msgOptions['subject']), 0, 80);
// Is the URL already there?
$query = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}pretty_topic_urls
WHERE pretty_url = '$pretty_text'
LIMIT 1", __FILE__, __LINE__);
// If it's not unique we need to change it
$notunique = mysql_num_rows($query);
mysql_free_result($query);
// Can't be empty, can't be a number and can't be the same as another
if ($pretty_text == '' || is_numeric($pretty_text) || $notunique != 0)
// Add suffix '-tID_TOPIC' to the pretty url
$pretty_text = substr($pretty_text, 0, 70) . ($pretty_text != '' ? '-t' : 't') . $topicOptions['id'];
// Update the database
db_query("
REPLACE INTO {$db_prefix}pretty_topic_urls (ID_TOPIC, pretty_url)
VALUES (" . $topicOptions['id'] . ', "' . $pretty_text . '")', __FILE__, __LINE__);
// Count those queries!
$context['pretty']['db_count'] = $context['pretty']['db_count'] + 2;
// There's been a new topic AND a new post today.
forum/index.php alttaki kodu bul
// Clean the request variables, add slashes, etc.
cleanRequest();
$context = array();bununla değiştirin
// Unserialize the array of pretty board URLs
$context = array('pretty' => array(
'board_urls' => unserialize($modSettings['pretty_board_urls']),
'db_count' => 0,
));
// Clean the request variables, add slashes, etc.
cleanRequest();forum/SSI.php de kodu bulun
// Clean the request variables.değiştirin..
// Unserialize the array of pretty board URLs
$context = array('pretty' => array(
'board_urls' => unserialize($modSettings['pretty_board_urls']),
'db_count' => 0,
));
// Clean the request variables.sources/ManageErrors.php de kodu bulun
$context['sub_template'] = 'error_log';değiştirin
$context['sub_template'] = 'error_log';
// Don't rewrite any URLs, we need these ones to remain exact!
$modSettings['pretty_enable_filters'] = false;sources/ModSettings.php de kodu bulun
array('check', 'queryless_urls'),alttaki kodla değiştirin
// Pretty URLs mod - disable the default queryless URLs
// array('check', 'queryless_urls'),aynı dosyada bu kodu bulun
array('int', 'max_image_height'),alttaki kodla değiştirin
array('int', 'max_image_height'),
'',
// Pretty URLs mod
array('text', 'pretty_root_url', 36),
array('check', 'pretty_enable_filters'),sourcedir/News.php de kodu bulun
if ($xml_format == 'smf' || isset($_REQUEST['debug']))bununla değiştirin
// Pretty URLs need to be rewritten
ob_start('ob_sessrewrite');
if ($xml_format == 'smf' || isset($_REQUEST['debug']))sources/PackageGet.php dosyasında kodu bulun
if (getPackageInfo($url . $_REQUEST['package']) == false)bununla değiştirin
if (getPackageInfo(canonicaliseUrl($url . $_REQUEST['package'])) == false)aynı dosyada bu kodu bulun
$url . $_REQUEST['package']));
// Done! Did we get this package automatically?
bununla değiştirin
canonicaliseUrl($url . $_REQUEST['package'])));
// Done! Did we get this package automatically?
aynı dosyada
?>bundan önce dosyanın en aşağısı bu kodu koyun
// Canonicalise a url
// http://au.php.net/manual/en/function.realpath.php#71334
function canonicaliseUrl($url)
{
$url = explode('/', $url);
$keys = array_keys($url, '..');
foreach($keys AS $keypos => $key)
array_splice($url, $key - ($keypos * 2 + 1), 2);
$url = implode('/', $url);
return str_replace('./', '', $url);
}sources/QueryString.php bu kodu bulun
function ob_sessrewrite($buffer)
{
global $scripturl, $modSettings, $user_info, $context;bununla değiştirin
function ob_sessrewrite($buffer)
{
global $scripturl, $modSettings, $user_info, $context, $db_prefix, $sourcedir, $txt, $time_start, $db_count;aynı dosyada bu kodu bulun dosyanın en altında
// This should work even in 4.2.x, just not CGI without cgi.fix_pathinfo.
if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1) && $context['server']['is_apache'])
{
// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . ';)((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);
}
// Return the changed buffer.
return $buffer;
}bununla değiştirin
// Rewrite the buffer with Pretty URLs!
if ($modSettings['pretty_enable_filters'])
{
// Find all URLs in the buffer
$pattern = '~(<a[^>]+href=|<link[^>]+href=|<link>|<id>|<comments>|<guid>)(\"[^\"#]+|\'[^\'#]+|[^#<]+)~';
$crc_query = array();
$uncached_urls = array();
preg_match_all($pattern, $buffer, $matches, PREG_PATTERN_ORDER);
foreach ($matches[2] as $match)
{
// Rip out everything that shouldn't be cached
$match = preg_replace(array('~^[\"\']|PHPSESSID=[^;]+|sesc=[^;]+~', '~\"~', '~;+|=;~', '~\?;~', '~\?$|;$|=$~'), array('', '%22', ';', '?', ''), $match);
$crc = crc32($match);
$crc_query[] = $crc;
$uncached_urls[$crc] = array(
'url' => $match,
'crc' => $crc
);
}
// Procede only if there are actually URLs in the page
if (count($crc_query) != 0)
{
// Retrieve cached URLs
$context['pretty']['cached_urls'] = array();
$query = db_query("
SELECT url_crc, replacement
FROM {$db_prefix}pretty_urls_cache
WHERE url_crc IN (" . implode(', ', $crc_query) . ")
AND log_time > " . (time() - 86400), __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{
$context['pretty']['cached_urls'][$row['url_crc']] = $row['replacement'];
unset($uncached_urls[$row['url_crc']]);
}
mysql_free_result($query);
// If there are any uncached URLs, process them
if (count($uncached_urls) != 0)
{
// Run each filter callback function on each URL
$filter_callbacks = unserialize($modSettings['pretty_filter_callbacks']);
foreach ($filter_callbacks as $callback)
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$uncached_urls = call_user_func($callback, $uncached_urls);
}
// Fill the cached URLs array
$cache_data = array();
foreach ($uncached_urls as $crc => $url)
{
$url['replacement'] = isset($url['replacement']) ? $url['replacement'] : $url['url'];
$url['replacement'] = preg_replace(array('~\"~', '~;+|=;~', '~\?;~', '~\?$|;$|=$~'), array('%22', ';', '?', ''), $url['replacement']);
$context['pretty']['cached_urls'][$crc] = $url['replacement'];
$cache_data[] = '(' . $crc . ', \'' . addslashes($url['replacement']) . '\')';
}
// Cache these URLs in the database
if (count($cache_data) != 0)
db_query("
REPLACE INTO {$db_prefix}pretty_urls_cache
(url_crc, replacement)
VALUES " . implode(', ', $cache_data), __FILE__, __LINE__);
}
// Put the URLs back into the buffer
$pattern = '~(<a[^>]+href=|<link[^>]+href=|<link>|<id>|<comments>|<guid>)(\"[^\"]+\"|\'[^\']+\'|[^<]+)~';
$buffer = preg_replace_callback($pattern, 'pretty_buffer_callback', $buffer);
}
}
// Update the load times
$pattern = '~<span class="smalltext">' . $txt['smf301'] . '([.0-9]+)' . $txt['smf302'] . '([0-9]+)' . $txt['smf302b'] . '</span>~';
if (preg_match($pattern, $buffer, $matches))
{
$newTime = round(array_sum(explode(' ', microtime())) - array_sum(explode(' ', $time_start)), 3);
$timeDiff = $newTime - (float) $matches[1];
$queriesDiff = $db_count + $context['pretty']['db_count'] - (int) $matches[2];
// Remove the link if you like, I won't enforce it like others do
$newLoadTime = '<span class="smalltext">' . $txt['smf301'] . $newTime . $txt['smf302'] . $db_count . $txt['smf302b'] . ' (<a href="http://code.google.com/p/prettyurls/">Pretty URLs</a> adds ' . $timeDiff . 's, ' . $queriesDiff . 'q)</span>';
$buffer = str_replace($matches[0], $newLoadTime, $buffer);
}
// Return the changed buffer.
return $buffer;
}
// A callback function to replace the buffer's URLs with their cached URLs
function pretty_buffer_callback($matches)
{
global $context;
// Is this URL part of a feed?
$isFeed = strpos($matches[1], '>');
// Remove those annoying quotes
$matches[2] = preg_replace('~^[\"\']|[\"\']$~', '', $matches[2]);
// Store the parts of the URL that won't be cached so they can be inserted later
preg_match('~PHPSESSID=[^;#&]+~', $matches[2], $PHPSESSID);
preg_match('~sesc=[^;#]+~', $matches[2], $sesc);
preg_match('~#.*~', $matches[2], $fragment);
// Rip out everything that won't have been cached
$cacheableurl = preg_replace(array('~PHPSESSID=[^;#]+|sesc=[^;#]+|#.*$~', '~\"~', '~;+|=;~', '~\?;~', '~\?$|;$|=$~'), array('', '%22', ';', '?', ''), $matches[2]);
$crc = crc32($cacheableurl);
// Stich everything back together, clean it up and return
$replacement = isset($context['pretty']['cached_urls'][$crc]) ? $context['pretty']['cached_urls'][$crc] : $cacheableurl;
$replacement .= (strpos($replacement, '?') === false ? '?' : ';') . (isset($PHPSESSID[0]) ? $PHPSESSID[0] : '') . ';' . (isset($sesc[0]) ? $sesc[0] : '') . (isset($fragment[0]) ? $fragment[0] : '');
$replacement = preg_replace(array('~;+|=;~', '~\?;~', '~\?#|;#|=#~', '~\?$|;$|#$|=$~'), array(';', '?', '#', ''), $replacement);
return $matches[1] . ($isFeed === false ? '"' : '') . $replacement . ($isFeed === false ? '"' : '');
}
sources/Subs.php de bu kodu bulun
function redirectexit($setLocation = '', $refresh = false)
{
global $scripturl, $context, $modSettings, $db_show_debug;bununla değiştirin
function redirectexit($setLocation = '', $refresh = false, $permanent = false)
{
global $scripturl, $context, $modSettings, $db_show_debug, $sourcedir;aynı dosyada bu kodu bulun
if (!empty($modSettings['queryless_urls']) && (empty($context['server']['is_cgi']) || @ini_get('cgi.fix_pathinfo') == 1) && !empty($context['server']['is_apache']))
{
if (defined('SID') && SID != '')
$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\?(?:' . SID . ';)((?:board|topic)=[^#]+?)(#[^"]*?)?$/e', "\$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2?' . SID", $setLocation);
else
$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$/e', "\$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2'", $setLocation);
}
if (isset($modSettings['integrate_redirect']) && function_exists($modSettings['integrate_redirect']))
$modSettings['integrate_redirect']($setLocation, $refresh);bununla değiştirin
// Redirections should be pretty too
if ($modSettings['pretty_enable_filters'])
{
$url = array(0 => array('url' => $setLocation, 'crc' => 0));
$filter_callbacks = unserialize($modSettings['pretty_filter_callbacks']);
foreach ($filter_callbacks as $callback)
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$pretty_url = call_user_func($callback, $url);
if (isset($pretty_url[0]['replacement']))
break;
}
if (isset($pretty_url[0]['replacement']))
$setLocation = $pretty_url[0]['replacement'];
$setLocation = preg_replace(array('~;+|=;~', '~\?;~', '~\?#|;#|=#~', '~\?$|;$|#$|=$~'), array(';', '?', '#', ''), $setLocation);
}
if (isset($modSettings['integrate_redirect']) && function_exists($modSettings['integrate_redirect']))
$modSettings['integrate_redirect']($setLocation, $refresh);
if ($permanent)
header('HTTP/1.1 301 Moved Permanently');
son olarak site teması/languages/Modifications.english.php site temasında bu dosya olmayanlar default temanın languages dosyasından alsınlar
bu koddan önce
?>bu kodları yerleştirin
// Pretty URLs mod
$txt['pretty_root_url'] = 'Pretty URLs root URL<div class="smalltext">(Without a final slash)</div>';
$txt['pretty_enable_filters'] = 'Enable URL filters<div class="smalltext">This may be a substantial performance hit</div>';ve son olarakda arkadaşlar indirdiğiniz modun içersinde ki
PrettyUrls-Filters.php ve Subs-PrettyUrls.php Sources klasörün içine atıyorsunuz...hayırlı olsun...
Arkadaşlar ben konuyu açarken aynı zamandan kodları sitemin dosyalarına yerleştirdim ve hiçbir problem çıkmadı eğer dikkatli olarak kodları doğru yerleştirirseniz hiçbir sorun çıkmayacaktır...Bu manuel anlatım tamamen bana aittir hiçbir yerden zerre kadar alıntı yapmadım...