09 Eylül 2010, 15:13:56
*
Pretty Urls (Smf Şeker Linkler)

SMFPlus SMF Destek /Pretty Urls (Smf Şeker Linkler) => Kuruluma Başlamadan Önce 1-Sunucumuzun Linux (apache) olması ve mod_rewrite modülün aktif olduğundan emin olun. 2-Veritabanınızı mutlaka yedekleyin.

Sayfa: [1] 2   Aşağı git
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
22 Mayıs 2009, 00:48:52 >> Pretty Urls (Smf Şeker Linkler)
Silver Üye
*
Rep: 33
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 335
Bizim Rengimiz Belli Siz Ne Ayaksınız ?
Profili Görüntüle CamfrogBayi
Kuruluma Başlamadan Önce
1-Sunucumuzun Linux (apache) olması ve mod_rewrite modülün aktif olduğundan emin olun.
2-Veritabanınızı mutlaka yedekleyin.
3-Seo4SMF Kurulu İse Bunu Kurmanıza Gerek Yoktur + Seo4Smf'i Kaldırmadan Kurmaya Çalışmayın
Değişiklik Yapılacak Dosyalar Aşağıda .. Bunlarıda mutlaka yedekleyin.
./index.php     
./SSI.php    
./Sources/Admin.php    
./Sources/ManageErrors.php    
./Sources/ModSettings.php    
./Sources/News.php    
./Sources/QueryString.php    
./Sources/Subs.php    
./Sources/Display.php    
./Sources/MessageIndex.php    
./Sources/QueryString.php    
./Sources/Subs-Boards.php    


Yukardaki yönergeleri uyguladıysanız şimdi kuruluma geçebiliriz.
İlk önce Burdan yada Şurdan Modu indirip
Forum Kontrolleri >> Paketler >>  Paket Yükle Sekmesinden paketi seçip Yükle Diyoruz. Tüm Dosyalarda Test Başarılı ise Yükle Butonuna tıklıyoruz
Paket Başarıyla yüklendi. Siz şimdi onun ne gibi işlevsellikler eklediğini kullanmalısınız.
şimdi ./Themes/default/languages/Modifications.turkish.php'de
bul
Kod: [Seç]
?>
üzerine ekle
Kod: [Seç]
// Şeker Linkler Modifikasyonu
$txt['pretty_admin_menu'] = 'Şeker Linkler';

// Kategori Şekerlemesi
$txt['pretty_add_url'] = 'Ekle';
$txt['pretty_add_url_description'] = 'Yeni kalıcı bağlantı yapısını girin .';
$txt['pretty_board_url_title'] = 'Şekerleşen Kategori : ';
$txt['pretty_deleted_board'] = 'Sil #';
$txt['pretty_duplicate_link'] = 'önce birini silin.';
$txt['pretty_duplicate_warning'] = 'girdiğiniz url zaten başka bi kategoride kullanılmakda ';
$txt['pretty_make_primary'] = 'Varsayılan yap';
$txt['pretty_modify_board_url'] = 'El İle Şekerleştir';
$txt['pretty_no_primary_warning'] = 'Hata, Kalıcı bağlantı atamadınız!';
$txt['pretty_numerical'] = 'Sorry, but as that URL is either a number or the same as a forum action the board ID had to be added as a suffix.';
$txt['pretty_primary_url'] = 'Varsayılan';

// Settings descriptions
$txt['pretty_action_array'] = 'An array of forum actions, extracted from index.php.';
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. There can be more than one URL for each board.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pairs, used for generating pretty replacement URLs.';
$txt['pretty_enable_filters'] = 'Sets whether to prettify anything at all. 0 for no, 1 for yes.';
$txt['pretty_filters'] = 'A serialized array of filter data.';
$txt['pretty_filter_callbacks'] = 'A serialized array of callback function names, sorted by priority. Don\'t manually edit this, edit the <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'The base URL used by the board and topic filters, which by default is the same as <tt>$boardurl</tt>.';
Türkçeleştirmek için ekteki PrettyUrls.turkish.php 'dosyasını Themes/Default/languages/ dizinine atıyoruz.
Kullanma Klavuzu
Panele girdiğimizde Sürüm bilgileri ve Mod yapımcısının sitesinden haberler karşımıza çıkıyor
ayarlar sekmesine tıklayın

Ayarlardan aşağıda gösterdiklerimi işaretleyin

Bakıma ihtiyacınız olabilir  :B


demo site  http://cokbilmis.net/f/guvenlik/acik-portlari-kapatalim/

Hata Alanlar yada ivan_ gibi manuel sevenler için  :Y
./index.php'de
bul
Kod: [Seç]
// Clean the request variables, add slashes, etc.
cleanRequest();
$context = array();
değiştir
Kod: [Seç]
// Unserialize the array of pretty board URLs
$context = array('pretty' => array(
'action_array' => unserialize($modSettings['pretty_action_array']),
'board_urls' => unserialize($modSettings['pretty_board_urls']),
'db_count' => 0,
));
// Clean the request variables, add slashes, etc.
cleanRequest();

./SSI.php'de
bul
Kod: [Seç]

// Clean the request variables.
değiştir
Kod: [Seç]
// Unserialize the array of pretty board URLs
$context = array('pretty' => array(
'action_array' => unserialize($modSettings['pretty_action_array']),
'board_urls' => unserialize($modSettings['pretty_board_urls']),
'db_count' => 0,
));
// Clean the request variables.

./Sources/Admin.php'de
bul
Kod: [Seç]
return ManageCopyright();
Değiştir
Kod: [Seç]

return ManageCopyright();

// Pretty URLs area h.a.c.k
if (isset($_GET['area']) && $_GET['area'] == 'pretty')
{
require_once($sourcedir . '/PrettyUrls.php');
return PrettyInterface();
}

./Sources/ManageErrors.php'de
bul
Kod: [Seç]

$context['sub_template'] = 'error_log';
değiştir
Kod: [Seç]

$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
bul
Kod: [Seç]

array('check', 'queryless_urls'),
Değiştir
Kod: [Seç]

// Pretty URLs mod - disable the default queryless URLs
// array('check', 'queryless_urls'),

./Sources/News.php'de
bul
Kod: [Seç]

if ($xml_format == 'smf' || isset($_REQUEST['debug']))
değiştir
Kod: [Seç]

// Pretty URLs need to be rewritten
ob_start('ob_sessrewrite');
$context['pretty']['search_patterns'][] = '~(<link>|<id>|<comments>|<guid>)([^#<]+)~';
$context['pretty']['replace_patterns'][] = '~(<link>|<id>|<comments>|<guid>)([^<]+)~';

if ($xml_format == 'smf' || isset($_REQUEST['debug']))

./Sources/QueryString.php'de
bul
Kod: [Seç]

function ob_sessrewrite($buffer)
{
global $scripturl, $modSettings, $user_info, $context;
değiştir
Kod: [Seç]

function ob_sessrewrite($buffer)
{
global $scripturl, $modSettings, $user_info, $context, $db_count, $sourcedir, $time_start, $txt;
bul
Kod: [Seç]

// This should work even in 4.2.x, just not CGI without cgi.fix_pathinfo.
Üstüne Ekle
Kod: [Seç]

/* Pretty URLs says no!
bul
Kod: [Seç]

// Return the changed buffer.
üstüne ekle
Kod: [Seç]

*/

// Rewrite the buffer with Pretty URLs!
if ($modSettings['pretty_enable_filters'])
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$buffer = pretty_rewrite_buffer($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);
}
Bul
Kod: [Seç]

function cleanRequest()
{
global $board, $topic, $boardurl, $scripturl, $modSettings;
Değiştir
Kod: [Seç]

function cleanRequest()
{
global $board, $topic, $boardurl, $scripturl, $modSettings, $context, $db_prefix;
Bul
Kod: [Seç]

// Now make absolutely sure it's a number.
$board = (int) $_REQUEST['board'];
Değiştir
Kod: [Seç]

// 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;
unset($_GET['pretty']);
}
} else {
$_REQUEST['board'] = str_replace(array('&#039;', '\\'), array("\x12", ''), $_REQUEST['board']);
$pretty_board_lookup = unserialize($modSettings['pretty_board_lookup']);
$board = (int) isset($pretty_board_lookup[$_REQUEST['board']]) ? $pretty_board_lookup[$_REQUEST['board']] : 0;

// Fix $_REQUEST for silly mods that don't check $board
$context['pretty']['query_string']['board'] = $_REQUEST['board'];
$_GET['board'] = $board;
$_REQUEST['board'] = $board;
}
Bul
Kod: [Seç]

$topic = (int) $_REQUEST['topic'];
Değiştir
Kod: [Seç]

// 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;
unset($_GET['pretty']);
}
} else {
$_REQUEST['topic'] = str_replace(array('&#039;', '\\'), array("\x12", ''), $_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);

// Fix $_REQUEST for silly mods that don't check $topic
$context['pretty']['query_string']['topic'] = $_REQUEST['topic'];
$_GET['topic'] = $topic;
$_REQUEST['topic'] = $topic;

// That query should be counted separately
$context['pretty']['db_count']++;
}

./Sources/Security.php'de
Bul
Kod: [Seç]

if (!empty($from_action) && (!isset($_SESSION['old_url']) || preg_match('~[?;&]action=' . $from_action . '([;&]|$)~', $_SESSION['old_url']) == 0))
Değiştir
Kod: [Seç]

if (!empty($from_action) && (!isset($_SESSION['old_url']) || preg_match('~[?;&]action=' . $from_action . '([;&]|$)|' . $boardurl . '/' . $from_action . '~', $_SESSION['old_url']) == 0))

./Sources/Subs.php'de
Bul
Kod: [Seç]

global $scripturl, $context, $modSettings, $db_show_debug;
Değiştir
Kod: [Seç]

global $scripturl, $context, $modSettings, $db_show_debug, $sourcedir;
Bul
Kod: [Seç]

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);
}
Değiştir
Kod: [Seç]

// Redirections should be pretty too
if ($modSettings['pretty_enable_filters'])
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$url = array(0 => array('url' => $setLocation, 'url_id' => 'setLocation'));
$filter_callbacks = unserialize($modSettings['pretty_filter_callbacks']);
foreach ($filter_callbacks as $callback)
{
$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 = str_replace("\x12", '\'', $setLocation);
$setLocation = preg_replace(array('~;+|=;~', '~\?;~', '~\?#|;#|=#~', '~\?$|;$|#$|=$~'), array(';', '?', '#', ''), $setLocation);
}
Bul
Kod: [Seç]

'manage_themes' => '<a href="' . $scripturl . '?action=theme;sa=admin;sesc=' . $sc . '">' . $txt['theme_admin'] . '</a>',
Değiştir
Kod: [Seç]

'manage_themes' => '<a href="' . $scripturl . '?action=theme;sa=admin;sesc=' . $sc . '">' . $txt['theme_admin'] . '</a>',
'pretty_admin' => '<a href="' . $scripturl . '?action=admin;area=pretty">' . $txt['pretty_admin_menu'] . '</a>',

./Sources/Display.php'de
 bul
Kod: [Seç]

// Load the proper template and/or sub template.
Değiştir
Kod: [Seç]

// 301 redirects
if ((isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])
{
$filterData = unserialize($modSettings['pretty_filters']);
if ($filterData['topics']['enabled'])
{
$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' : '');
header('HTTP/1.1 301 Moved Permanently');
redirectexit($url, false);
}
}

// Load the proper template and/or sub template.

./Sources/ManageBoards.php'de
bul
Kod: [Seç]

'settings' => array('EditBoardSettings', 'admin_forum'),
Altına ekle
Kod: [Seç]

'pretty' => array('PrettyBoardUrls', 'admin_forum'),
Bul (en altta)
Kod: [Seç]
?>
Üzerine Ekle
Kod: [Seç]

// Interface to manage a board's Pretty URLs
function PrettyBoardUrls()
{
global $boards, $context, $db_prefix, $modSettings, $scripturl, $sourcedir, $txt;

// Start by getting a list of the boards, and see if we're editing a deleted board or not
require_once($sourcedir . '/Subs-Boards.php');
getBoardTree();
$board_id = (int) $_REQUEST['boardid'];
$context['pretty']['board_title'] = $txt['pretty_board_url_title'] . (isset($boards[$board_id]) ? $boards[$board_id]['name'] : $txt['pretty_deleted_board'] . $board_id);

// Get all the pretty URLs for this board
$pretty_board_urls = unserialize($modSettings['pretty_board_urls']);
$pretty_board_lookup = unserialize($modSettings['pretty_board_lookup']);

// Are we missing a primary URL?
if (!isset($pretty_board_urls[$board_id]) && isset($boards[$board_id]))
$context['pretty']['warning'] = $txt['pretty_no_primary_warning'];

// Deleting a URL?
if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'delete')
{
foreach ($pretty_board_urls as $id => $url)
if ($url == $_REQUEST['url'])
unset($pretty_board_urls[$id]);
foreach ($pretty_board_lookup as $url => $id)
if ($url == $_REQUEST['url'])
unset($pretty_board_lookup[$url]);

// Update the database of course
updateSettings(array(
'pretty_board_lookup' => addslashes(serialize($pretty_board_lookup)),
'pretty_board_urls' => addslashes(serialize($pretty_board_urls)),
));

// Clear the URLs cache
db_query("TRUNCATE TABLE {$db_prefix}pretty_urls_cache", __FILE__, __LINE__);

redirectexit('action=manageboards;sa=pretty;boardid=' . $board_id);
}
// Changing the primary URL?
if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'primary')
if (isset($pretty_board_lookup[$_REQUEST['url']]) && $pretty_board_lookup[$_REQUEST['url']] == $board_id)
{
$pretty_board_urls[$board_id] = $_REQUEST['url'];
updateSettings(array('pretty_board_urls' => addslashes(serialize($pretty_board_urls))));
db_query("TRUNCATE TABLE {$db_prefix}pretty_urls_cache", __FILE__, __LINE__);
redirectexit('action=manageboards;sa=pretty;boardid=' . $board_id);
}
// Adding a URL?
if (isset($_REQUEST['add']) && $_REQUEST['add'] != '')
{
require_once($sourcedir . '/Subs-PrettyUrls.php');

$pretty_text = pretty_generate_url($_REQUEST['add']);
// Numerical or URLs the same as actions aren't allowed!
if (is_numeric($pretty_text) || in_array($pretty_text, $context['pretty']['action_array']))
{
// Add suffix '-board_id' to the pretty url
$_SESSION['pretty']['warning'] = $txt['pretty_numerical'];
$pretty_text .= ($pretty_text != '' ? '-' : 'b') . $board_id;
}

// Duplicate URL?
if (isset($pretty_board_lookup[$pretty_text]))
$context['pretty']['warning'] = $txt['pretty_duplicate_warning'] . '<a href="' . $scripturl . '?action=manageboards;sa=pretty;boardid=' . $pretty_board_lookup[$pretty_text] . '">' . $txt['pretty_duplicate_link'] . '</a>';
else
{
// No it's unique, so we can update the database
$pretty_board_lookup[$pretty_text] = $board_id;
updateSettings(array('pretty_board_lookup' => addslashes(serialize($pretty_board_lookup))));
db_query("TRUNCATE TABLE {$db_prefix}pretty_urls_cache", __FILE__, __LINE__);
redirectexit('action=manageboards;sa=pretty;boardid=' . $board_id);
}
}

// Prepare the list of board URLs
$context['pretty']['this_board'] = array();
foreach ($pretty_board_lookup as $url => $id)
if ($id == $board_id)
$context['pretty']['this_board'][] = array(
'primary' => !isset($context['pretty']['no_primary_warning']) && $url == $pretty_board_urls[$board_id],
'url' => $url,
);

// Load the right template
loadTemplate('ManageBoards');
$context['sub_template'] = 'pretty_board_url';
$context['page_title'] = $context['pretty']['board_title'];
if (isset($_SESSION['pretty']['warning']))
{
$context['pretty']['warning'] = $_SESSION['pretty']['warning'];
unset($_SESSION['pretty']['warning']);
}
}

./Sources/MessageIndex.php'de
bul
Kod: [Seç]

if (WIRELESS)
Değiştir
Kod: [Seç]

// 301 redirects
if ((isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])
{
$filterData = unserialize($modSettings['pretty_filters']);
if ($filterData['boards']['enabled'])
{
$url = 'board=' . $board . '.' . (isset($_REQUEST['start']) ? $_REQUEST['start'] : '0') . (isset($_REQUEST['sort']) ? ';sort=' . $_REQUEST['sort'] : '');
header('HTTP/1.1 301 Moved Permanently');
redirectexit($url, false);
}
}

if (WIRELESS)

./Sources/Subs-Boards.php'de bul
Kod: [Seç]

function modifyBoard($board_id, &$boardOptions)
{
global $sourcedir, $cat_tree, $boards, $boardList, $modSettings, $db_prefix;
Değiştir
Kod: [Seç]

function modifyBoard($board_id, &$boardOptions)
{
global $sourcedir, $cat_tree, $boards, $boardList, $modSettings, $db_prefix, $context;
Bul
Kod: [Seç]

if (isset($boardOptions['move_to']))
reorderBoards();
Değiştir
Kod: [Seç]

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 = pretty_generate_url($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 '-board_id' to the pretty url
$pretty_url .= ($pretty_url != '' ? '-' : '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']++;
}

Bul
Kod: [Seç]

// Change the board according to the given specifications.
Değiştir
Kod: [Seç]

if (!isset($boardOptions['pretty_url']))
$boardOptions['pretty_url'] = $boardOptions['board_name'];

// Change the board according to the given specifications.

./Themes/default/ManageBoards.template.php'de
bul
Kod: [Seç]
<td style="padding-left: 1ex;" colspan="4">
Değiştir
Kod: [Seç]
<td style="padding-left: 1ex;" colspan="5">
Bul
Kod: [Seç]
<td colspan="4" style="padding-left: 5px;">
Değiştir
Kod: [Seç]
<td colspan="5" style="padding-left: 5px;">
Bul
Kod: [Seç]

<td width="10%" style="padding-right: 1ex;" align="right"><a href="', $scripturl, '?action=manageboards;sa=board;boardid=', $board['id'], '">', $txt['mboards_modify'], '</a></td>
Değiştir
Kod: [Seç]

<td width="10%" align="right"><a href="', $scripturl, '?action=manageboards;sa=board;boardid=', $board['id'], '">', $txt['mboards_modify'], '</a></td>
<td width="10%" style="padding-right: 1ex;" align="right">', allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=manageboards;sa=pretty;boardid=' . $board['id'] . '">' . $txt['pretty_modify_board_url'] . '</a>' : '', '</td>
Bul
Kod: [Seç]
<td style="padding-left: ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;" colspan="4">
Değiştir
Kod: [Seç]
<td style="padding-left: ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;" colspan="5">
Bul
Kod: [Seç]
<td colspan="4" align="right">
Değiştir
Kod: [Seç]
<td colspan="5" align="right">
Bul (En Altda)
Kod: [Seç]
?>
Üstüne Ekle
Kod: [Seç]
// Interface to manage a board's Pretty URLs
function template_pretty_board_url()
{
global $context, $scripturl, $txt;

// Core really, really sucks.
echo '
<table align="center" cellspacing="1" cellpadding="4" class="bordercolor" style="border: 0; min-width: 650px; width: 50%;">
<tr class="titlebg"><th>', $context['pretty']['board_title'], '</th></tr>
<tr class="windowbg2"><td>';

// Is something wrong?
if (isset($context['pretty']['warning']))
echo '
<p><strong>', $context['pretty']['warning'], '</strong></p>';

echo '
<ul>';

// List out the URLs
foreach ($context['pretty']['this_board'] as $url)
{
echo '
<li>', $url['url'], ' ';

if ($url['primary'])
echo '<b>', $txt['pretty_primary_url'], '</b>';
else
echo '<a href="', $scripturl, '?action=manageboards;sa=pretty;boardid=', $_REQUEST['boardid'], ';do=primary;url=', $url['url'], '">', $txt['pretty_make_primary'], '</a>';

echo ' <a href="', $scripturl, '?action=manageboards;sa=pretty;boardid=', $_REQUEST['boardid'], ';do=delete;url=', $url['url'], '">', $txt['smf138'], '</a></li>';
}

echo '
</ul>
<form action="', $scripturl, '?action=manageboards;sa=pretty;boardid=', $_REQUEST['boardid'], '" method="post" accept-charset="', $context['character_set'], '">
<p><label for="pretty_add_url">', $txt['pretty_add_url_description'], '</label>
<input type="text" style="width: 150px;" value="" name="add" id="pretty_add_url" /></p>
<p><input type="submit" value="', $txt['pretty_add_url'], '" name="submit" /></p>
</form>
</td></tr>
</table>';
}

./Themes/default/languages/Modifications.turkish.php'de
bul
Kod: [Seç]
?>
üzerine ekle
Kod: [Seç]
// Şeker Linkler Modifikasyonu
$txt['pretty_admin_menu'] = 'Şeker Linkler';

// Board URLs interface
$txt['pretty_add_url'] = 'Ekle';
$txt['pretty_add_url_description'] = 'Add a URL. Note that what you enter here will be processed as only certain characters are allowed.';
$txt['pretty_board_url_title'] = 'Pretty URLs for: ';
$txt['pretty_deleted_board'] = 'Deleted board #';
$txt['pretty_duplicate_link'] = 'delete it first.';
$txt['pretty_duplicate_warning'] = 'That URL is already in use by another board. It will be available if you ';
$txt['pretty_make_primary'] = 'Make primary';
$txt['pretty_modify_board_url'] = 'Pretty URL';
$txt['pretty_no_primary_warning'] = 'Warning, no primary URL!';
$txt['pretty_numerical'] = 'Sorry, but as that URL is either a number or the same as a forum action the board ID had to be added as a suffix.';
$txt['pretty_primary_url'] = 'Primary';

// Settings descriptions
$txt['pretty_action_array'] = 'An array of forum actions, extracted from index.php.';
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. There can be more than one URL for each board.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pairs, used for generating pretty replacement URLs.';
$txt['pretty_enable_filters'] = 'Sets whether to prettify anything at all. 0 for no, 1 for yes.';
$txt['pretty_filters'] = 'A serialized array of filter data.';
$txt['pretty_filter_callbacks'] = 'A serialized array of callback function names, sorted by priority. Don\'t manually edit this, edit the <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'The base URL used by the board and topic filters, which by default is the same as <tt>$boardurl</tt>.';


Sonra indirdiğimiz zipin içinden SMF1-1 klasörünü
Klasörünü ftpye atıp
SMF1-1/install.php'yi
forum dizinine atıp çalıştırıyoruz yani siteadi.com/forum/install.php olacak şekilde
install işlemleri tamamlandıkdan sonra

Şu dosyaları da şu dizinlere atın .
"SMF1-1/PrettyUrls.php" taşi "./Sources".
"SMF1-1/PrettyUrls-Filters.php" taşi"./Sources".
"SMF1-1/Subs-PrettyUrls.php"  taşi "./Sources".
"PrettyUrls.template.php"  taşi "./Themes/default".
"pretty"  taşi "./Themes/default".
"PrettyUrls.turkish.php" taşi "./Themes/default/languages".



Not:
QueryString.php   deki hatalı yerler düzeltilmiştir.

Ekleme /  (29 Kasım 2008, 05:26:27)
Bu Modifikasyonun Üzerinde Hazır Bir Sitemap Gelmiyor , Sitemap Oluşturmak İçin
Oraya,Buraya ve Şuraya bakabilirsiniz


Ekleme 15,Aralık,2008
Sayfaları görüntülenmeyen (404 Not Found Hatası Alanlar) arkadaşlar ekteki .htaccess dosyasını rardan çıkartıp ana dizinlerine atarlarsa (forum kurulu olan yer) sorun çözülür.


Seo4smf'den Pretty^e geçenler şuraya bakabilir



Pretty Urls 2.0rc1




bu modda normalde her hangi bir sayfada login yapınca ana sayfaya yönleniyor. bu olayı çözdüm işte kodlar

LogInOut.php'de..

Kod: (bul) [Seç]
if (empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)
  $_SESSION['login_url'] = $_SESSION['old_url'];
Kod: (değiştir) [Seç]
    if (isset($_SESSION['old_url']))
          $_SESSION['login_url'] = $_SESSION['old_url'];


denendi çalışıyor.





12 Haziran 2009, 01:54:47 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Silver Üye
*
Rep: 47
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 826
SMFun CLUB!
Profili Görüntüle
süper oldu saol :D
13 Haziran 2009, 20:16:52 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yeni Üye
*
Rep: 4
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 213
I Know , I Cry End Of This...!
Profili Görüntüle
Konu Pretty URL's Bölümüne Taşınmıştır




Web Developer, Blogger, and Student from İstanbul
15 Ağustos 2009, 19:01:52 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 3
Profili Görüntüle
Smf 1.1.10 ile uyumlu mudur? Bu mod default temaya göre hazırlanmış galiba her temada paket yükleme işe yarar mı?
15 Ağustos 2009, 20:09:09 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Silver Üye
*
Rep: 11
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 592
I Love SMFPlus xD
Profili Görüntüle
Smf 1.1.10 ile uyumlu mudur? Bu mod default temaya göre hazırlanmış galiba her temada paket yükleme işe yarar mı?

default temaya kurduktan sonra diğer temalarda da calısması gerek ;)
15 Ağustos 2009, 21:12:22 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yönetici
*
Rep: 32
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 1.309
Profili Görüntüle
Smf 1.1.10 ile uyumlu mudur? Bu mod default temaya göre hazırlanmış galiba her temada paket yükleme işe yarar mı?

her tema desteklemeyebilir ( desteklemez derken sadece admin panelde bir boşluk oluşabilir ama default temaya geçerseniz o boşluk gidip pretty urls paneli açılacaktır ve çogu tema destekler  ) ancak  manuel olarak yaparsanız hiçbir problem çıkmaz
15 Ağustos 2009, 21:36:01 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 3
Profili Görüntüle
Arkadaşlar anlatıldığı gibi aynen  manuel kurdum ilk resimdeki gibi bazı panelde bilgiler eksik çıkıyor. Kaydet dediğimde de 2. resimdeki hata çıkıyor. Ben hata satırını sildim, şeker linkler butonu belirdi ona tıklayınca da site açılmadı sayfa bomboş görünüyordu phpmyadminden setting tablosunda "Pretty URLs" aratıp sildim site açıldı şimdi. Aynı sorunlar devam ediyor yardım ederseniz memnun olurum  :-[
15 Ağustos 2009, 21:48:58 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yönetici
*
Rep: 32
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 1.309
Profili Görüntüle
default tema üzerine kurun isterseniz yada kullandıgınız temanın dosyaların 0 halini kullanın ve sources klasöründe ( eğer daha önce seo kurduysanız ) 0 dosyaları kullanın kullanmadıysanız bile 0 dosyaları kullanırsanız daha iyi olacaktır

ve manuel olarak kurduysanız tam olarak modu uygulayabildiğinizden emin olunuz
15 Ağustos 2009, 21:53:31 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 3
Profili Görüntüle
default tema üzerine kurun isterseniz yada kullandıgınız temanın dosyaların 0 halini kullanın ve sources klasöründe ( eğer daha önce seo kurduysanız ) 0 dosyaları kullanın kullanmadıysanız bile 0 dosyaları kullanırsanız daha iyi olacaktır

Dostum bir sürü mod vs. kurulu ayrıca seo4smf kuruluydu sildim attım kökten heryerden sildim onu :)

subs-prettyurls.php satır 301'de hata veriyor   ???
15 Ağustos 2009, 22:07:40 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 37
Profili Görüntüle
SMFSeo mu Pretty Urls mi ? daha iyi ?
16 Ağustos 2009, 01:20:59 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Silver Üye
*
Rep: 11
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 592
I Love SMFPlus xD
Profili Görüntüle
SMFSeo mu Pretty Urls mi ? daha iyi ?

[ikaz] mesajınızın yeri burası değil... [/ikaz]
16 Ağustos 2009, 12:23:12 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Silver Üye
*
Rep: 12
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 466
Profili Görüntüle Dizi,Film İndir Ve İzle
kardeş ya ben bunu kurdum da daha iyi indexletmek için ne yapmalıyım



16 Ağustos 2009, 12:25:22 >> Ynt: Pretty Urls (Smf Şeker Linkler)
Yönetici
*
Rep: 32
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 1.309
Profili Görüntüle
kardeş ya ben bunu kurdum da daha iyi indexletmek için ne yapmalıyım

gerekli ayarları yaparsanız kendi kendine indexlenecektir arşiv sitemap modlarınıda kurarsanız faydalı olacaktır


ayrıca bu sorunun yeri burası değil

Kod: [Seç]
Dostum bir sürü mod vs. kurulu ayrıca seo4smf kuruluydu sildim attım kökten heryerden sildim onu Gülümseme

subs-prettyurls.php satır 301'de hata veriyor   Ney


Default temaya geç paket olarak yükle çıkan hata var ise burada belirt yardımcı olayım uygula deme tüm bunları yaparken yedek al eğer olmazsa pretty url's seçeneklerinden destek talebinde bulunun
Sayfa: [1] 2   Yukarı git

Google Etiketleri

 

Benzer Konular

  Konu / Başlatan Yanıt Son İleti
5 Yanıt
793 Gösterim
Son İleti 01 Şubat 2010, 12:34:35
Gönderen: мεяτ2407™
6 Yanıt
365 Gösterim
Son İleti 17 Şubat 2009, 16:13:05
Gönderen: Furqan
8 Yanıt
483 Gösterim
Son İleti 24 Nisan 2009, 18:37:27
Gönderen: 83rK
8 Yanıt
776 Gösterim
Son İleti 05 Ağustos 2009, 20:23:14
Gönderen: Larenuf
1 Yanıt
1695 Gösterim
Son İleti 25 Kasım 2009, 17:54:48
Gönderen: senisevenyyg