Archive for the ‘html’ Category

<?php
/*

Plugin Name: cp1251 to utf8 Mongolian cryllic

*/
function cp1251_utf8($word)
{
$cyr_lower_chars = array(
‘е’,’щ’,’ф’,’ц’,’у’,’ж’,’э’,
‘н’,’г’,’ш’,’ү’,’з’,’к’,’ъ’,
‘й’,’ы’,’б’,’ө’,’а’,’х’,’р’,
‘о’,’л’,’д’,’п’,’я’,’ч’,’ё’,
‘с’,’м’,’и’,’т’,’ь’,’в’,’ю’,);

$latin_lower_chars = array(
‘å’,’ù’,’ô’,’ö’,’ó’,’æ’,’ý’,
‘í’,’ã’,’ø’,’¿’,’ç’,’ê’,’ú’,
‘é’,’û’,’á’,’º’,’à’,’õ’,’ð’,
‘î’,’ë’,’ä’,’ï’,’ÿ’,’÷’,’¸’,
‘ñ’,’ì’,’è’,’ò’,’ü’,’â’,’þ’,);

$cyr_upper_chars = array(
‘Е’,’Щ’,’Ф’,’Ц’,’У’,’Ж’,’Э’,
‘Н’,’Г’,’Ш’,’Ү’,’З’,’К’,’Ъ’,
‘Й’,’Ы’,’Б’,’Ө’,’А’,’Х’,’Р’,
‘О’,’Л’,’Д’,’П’,’Я’,’Ч’,’Ё’,
‘С’,’М’,’И’,’Т’,’Ь’,’В’,’Ю’,);

$latin_upper_chars = array(
‘Å’,’Ù’,’Ô’,’Ö’,’Ó’,’Æ’,’Ý’,
‘Í’,’Ã’,’Ø’,’¯’,’Ç’,’Ê’,’Ú’,
‘É’,’Û’,’Á’,’ª’,’À’,’Õ’,’Ð’,
‘Î’,’Ë’,’Ä’,’Ï’,’ß’,’×’,’¨’,
‘Ñ’,’Ì’,’È’,’Ò’,’Ü’,’Â’,’Þ’,);

//replacing lower cyrillic
$word = str_replace($latin_lower_chars, $cyr_lower_chars, $word);
//replacing upper cyrillic
$word = str_replace($latin_upper_chars, $cyr_upper_chars, $word);
return $word;
}

function replacecontent($data) {
global $post_ID;

$data[‘post_content’] = cp1251_utf8($data[‘post_content’]);

return $data;
}

add_filter(‘wp_insert_post_data’, ‘replacecontent’, 10);

татаж авах

http://wordpress.org/extend/plugins/cp1251-to-utf-mongolian/

 <html xmlns="http://www.w3.org/1999/xhtml">
 <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Untitled Document</title> 
<script src="http://code.jquery.com/jquery-1.5.2.min.js" type="text/javascript"></script> 
<style> 
*{ margin:0; padding:0;} 
.menu li ul{ display:none; position:absolute; float:left; width:120px;} 
.menu li{ float:left; padding:5px;} 
</style> 
<script type="text/javascript"> 
$().ready(function(){ 
$(".menu li, .menu li a").hover( 
function(){ $(this).children("ul").show(); 
}, 
function(){ $(this).children("ul").hide(); 
} );   
}); </script> 
</head>   
<body>
 <ul class="menu"> 
<li><a href="#">products</a>
 <ul> 
 <li><a href="#">khaantea</a></li>
 <li><a href="#">OGedei coffee</a></li> 
 </ul> 
</li> 
<li><a href="#">About us</a></li> 
</ul> 
</body> </html>