| Gökhan YILDIZ |
|
|---|---|
|
http://www.cotonti.com/docs/en/admin/url_modification?d=15 sayfasında verilen modifikasyonu başarılı bir şekilde uyguladım.Aynı şeyleri forum için yapmaya kalktım fakat forum kategorisinin üzerine gelince sadece site adini(http://www.siteadi.com olarak) gosteriyor.fakat elle http://www.siteadi.com/forum/ olarak girdiğimde herhangi bir problem yok.
Yaptığım uygulamada functions.php'ye ilk önce function degistir($text)
{
//$text = preg_replace("#&\#([0-9]*);#ie","_",$text);
$text = html_entity_decode($text);
$text = str_replace(" / ","_",$text);
$text = str_replace("'","",$text);
$text = str_replace("\"","",$text);
$text = str_replace("/","_",$text);
$text = str_replace("'","_",$text);
$text = str_replace(" - ","_",$text);
$text = str_replace("-","_",$text);
$text = str_replace(" ","_",$text);
$text = str_replace( "ä", "ae", $text);
$text = str_replace( "ç", "c", $text);
$text = str_replace( "Ç", "c", $text);
$text = str_replace( "ğ", "g", $text);
$text = str_replace( "ı", "i", $text);
$text = str_replace( "İ", "i", $text);
$text = str_replace( "ö", "o", $text);
$text = str_replace( "Ö", "o", $text);
$text = str_replace( "ş", "s", $text);
$text = str_replace( "Ş", "s", $text);
$text = str_replace( "ü", "u", $text);
$text = str_replace( "Ü", "u", $text);
$text = str_replace( "&", "ve", $text);
$text = str_replace( "%", "yuzde", $text);
$text = str_replace( "!", "dikkat", $text);
$text = str_replace( "?", "soru", $text);
$text = str_replace( "ó", "o", $text);
$text = ereg_replace("[^A-Za-z0-9_-]", "", $text);
$text = str_replace("____","_",$text);
$text = str_replace("___","_",$text);
$text = str_replace("__","_",$text);
$text = strtolower($text);
return $text;
}
kodlarını ekleyip linklerdeki karakter hatalarını düzeltmesini istedim.Daha sonrafunction sed_forum_section_url(&$args)
{
global $cfg, $fsn, $row, $row1, $master, $title;
$stitle = $title;
$url = parse_url($cfg['mainurl']);
$www = strstr($url['host'], 'www.') ? 'www' : '';
$domain = str_replace('www.', '', $url['host']);
$path = $url['path'];
$title = (!empty($fsn['fs_title'])) ? $fsn['fs_title'] : $row['fs_title'];
$title = (empty($title)) ? $stitle : $title;
$title = (empty($title)) ? $master[1] : $title;
$title = (empty($title)) ? $row1['fs_title'] : $title;
$patterns = array(
'/forums.php?m=topics&q={$id}',
'/forum/{$title}-s{$id}.html',
'http://forum.{$domain}/{$title}-s{$id}.html',
'/forum/{$title}-s{$id}.html'
);
$url = str_replace(array('{$id}', '{$title}', '{$domain}'), array($args['s'], degistir($title), $domain), $patterns[$cfg['urls_pattern'] - 1]);
unset($args['s'], $master);
return $url;
}
function sed_forum_topic_url(&$args)
{
global $cfg, $fsnn, $fsn, $row, $ft_title;
$url = parse_url($cfg['mainurl']);
$www = strstr($url['host'], 'www.') ? 'www' : '';
$domain = str_replace('www.', '', $url['host']);
$path = $url['path'];
$title = (!empty($fsnn['fs_lt_id'])) ? $fsnn['fs_lt_id'] : $fsn['fs_lt_id'];
$title = (empty($title)) ? $row['ft_title'] : $title;
$title = (empty($title)) ? $ft_title : $title;
$patterns = array(
'/forums.php?m=posts&q={$id}',
'/forum/{$title}-t{$id}.html',
'http://forum.{$domain}/{$title}-t{$id}.html',
'/forum/{$title}-t{$id}.html'
);
$url = str_replace(array('{$id}', '{$title}', '{$domain}'), array($args['q'], degistir($title), $domain), $patterns[$cfg['urls_pattern'] - 1]);
unset($args['q']);
return $url;
}
kodunu ekledim.yönetim paneli >> diğer >> urls kısmına da area forums parametres m=topics&s=* format {sed_forum_section_url()} area forums parametres m=posts&q=* format {cot_forum_topic_url()} kodlarını ekledim. htaccess dosyasına RewriteCond %{HTTP_HOST} !^(www\.)?([^.]+)\.(com)?$
RewriteCond %{HTTP_HOST} ^forum\.([^.]+)\.(com)?$
RewriteRule ^$ forums.php [L]
RewriteCond %{HTTP_HOST} !^(www\.)?([^.]+)\.(com)?$
RewriteCond %{HTTP_HOST} ^forum\.([^.]+)\.(com)?$
RewriteRule ^(.*)-t([0-9]*)\.html(.*)$ forums.php?m=posts&q=$2$3 [L]
RewriteCond %{HTTP_HOST} !^(www\.)?([^.]+)\.(com)?$
RewriteCond %{HTTP_HOST} ^forum\.([^.]+)\.(com)?$
RewriteRule ^(.*)-f([0-9]*)\.html(.*)$ forums.php?m=topics&s=$2$3 [L]
RewriteCond %{HTTP_HOST} !^(www\.)?([^.]+)\.(com)?$
RewriteCond %{HTTP_HOST} ^forum\.([^.]+)\.(com)?$
RewriteRule ^(.*)-s([0-9]*)\.html$ forums.php?m=topics&s=$2$3 [L]
RewriteRule ^forum/$ forums.php [L]
RewriteRule ^forum/(.*)-t([0-9]*)\.html(.*)$ forums.php?m=posts&q=$2$3 [L]
RewriteRule ^forum/(.*)-f([0-9]*)\.html(.*)$ forums.php?m=topics&s=$2$3 [L]
RewriteRule ^forum/(.*)-s([0-9]*)\.html$ forums.php?m=topics&s=$2$3 [L]
kodlarını ekledim. Sorunu nerede yaşıyorum kestiremedim bir türlü.Yardım ederseniz sevinirim. Gökhan YILDIZ
|
| fedai |
|
|---|---|
|
http://www.seditioforge.com/plugins/general/advanced-rewrite-extension-1.0.2-i44.html
burdaki eklentiyi indirip system/rewrite.php yi inceleyip uyarlama yapabilirsin. url modifikasyonunu henüz uygulamadığım için bişey diyemeyeceğim "peace in the homeland, peace in the world" K.ATATÜRK
personal blog: http://www.sametbal.net |
| Gökhan YILDIZ |
|
|---|---|
|
o eklentinin hatalarını gidermeyi ve kurulumunu zaten seditio-tr de ben anlatmıştım.2 si çok farklı yapıya sahip. @lombergar nicki üyenin anlattığı url modifikasyonu başlığından yararlanarak yaptım fakat forumlarda hata alıyorum.
Ayrıca Türkçe bölümü açılmış, geliştiriciler de de türkler var fakat yeterli destek yok malesef ![]() Gökhan YILDIZ
|
| MUST! |
|
|---|---|
|
gökhan bey bu url modifikasyonunu ben uygulayamadım. forumları geçtim sayfalara bile uygulayamadım. :S bu konuda yardımcı olabilirmisin. yani resimli veya videolu anlatım yaparsınız sevinirim
Added 16 minutes later: yada urltrans örneğinizle htaccesinizi burada örnek olarak gösterebilirmisiniz?
Bu gönderi MUST! tarafından düzenlendi (2010-03-28 20:00, 15 yıllar önce)
|
| Gökhan YILDIZ |
|
|---|---|
|
buyrun bunu deneyin http://www.cotonti.com/datas/users/mod_rewrite_289.rar
Gökhan YILDIZ
|
| APHaCHi |
|
|---|---|
|
çok teşekkürler saolun
Jquery Öğrenmek isteyen arkadaşlara; jQuery Öğren [url=http://zingocan.com][i][b]jQuery Web Design Blog[/b][/i][/url]
Bu gönderi APHaCHi tarafından düzenlendi (2010-03-29 12:19, 15 yıllar önce)
|
| MUST! |
|
|---|---|
|
gökhan hocam sağolun. peki titleyi çekemiyormuyuz? eğer tityeli çekemiyorsak ben seov1 i cotontiye uygulamaya çalışacağım.
|
| Gökhan YILDIZ |
|
|---|---|
|
auto alias kullanabilirsin. Bu sayede başlığı otomatik çeker.
Gökhan YILDIZ
|
| MUST! |
|
|---|---|
|
dediğiniz gibi sayfalarda alyans kullandım fakat bu defada olmadı. aynen şöyşle oldu önrğin konu adı "deneme örmeği" olsun. ben bunu alyansa yazdığımda siteadı.com/news/denemeornei bu şekilde çıktı hem tr karakterleri sildi hemde bitişik yazdı. oysa bu şekilde olması gerekmezmi siteadı.com/news/deneme-ornegi/
|