MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completely customizable, expandable and suitable for all needs.
A2Hosting
Moderators: Moderators
Forum RSS feedReply
Translated from Latin to Cyrillic
AuthorText
AlexVot
Senior Member

Posts: 116
Contributes: 215

Gender: _MALE_
Online: No

Version: 4.0.2
Country: Russia
Languages: Rus, Eng
Date: 26/10/2009 16:12
Translated from Latin to Cyrillic
#post22330
Site url: http://rufilmz.ru
MemHT version: 4.0.1
Hosting OS: Linux
PHP and MySQL versions: 5.2.9 & 5.0.45
Installed addons/scripts: Spoiler, TV, LightBox
Error: Translated from Latin to Cyrillic

Was found in the engine serious errors tag .. The presence of more than 2 words, some Cyrillic letters and punctuation marks and tags do not work .. That you fix

Edit the file inc / inc_function.php

Find
//Thanks to paulo89, JPappi and BLaCk.DeWiL for their help with chars

And to replace all the lines
//===========================================
//Validation / Check
//===========================================

At this
code
function mem_urlencode($str) {
        global $langdata;
       
        if (isset($langdata['url_pat']) AND @sizeof($langdata['url_pat']) == @sizeof($langdata['url_rep'])) {
                $str = preg_replace($langdata['url_pat'],$langdata['url_rep'],$str);
        }       
         $alias = preg_replace('/&#x([0-9a-f]{1,7});/ei', 'chr(hexdec("\1"))', $str);
 $alias = preg_replace('/&#([0-9]{1,7});/e', 'chr("\1")', $alias);

if (preg_match("/[а-яё]+/i",$alias)) {

 static $replace_array = array(
 
 'а' => 'a',   'б' => 'b',   'в' => 'v',
  'г' => 'g',   'д' => 'd',   'е' => 'e',
  'ё' => 'yo',   'ж' => 'zh''з' => 'z',
  'и' => 'i',   'й' => 'j',   'к' => 'k',
  'л' => 'l',   'м' => 'm',   'н' => 'n',
  'о' => 'o',   'п' => 'p',   'р' => 'r',
  'с' => 's',   'т' => 't',   'у' => 'u',
  'ф' => 'f',   'х' => 'h',   'ц' => 'c',
  'ч' => 'ch''ш' => 'sh''щ' => 'sch',
  'ь' => '7o''ы' => 'y',   'ъ' => '#',
  'э' => 'je',   'ю' => 'ju''я' => 'ja',

  'А' => 'A',   'Б' => 'B',   'В' => 'V',
  'Г' => 'G',   'Д' => 'D',   'Е' => 'E',
  'Ё' => 'YO',   'Ж' => 'ZH''З' => 'Z',
  'И' => 'I',   'Й' => 'J',   'К' => 'K',
  'Л' => 'L',   'М' => 'M',   'Н' => 'N',
  'О' => 'O',   'П' => 'P',   'Р' => 'R',
  'С' => 'S',   'Т' => 'T',   'У' => 'U',
  'Ф' => 'F',   'Х' => 'H',   'Ц' => 'C',
  'Ч' => 'CH''Ш' => 'SH''Щ' => 'SCH',
  'Ь' => '7o''Ы' => 'Y',   'Ъ' => '#',
  'Э' => 'JE',   'Ю' => 'JU''Я' => 'JA',
 
  '&' => 'and',''' => '', '(' => '(', ')' => ')', ':' => ':'
 );
 $alias = strtr($alias, $replace_array);

 $alias = strip_tags($alias); // strip HTML
 //$alias = preg_replace('
/[^.%A-Za-z0-9 _-]/', '', $alias); // strip non-alphanumeric characters
 $alias = preg_replace('
/s+/', ' ', $alias); // convert white-space to dash
 $alias = preg_replace('
/-+/', '-', $alias);  // convert multiple dashes to one
 $alias = trim($alias, '
-'); // trim excess
  $str = '
ru-'.$alias;}
        return urlencode($str);

}
function mem_deurlencode($str) {
        global $langdata;
       
        if (isset($langdata['
url_pat']) AND @sizeof($langdata['url_pat']) == @sizeof($langdata['url_rep'])) {
                $str = preg_replace($langdata['
url_pat'],$langdata['url_rep'],$str);
        }       
 // Convert all numeric entities to their actual character
 $alias = preg_replace('
/&#x([0-9a-f]{1,7});/ei', 'chr(hexdec("\1"))', $str);
 $alias = preg_replace('/&#([0-9]{1,7});/e', 'chr("\1")', $alias);

if (preg_match ("/bru-b/", $alias)) {
 static $replace_array = array(
  'ru-'=>'',
  'a'=>'а' ,   'b'=>'б' ,   'v'=>'в',
  'g'=>'г',   'd'=>'д' ,   'e'=>'е'  ,
  'yo'=>'ё' ,   'zh'=>'ж''z'=>'з' ,
  'i'=>'и' ,   'j'=>'й' ,   'k'=>'к'  ,
  'l'=>'л' ,   'm'=>'м' ,   'n'=>'н'  ,
  'o'=>'о' ,   'p'=>'п'  ,   'r'=>'р'  ,
  's'=>'с' ,   't'=>'т'  ,   'u'=>'у' ,
  'f'=>'ф' ,   'h'=>'х' ,   'c'=>'ц'  ,
  'ch'=>'ч''sh'=>'ш'  ,  'sch'=>'щ' ,
  '7o'=>'ь''y'=>'ы'  ,   '#'=>'ъ' ,
  'je'=>'э' ,   'ju'=>'ю''ja'=>'я' ,

  'A'=>'А' ,   'B'=>'Б' ,   'V'=>'В' ,
  'G'=>'Г' ,   'D'=>'Д' ,   'E'=>'Е' ,
  'YO'=>'Ё' ,   'ZH'=>'Ж''Z'=>'З' ,
  'I'=>'И'  ,   'J'=>'Й' ,   'K'=>'К'  ,
  'L'=>'Л'  ,   'M'=>'М' ,   'N'=>'Н' ,
  'O'=>'О'  ,   'P'=>'П' ,   'R'=>'Р'  ,
  'S'=>'С'  ,   'T'=>'Т' ,   'U'=>'У'  ,
  'F'=>'Ф'  ,   'H'=>'Х' ,   'C'=>'Ц'  ,
  'CH'=>'Ч''SH'=>'Ш''SCH'=>'Щ'  ,
  '7o'=>'Ь''Y'=>'Ы' ,   '#'=>'Ъ'  ,
  'JE'=>'Э'  ,   'JU'=>'Ю''JA'=>'Я'  ,
 
 
 
 
 
  '&' => 'and',''' => '', '(' => '(', ')' => ')', ':' => ':'
 );
 $alias = strtr($alias, $replace_array);

 $str = trim($alias, '
-'); // trim excess
}

        return $str;
}

//Added in 3.8.5
function mem_urldecode($str) {
        return urldecode($str);
}


Get all the Russian support - memht.org.ru
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

mem

Posts: 7243
Contributes: 4800

Gender: _MALE_
Online: No

Languages: English, Italiano, Македонски, Српски
Date: 26/10/2009 18:27
Re: Translated from Latin to Cyrillic
#post22331
Thank you
Follow me on twitter if you want to be updated on the MemHT 5 development.
Delete Edit Quote
 
asovetov
Junior Member

Posts: 48
Contributes: 50

Gender: _MALE_
Online: No

Languages: Russian
Country: Russia
Date: 26/10/2009 20:25
Re: Translated from Latin to Cyrillic
#post22332
Thanks AlexVot ;-)
Русскоязычная поддержка, обращайтесь в личку или создавайте тут топики и кидайте в личку ссылку, а то могу не найти
Russian support - Русская поддержка
Russian Language assistance, contact PM or make thread and post link in PM.
Delete Edit Quote
 
starkiev
Just arrived

Posts: 4
Contributes: 4

Gender: _NEUTRAL_
Online: No
Date: 25/04/2011 21:36
Re: Translated from Latin to Cyrillic
#post24972
mem, as I can see you didn't put this code into the 4.0.2 release
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

mem

Posts: 7243
Contributes: 4800

Gender: _MALE_
Online: No

Languages: English, Italiano, Македонски, Српски
Date: 26/04/2011 17:50
Re: Translated from Latin to Cyrillic
#post24974
Nope, i added just one security fix in 4.0.2. People who need it can find it here in the forums within sticky threads.
Edited: 26/04/2011 17:50
Follow me on twitter if you want to be updated on the MemHT 5 development.
Delete Edit Quote
 
Reply
Tags Cloud
Twitter updates...
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.107.179.232

Username
Password
MemHT Wiki
Language
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo