Tekil Mesaj gösterimi
  #1 (permalink)  
Alt 17.05.08, 05:00 AM
marmaradizayn - ait Kullanıcı Resmi (Avatar)
marmaradizayn marmaradizayn isimli Üye şimdilik offline konumundadır
Sempron
 
Üyelik tarihi: Mar 2008
Nerden: türkiye
Mesajlar: 40
Tecrübe Puanı: 0
marmaradizayn is on a distinguished road
marmaradizayn - MSN üzeri Mesaj gönder
Awbs Kayıtta Türkçe Karakter Sorununun Çözümü

Merhaba Arkadaşlar elimden geldiği kadarıyla sizlere yardımcı olmaya çalışıyım. bu konuda birçok firma sıkıntı yaşamakta. awbs kayıt esnasında türkçe karakterleri otomatik olarak ngilizce karaktere dönüştürmeyi göstericem. işlem script koduyla gerçekleşmekte.

örnek için: Web hosting - Domain- AWBS Tasarım - Radyo Hosting - Web Dizayn - Marmara Dizayn


İlk olarak yapmamız gereken kullandığımız awbs temamız hangisiyse onun bulunduğu klasöre gitmek ve createacct.php dosyasını editlemek...

dosyayı açtıktan sonra

<?=$header?>
<?=$top?>

Satırının hemen altına şu kodu ekliyoruz.

Kod:
<head>
<script language="Javascript">
function iso88599Escape(strText)
{
strText=escape(strText);
strText=strText.replace(/%20/g," ");
strText=strText.replace(/Ş/g,"S");
strText=strText.replace(/ş/g,"s");
strText=strText.replace(/%0A/g," ");
strText=strText.replace(/%3A/g,":");
strText=strText.replace(/%2C/g,",");
strText=strText.replace(/%3B/g,";");
strText=strText.replace(/%21/g,"!");
strText=strText.replace(/%5E/g,"^");
strText=strText.replace(/%26/g,"&");
strText=strText.replace(/%28/g,"(");
strText=strText.replace(/%29/g,")");
strText=strText.replace(/%3D/g,"=");
strText=strText.replace(/%3F/g,"?");
strText=strText.replace(/%3C/g,"<");
strText=strText.replace(/%3E/g,">");
strText=strText.replace(/%23/g,"#");
strText=strText.replace(/%24/g,"$");
strText=strText.replace(/%7B/g,"{");
strText=strText.replace(/%5B/g,"[");
strText=strText.replace(/%5D/g,"]");
strText=strText.replace(/%7D/g,"}");
strText=strText.replace(/%7C/g,"|");
strText=strText.replace(/%C7/g,"C");
strText=strText.replace(/%E7/g,"c");
strText=strText.replace(/%BD/g,"½");
strText=strText.replace(/%A3/g,"£");
strText=strText.replace(/%5C/g,"/");
strText=strText.replace(/%D6/g,"O");
strText=strText.replace(/%F6/g,"o");
strText=strText.replace(/%27/g,"'");
strText=strText.replace(/İ/g,"I");
strText=strText.replace(/ı/g,"i");
strText=strText.replace(/%E9/g,"é");
strText=strText.replace(/Ğ/g,"G");
strText=strText.replace(/ğ/g,"g");
strText=strText.replace(/%22/g,'"');
strText=strText.replace(/%DC/g,"U");
strText=strText.replace(/%FC/g,"u");
return strText;
}
</script>
</head>
Kodu ekledikten sonra yapılması gereken işlem basit function kodunu çağırmak hemen bir örnekle anlatmaya çalışıyım.

Mesela Kullanıcı adı:

orjinal kodu şu şekildedir.

Kod:
<td align="right" valign="top"><br> <b class="red">*</b><?=USERNAME?>:&nbsp;&nbsp;</td>
                      <td class="smallblue"><br> <input type="text" class="formfield" name="newuid"  maxlength="16"
        value="<?=$newuid?>"> <br>
Bizim yapacağımız işlem sadece value="<?=$newuid?>"> kısmıdır.

Yeni kodumuz şu şekilde olmalı

Kod:
<td align="right" valign="top"><br> <b class="red">*</b><?=USERNAME?>:&nbsp;&nbsp;</td>
                      <td class="smallblue"><br> <input type="text" class="formfield" name="newuid"  maxlength="16"
        value="" onKeyUp="this.value=iso88599Escape(this.value)"<?=$newuid?>"> <br>
value= den sonra eklenecek kod: "" onKeyUp="this.value=iso88599Escape(this.value) dur


Umarım yeterince açıklayıcı ve faydalı olmuşumdur. işlemde sorun yaşayanlar. buraya yazsınlar yardımcı olmaya çalışalım.
__________________
http://www.marmaradizayn.net
Alıntı ile Cevapla