vbo_tn; $vbo_app = VikBooking::getVboApplication(); $vbo_app->loadVisualEditorAssets(); $editor = JEditor::getInstance(JFactory::getApplication()->get('editor')); $langs = $vbo_tn->getLanguagesList(); $xml_tables = $vbo_tn->getTranslationTables(); $active_table = ''; $active_table_key = ''; // JS lang vars JText::script('VBO_COPY_ORIGINAL_TN'); JText::script('VCM_TRANSLATE'); if (!(count($langs) > 1)) { //Error: only one language is published. Translations are useless ?>

getError())) { //Error: XML file not readable or errors occurred ?>

getError(); ?>

replacePrefix($table); } /** * Allows to filter/search translations by a key-search value. * * @since 1.16.6 (J) - 1.6.6 (WP) */ $keysearch = VikRequest::getString('keysearch', '', 'request'); $vbo_tn->setKeySearch($keysearch); ?>
$lang) { $is_def = ($ltag == $vbo_tn->default_lang); $lcountry = substr($ltag, 0, 2); $flag = ''; if (VBOPlatformDetection::isJoomla() && is_file(JPATH_SITE . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . 'mod_languages' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . $lcountry . '.gif')) { $flag = ''; } ?>
.INI
getTableColumns($active_table_key) : []; $table_def_dbvals = !empty($active_table_key) ? $vbo_tn->getTableDefaultDbValues($active_table_key, array_keys($table_cols)) : []; if (!empty($active_table_key)) { echo ''."\n"; if (!empty($keysearch)) { echo ''."\n"; } } foreach ($langs as $ltag => $lang) { $is_def = ($ltag == $vbo_tn->default_lang); ?>

getError()) > 0) { ?>

getError(); ?>

-
$values) { ?>
getRecordReferenceName($table_cols, $values); ?>
$def_value) { $title = $table_cols[$field]['jlang']; $type = $table_cols[$field]['type']; if ($type == 'html') { $def_value = VBOPlatformDetection::isWordPress() ? wpautop($def_value) : $def_value; } ?>
$jval) { if ((!in_array($jkey, $keys) && count($keys) > 0) || empty($jval)) { continue; } $json_lbl = ' '; if (!is_numeric($jkey)) { $guess_lbl = JText::translate('VBO_' . strtoupper($jkey)); $json_lbl = $guess_lbl != 'VBO_' . strtoupper($jkey) ? $guess_lbl : ucwords($jkey); } ?>
getTranslatedTable($active_table_key, $ltag); foreach ($table_def_dbvals as $reference_id => $values) { ?>
getRecordReferenceName($table_cols, $values); ?>
$def_value) { $title = $table_cols[$field]['jlang']; $type = $table_cols[$field]['type']; if ($type == 'skip') { continue; } $tn_value = ''; $tn_class = ' vbo-missing-translation'; if (!isset($lang_record_tn[$reference_id])) { $lang_record_tn[$reference_id] = []; } if (array_key_exists($reference_id, ($lang_record_tn ?? [])) && array_key_exists($field, ($lang_record_tn[$reference_id]['content'] ?? [])) && strlen($lang_record_tn[$reference_id]['content'][$field])) { if (in_array($type, array('text', 'textarea', 'html'))) { $tn_class = ' vbo-field-translated'; } else { $tn_class = ''; } } ?>
= 7 supporting throwable exceptions for Fatal Errors * we try to avoid issues with third party plugins that make use * of the WP native function get_current_screen(). * * @wponly */ try { echo $editor->display( "tn[".$ltag."][".$reference_id."][".$field."]", $tn_value, '100%', 350, 70, 20, true, "tn_".$ltag."_".$reference_id."_".$field ); } catch (Throwable $t) { echo $t->getMessage() . ' in ' . $t->getFile() . ':' . $t->getLine() . '
'; } } else { // we cannot catch Fatal Errors in PHP 5.x echo $editor->display( "tn[".$ltag."][".$reference_id."][".$field."]", $tn_value, '100%', 350, 70, 20, true, "tn_".$ltag."_".$reference_id."_".$field ); } } ?>
$jval) { if ((!in_array($jkey, $keys) && count($keys) > 0) || empty($jval)) { continue; } $json_lbl = ' '; if (!is_numeric($jkey)) { $guess_lbl = JText::translate('VBO_' . strtoupper($jkey)); $json_lbl = $guess_lbl != 'VBO_' . strtoupper($jkey) ? $guess_lbl : ucwords($jkey); } ?>
40) { // check if this translation field requires the rich text visual editor if ($jkey == 'tpl_text' && strpos($jval, '<') !== false) { // the original field contains HTML code built through the visual editor $veditor_name = 'tn[' . $ltag . '][' . $reference_id . '][' . $field . '][' . $jkey . ']'; $veditor_id = 'tn_' . $ltag . '_' . $reference_id . '_' . $field . '_' . $jkey; $tarea_attr = array( 'id' => $veditor_id, 'rows' => '7', 'cols' => '170', 'style' => 'min-width: 60%;', ); $editor_opts = array( 'modes' => array( 'visual', 'text', ), ); echo $vbo_app->renderVisualEditor($veditor_name, (isset($tn_json_value[$jkey]) ? $tn_json_value[$jkey] : ''), $tarea_attr, $editor_opts); } else { ?>
getIniFiles(); ?>
getPagination(); ?>