PDA

View Full Version: Opaque từ trong liên kết - sửa chữa nhanh chóng



Marcin Kalak
17-10-12, 11:47
Một từ đục tính năng mới cho các chức danh gây ra vấn đề trong các liên kết. Nhanh chóng sẽ sửa chữa cho vấn đề là:

Mở tập tin bao gồm / vbenterprisetranslator_functions_detection.php
Tìm mã:


$index = 0;
$index_prev = 0;
$index_prev_s = 0;
while (true) {
if($index_prev_s!=$index_prev)
{
$index_prev=$index;
$index_prev_s=$index_prev;
}
$index = strpos($title,$ignored, $index);
$help = substr($title,$index_prev, ($index-$index_prev));
if ($index !== false) {
if(vbet_containsSeparated($title,$ignoredLen, $index)) {
$index_prev_s++;
if((strstr($help,""))) {
$title = substr_replace($title, ''.$ignored.'', $index, $ignoredLen);
$index += VBET_LARGE_LANGTITLE_NT_LENGTH;
}
else
{
$title = substr_replace($title, ''.$ignored.'', $index, $ignoredLen);
$index += VBET_LANGTITLE_NT_LENGTH;
}
}
} else {
break;
}
$index += $ignoredLen;
}
$title = str_replace("[langtitle=".$language."] ", " ", $title);

Thêm trước khi mã:

/*
Thêm sau khi mã:

*/

Điều này sẽ chỉ tắt đục từ tiêu đề. Trong phiên bản kế tiếp, chúng tôi sẽ sửa chữa vấn đề này.

Marcin Kalak
26-10-12, 10:46
Sửa chữa nhanh chóng trước tắt đục từ tiêu đề.
Quick fix này sửa chữa một vấn đề với đục từ tiêu đề:

Mở tập tin bao gồm / vbenterprisetranslator_functions_bbcode.php
Tìm mã:


function vbet_parseTitle(&$title, $removeNotTranslateSection = false, $andUunhtmlSpecialChars = true) {
global $vbulletin;
$tag_list = array();
$tag_list['option']['langtitle'] = array(
'callback' => 'handle_external',
'external_callback' => 'vbet_handle_bbcode_langtitle',
'strip_empty' => true,
'stop_parse' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'strip_space_after' => 0
);
$parser = new vB_BbCodeParser($vbulletin, $tag_list, false);
$result = $parser->do_parse($title, 1, 0, 1, 0, 0, 0);
unset($parser);
if ($removeNotTranslateSection) {
$start = 0;
$result =& vbet_replaceFirstOffset('', '', $result, $start);
$result =& vbet_replaceFirstOffset('','', $ Kết quả, $ bắt đầu);
($ andUunhtmlSpecialChars) {
Kết quả $ = & unhtmlspecialchars ($ kết quả, true);
}
}
trả lại $ kết quả;
}

Thay thế mã:


function vbet_parseTitle(&$title, $removeNotTranslateSection = false, $andUunhtmlSpecialChars = true) {
global $vbulletin;
$tag_list = array();
$tag_list['option']['langtitle'] = array(
'callback' => 'handle_external',
'external_callback' => 'vbet_handle_bbcode_langtitle',
'strip_empty' => true,
'stop_parse' => true,
'disable_smilies' => true,
'disable_wordwrap' => true,
'strip_space_after' => 0
);
$parser = new vB_BbCodeParser($vbulletin, $tag_list, false);
$result = $parser->do_parse($title, 1, 0, 1, 0, 0, 0);
unset($parser);
if ($removeNotTranslateSection) {
$start = 0;
$result =& str_replace(array('', ''),'', $ Kết quả);
($ andUunhtmlSpecialChars) {
Kết quả $ = & unhtmlspecialchars ($ kết quả, true);
}
}
trả lại $ kết quả;
}


Vấn đề này sẽ được cố định trong phiên bản kế tiếp.

Automatic Translations (Powered by Google, Microsoft®, Yandex, SDL Language Cloud, IBM Watson and Apertium):
AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Languages translations supported by vBET 4.10.1