İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

wp de html linklerde büyük harf kullanma ?

pigeon

0
İyinet Üyesi
Katılım
22 Şubat 2005
Mesajlar
2,873
Reaction score
12
Konum
Ankara
html sitemi wordpress e çeviriyorum ancak eski bazı linkler Forumİyinet.html şeklinde. ancak wp de linklerde büyük harf kullanamıyorum. forumiyinet.html şeklinde yaratıyor uzantıyı.
bunun bir yolu var mıdır?
 

Mywedding

1
İyinet Üyesi
Katılım
26 Eylül 2006
Mesajlar
5,893
Reaction score
96
Konum
www.odatv.com
belki htaccess le düzeltebilirsin, bide sql e giden kodlara ekleme olursa yapılır, tabii bilen bir arkadaş olması lazım.
 

selim61

0
İyinet Üyesi
Onaylı Üye
Katılım
10 Mayıs 2006
Mesajlar
5,299
Reaction score
11
Konum
<?=selim61?>
html sitemi wordpress e çeviriyorum ancak eski bazı linkler Forumİyinet.html şeklinde. ancak wp de linklerde büyük harf kullanamıyorum. forumiyinet.html şeklinde yaratıyor uzantıyı.
bunun bir yolu var mıdır?
wp de o tarz link kullanamazsın yada baya bi ugraşman gerekiyor.
http://codex.wordpress.org/Using_Permalinks
%postname% de oynamalara gidebilirsin
siten.com/%post_id%/%postname%.html yapıcaksan tabi. id yi okutarak gerisi formalite yapabilirsin ama sadece siten.com/Forumİyinet.html yapman kanımca mümkün değil.
%year%
The year of the post, four digits, for example 2004
%monthnum%
Month of the year, for example 05
%day%
Day of the month, for example 28
%hour%
Hour of the day, for example 15
%minute%
Minute of the hour, for example 43
%second%
Second of the minute, for example 33
%postname%
A sanitized version of the title of the post. So “This Is A Great Post!” becomes “this-is-a-great-post” in the URI (see note below)
%post_id%
The unique ID # of the post, for example 423
%category%
A sanitized version of the category name. Nested sub-categories appear as nested directories in the URI.
%author%
A sanitized version of the author name.
 

selim61

0
İyinet Üyesi
Onaylı Üye
Katılım
10 Mayıs 2006
Mesajlar
5,299
Reaction score
11
Konum
<?=selim61?>
çok basit bi yaklaşımla ;wp-includes altında post.php
PHP:
$wpdb->query(
"INSERT IGNORE INTO $wpdb->posts
(post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt,  post_status, post_type, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type)
VALUES
('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')");
$post_name yi kendimize göre değiştirebiliriz.sayfanın başına bi fonksiyon atarak kendi url mizi kendimiz yaparız.
PHP:
function StripUrl($title)//senin zevkine kalmış
{
$title = str_replace("#", "", $title);
$title = str_replace("/", "", $title);
$title = str_replace("$", "", $title);
$title = str_replace("&", "", $title);
$title = str_replace("&", "", $title);
$title = str_replace("+", "", $title);
$title = str_replace(",", "", $title);
$title = str_replace(":", "", $title);
$title = str_replace(";", "", $title);
$title = str_replace("=", "", $title);
$title = str_replace("?", "", $title);
$title = str_replace("@", "-", $title);
$title = str_replace("<", "", $title);
$title = str_replace(">", "", $title);
$title = str_replace("%", "", $title);
$title = str_replace("{", "", $title);
$title = str_replace("}", "", $title);
$title = str_replace("|", "", $title);
$title = str_replace("\\", "", $title);
$title = str_replace("^", "", $title);
$title = str_replace("~", "", $title);
$title = str_replace("[", "", $title);
$title = str_replace("]", "", $title);
$title = str_replace("`", "", $title);
$title = str_replace("'", "", $title);
$title = str_replace("\"", "", $title);
$title = str_replace(" ", "-", $title);
return $title;//ucwords le felan ilk harfi büyük yapabilirsin.
}
$post_name yerinede StripUrl($post_title) yazarsak , konu yazarken başlığı nasıl yazmışsak irili ufaklı db ye post_name i öyle ekler.Localde linkler sorunsuzdu ama mutlaka bi yerde patlak verir :D
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Üst