diff --git a/upload/library/config.php b/upload/library/config.php index bd4b2704a..1ac6dc37a 100644 --- a/upload/library/config.php +++ b/upload/library/config.php @@ -69,8 +69,8 @@ $domain_name = 'torrentpier.me'; // enter here your primary domain name of your $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name; // Version info -$bb_cfg['tp_version'] = '2.1.2'; -$bb_cfg['tp_release_date'] = '20-10-2014'; +$bb_cfg['tp_version'] = '2.1.3'; +$bb_cfg['tp_release_date'] = '**-10-2014'; $bb_cfg['tp_release_state'] = 'ALPHA'; // Database diff --git a/upload/library/includes/functions.php b/upload/library/includes/functions.php index 16b090ce2..ff885e61c 100644 --- a/upload/library/includes/functions.php +++ b/upload/library/includes/functions.php @@ -1966,17 +1966,6 @@ function topic_attachment_image($switch_attachment) return ' '; } -function transliterate ($str) -{ - static $translit_table; - - if (!isset($translit_table)) - { - require(DEFAULT_LANG_DIR .'translit_table.php'); - } - return strtr($str, $translit_table); -} - /** * array_combine() * diff --git a/upload/library/includes/functions_upload.php b/upload/library/includes/functions_upload.php index 3fffd4e4c..cd335b294 100644 --- a/upload/library/includes/functions_upload.php +++ b/upload/library/includes/functions_upload.php @@ -109,7 +109,7 @@ class upload_common $this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext)); return false; } - $this->file_ext_id = @$this->ext_ids[$this->file_ext]; + $this->file_ext_id = $this->ext_ids[$this->file_ext]; return true; } diff --git a/upload/library/language/en/main.php b/upload/library/language/en/main.php index 039ea430a..c4bf20e7e 100644 --- a/upload/library/language/en/main.php +++ b/upload/library/language/en/main.php @@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Add bot-message about split to new topic 'to', -); \ No newline at end of file diff --git a/upload/library/language/ru/main.php b/upload/library/language/ru/main.php index c7aeda26a..e021e08a2 100644 --- a/upload/library/language/ru/main.php +++ b/upload/library/language/ru/main.php @@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Добавить сообщение о раз $lang['QUICK_REPLY'] = 'Быстрый ответ'; $lang['INS_NAME_TIP'] = 'Вставить имя или выделенный кусок сообщения.'; $lang['QUOTE_SELECTED'] = 'Цитировать выделенный текст'; -$lang['TRANSLIT_RULES'] = 'Правила транслита'; $lang['QR_ATTACHSIG'] = 'Присоединить подпись'; $lang['QR_NOTIFY'] = 'Уведомлять об ответах'; $lang['QR_DISABLE'] = 'Отключить'; @@ -1517,8 +1516,6 @@ $lang['LIST'] = 'Список'; $lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)'; $lang['LIST_ITEM'] = 'Нумерованный список: [list=]текст[/list] (Ctrl+O)'; $lang['QUOTE_SEL'] = 'Цит.выдел'; -$lang['TRANSLIT'] = 'Транслит'; -$lang['TRANSLIT_TITLE'] = 'Перевести выделение из транслита на русский'; $lang['JAVASCRIPT_ON'] = 'Для отправки сообщений необходимо включить JavaScript'; $lang['NEW'] = 'Новое'; diff --git a/upload/library/language/ru/translit_table.php b/upload/library/language/ru/translit_table.php deleted file mode 100644 index 13273d5fa..000000000 --- a/upload/library/language/ru/translit_table.php +++ /dev/null @@ -1,37 +0,0 @@ - 'e', 'Ё' => 'E', - 'а' => 'a', 'А' => 'A', - 'б' => 'b', 'Б' => 'B', - 'в' => 'v', 'В' => 'V', - 'г' => 'g', 'Г' => 'G', - 'д' => 'd', 'Д' => 'D', - 'е' => 'e', 'Е' => 'E', - 'ж' => 'zh', 'Ж' => 'ZH', - 'з' => 'z', 'З' => 'Z', - 'и' => 'i', 'И' => 'I', - 'й' => 'y', 'Й' => 'Y', - 'к' => 'k', 'К' => 'K', - 'л' => 'l', 'Л' => 'L', - 'м' => 'm', 'М' => 'M', - 'н' => 'n', 'Н' => 'N', - 'о' => 'o', 'О' => 'O', - 'п' => 'p', 'П' => 'P', - 'р' => 'r', 'Р' => 'R', - 'с' => 's', 'С' => 'S', - 'т' => 't', 'Т' => 'T', - 'у' => 'u', 'У' => 'U', - 'ф' => 'f', 'Ф' => 'F', - 'х' => 'h', 'Х' => 'H', - 'ц' => 'c', 'Ц' => 'C', - 'ч' => 'ch', 'Ч' => 'CH', - 'ш' => 'sh', 'Ш' => 'SH', - 'щ' => 'sh', 'Щ' => 'SH', - 'ъ' => "'", 'Ъ' => "'", - 'ы' => 'y', 'Ы' => 'Y', - 'ь' => "'", 'Ь' => "'", - 'э' => 'e', 'Э' => 'E', - 'ю' => 'yu', 'Ю' => 'YU', - 'я' => 'ya', 'Я' => 'YA', -); \ No newline at end of file diff --git a/upload/library/language/uk/main.php b/upload/library/language/uk/main.php index 6ab1a2551..6abd28883 100644 --- a/upload/library/language/uk/main.php +++ b/upload/library/language/uk/main.php @@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Додати повідомлення про $lang['QUICK_REPLY'] = 'Швидка відповідь'; $lang['INS_NAME_TIP'] = "Вставити ім'я або виділений шматок повідомлення."; $lang['QUOTE_SELECTED'] = 'Цитувати виділений текст'; -$lang['TRANSLIT_RULES'] = 'Правила трансліту'; $lang['QR_ATTACHSIG'] = 'Приєднати підпис'; $lang['QR_NOTIFY'] = 'Повідомляти про відповіді'; $lang['QR_DISABLE'] = 'Відключити'; @@ -1517,8 +1516,6 @@ $lang['LIST'] = 'Список'; $lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)'; $lang['LIST_ITEM'] = 'Нумерований список: [list=]текст[/list] (Ctrl+O)'; $lang['QUOTE_SEL'] = 'Цит.виділ'; -$lang['TRANSLIT'] = 'Трансліт'; -$lang['TRANSLIT_TITLE'] = 'Перевести виділення з трансліту на українську'; $lang['JAVASCRIPT_ON'] = 'Для надсилання повідомлень необхідно включити JavaScript'; $lang['NEW'] = 'Нове'; diff --git a/upload/library/language/uk/translit_table.php b/upload/library/language/uk/translit_table.php deleted file mode 100644 index f787ad5a7..000000000 --- a/upload/library/language/uk/translit_table.php +++ /dev/null @@ -1,37 +0,0 @@ - 'ye', 'Є' => 'YE', - 'а' => 'a', 'А' => 'A', - 'б' => 'b', 'Б' => 'B', - 'в' => 'v', 'В' => 'V', - 'г' => 'g', 'Г' => 'G', - 'д' => 'd', 'Д' => 'D', - 'е' => 'e', 'Е' => 'E', - 'ж' => 'zh', 'Ж' => 'ZH', - 'з' => 'z', 'З' => 'Z', - 'и' => 'y', 'И' => 'Y', - 'i' => 'i', 'I' => 'I', - 'ї' => 'yi', 'Ї' => 'YI', - 'й' => 'y', 'Й' => 'Y', - 'к' => 'k', 'К' => 'K', - 'л' => 'l', 'Л' => 'L', - 'м' => 'm', 'М' => 'M', - 'н' => 'n', 'Н' => 'N', - 'о' => 'o', 'О' => 'O', - 'п' => 'p', 'П' => 'P', - 'р' => 'r', 'Р' => 'R', - 'с' => 's', 'С' => 'S', - 'т' => 't', 'Т' => 'T', - 'у' => 'u', 'У' => 'U', - 'ф' => 'f', 'Ф' => 'F', - 'х' => 'h', 'Х' => 'H', - 'ц' => 'c', 'Ц' => 'C', - 'ч' => 'ch', 'Ч' => 'CH', - 'ш' => 'sh', 'Ш' => 'SH', - 'щ' => 'sh', 'Щ' => 'SH', - 'ь' => "'", 'Ь' => "'", - 'ю' => 'yu', 'Ю' => 'YU', - 'я' => 'ya', 'Я' => 'YA', - "'" => "'", -); \ No newline at end of file diff --git a/upload/styles/js/bbcode.js b/upload/styles/js/bbcode.js index 4ade8fcb6..9b8ddcb4c 100644 --- a/upload/styles/js/bbcode.js +++ b/upload/styles/js/bbcode.js @@ -453,119 +453,4 @@ function initMedia(context) $(document).ready(function(){ $('div.post_wrap, div.signature').each(function(){ initPostBBCode( $(this) ) }); -}); - -// One character letters -var t_table1 = "ABVGDEZIJKLMNOPRSTUFXHCYWabvgdezijklmnoprstufxhcyw'#"; -var w_table1 = "АБВГДЕЗИЙКЛМНОПРСТУФХХЦЫЩабвгдезийклмнопрстуфххцыщьъ"; - -// Two character letters -var t_table2 = "EHSZYOJOZHCHSHYUJUYAJAehszyojozhchshyujuyajaEhSzYoJoZhChShYuJuYaJa"; -var w_table2 = "ЭЩЁЁЖЧШЮЮЯЯэщёёжчшююяяЭЩЁЁЖЧШЮЮЯЯ"; - -var tagArray = [ - 'code', '', - 'img', '', - 'quote', "(=[\"']?[^"+String.fromCharCode(92,93)+"]+)?", - 'email', "(=[\"']?[a-zA-Z0-9_.-]+@?[a-zA-Z0-9_.-]+[\"']?)?", - 'url', "(=[\"']?[^ \"'"+String.fromCharCode(92,93)+"]*[\"']?)?" -]; - -function translit2win (str) -{ - var len = str.length; - var new_str = ""; - - for (i = 0; i < len; i++) - { - /* non-translatable text must be in ^ */ - if(str.substr(i).indexOf("^")==0){ - end_len=str.substr(i+1).indexOf("^")+2; - if (end_len>1){ - new_str+=str.substr(i,end_len); - i += end_len - 1; - continue; - } - } - - /* Skipping emoticons */ - if(str.substr(i).indexOf(":")==0){ - iEnd = str.substr(i+1).indexOf(":")+2; - if (iEnd > 1 && str.substr(i,iEnd).match("^:[a-zA-Z0-9]+:$")){ - new_str += str.substr(i,iEnd); - i += iEnd - 1; - continue; - } - } - - /* Skipping http|news|ftp:/.../ links */ - rExp = new RegExp("^((http|https|news|ftp|ed2k):\\/\\/[\\/a-zA-Z0-9%_?.:;&#|\(\)+=@-]+)","i"); - if (newArr = str.substr(i).match(rExp)){ - new_str += newArr[1]; - i += newArr[1].length - 1; - continue; - } - - /* Skipping FONT, COLOR, SIZE tags */ - rExp = new RegExp("^(\\[\\/?(b|i|u|s|font(=[a-z0-9]+)?|size(=[0-9]+)?|color(=#?[a-z0-9]+)?)\\])","i"); - if (newArr = str.substr(i).match(rExp)){ - new_str += newArr[1]; - i += newArr[1].length - 1; - continue; - } - - /* Skipping [QUOTE]..[/QUOTE], [IMG]..[/IMG], [CODE]..[/CODE], [SQL]..[/SQL], [EMAIL]..[/EMAIL] tags */ - bSkip = false; - for(j = 0; j < tagArray.length; j += 2){ - rExp = new RegExp("^(\\["+tagArray[j]+tagArray[j+1]+"\\])","i"); - if (newArr = str.substr(i).match(rExp)){ - rExp = new RegExp("\\[\\/" + tagArray[j] + "\\]", "i"); - if (iEnd = str.substr(i + newArr[1].length + 2).search(rExp)){ - end_len = iEnd + newArr[1].length + tagArray[j].length + 4; - new_str += str.substr(i,end_len); - i += end_len - 1; - bSkip = true; - } - } - if(bSkip)break; - } - if(bSkip)continue; - - // Check for 2-character letters - is2char=false; - if (i < len-1) { - for(j = 0; j < w_table2.length; j++) - { - if(str.substr(i, 2) == t_table2.substr(j*2,2)) { - new_str+= w_table2.substr(j, 1); - i++; - is2char=true; - break; - } - } - } - - if(!is2char) { - // Convert one-character letter - var c = str.substr(i, 1); - var pos = t_table1.indexOf(c); - if (pos < 0) - new_str+= c; - else - new_str+= w_table1.substr(pos, 1); - } - } - - return new_str; -} - -function transliterate (msg, e) -{ - if (e) e.disabled = true; - setTimeout(function() { - if (!bbcode.surround('', '', translit2win)) { - msg.value = translit2win(msg.value); - } - if (e) e.disabled = false; - }, 1); -} \ No newline at end of file +}); \ No newline at end of file diff --git a/upload/styles/templates/default/css/main.css b/upload/styles/templates/default/css/main.css index 5ca5875eb..81dc725e4 100644 --- a/upload/styles/templates/default/css/main.css +++ b/upload/styles/templates/default/css/main.css @@ -465,16 +465,11 @@ table.pm_box_size { width: 175px; margin: 8px 2px; } .pm_box_size b { font-size: 10px; } .pm_nav td { padding: 4px; font-size: 14px; font-weight: bold; } -table.translit_expl th { - width: 30px; padding-right: 8px; font-weight: bold; text-align: right; -} -table.translit_expl td { width: 14px; } - table.user_contacts th { text-align: right; white-space: nowrap; } - .user_contacts td { text-align: left; padding: 2px 6px; white-space: nowrap; } + .user_contacts td { text-align: left; padding: 2px 6px; white-space: nowrap; } table.user_details th { padding: 2px 6px; text-align: right; vertical-align: top; } - .user_details td { width: 70%; } + .user_details td { width: 70%; } table.usercp_register h6 { margin: 0.3em 0.4em; color: #444444; line-height: 100%; diff --git a/upload/styles/templates/default/posting_editor.tpl b/upload/styles/templates/default/posting_editor.tpl index 7d5d8838b..78a88d1f3 100644 --- a/upload/styles/templates/default/posting_editor.tpl +++ b/upload/styles/templates/default/posting_editor.tpl @@ -85,63 +85,16 @@ ajax.callback.posts = function(data) {   -   - - ? - + - - - - - +