Exemplo n.º 1
0
    $phrasetypes = fetch_phrasetypes_array();
    foreach($phrasetypes AS $fieldname => $type)
    {
    	$typeoptions["$fieldname"] = construct_phrase($vbphrase['x_phrases'], $type['title']);
    }
    */
    print_form_header('language', 'add');
    construct_hidden_code('goto', "language.php?" . $vbulletin->session->vars['sessionurl']);
    print_table_header($vbphrase['language_manager'], 4);
    print_cells_row(array($vbphrase['language'], '', '', $vbphrase['default']), 1);
    if ($vbulletin->debug) {
        print_language_row(array('languageid' => -1, 'title' => "<i>{$vbphrase['master_language']}</i>"));
    }
    $languages = fetch_languages_array();
    foreach ($languages as $_languageid => $language) {
        print_language_row($language);
    }
    print_description_row(construct_link_code($vbphrase['search_phrases'], "phrase.php?" . $vbulletin->session->vars['sessionurl'] . "do=search") . construct_link_code($vbphrase['view_quickref'], "javascript:js_open_phrase_ref(0,0);") . construct_link_code($vbphrase['rebuild_all_languages'], "language.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&amp;goto=language.php?" . $vbulletin->session->vars['sessionurl']), 0, 4, 'thead" style="text-align:center; font-weight:normal');
    print_table_footer(4, '
		<input type="submit" class="button" value="' . $vbphrase['add_new_language'] . '" tabindex="1" />
		<input type="button" class="button" value="' . $vbphrase['download_upload_language'] . '" tabindex="1" onclick="window.location=\'language.php?do=files\';" />
	');
    print_phrase_ref_popup_javascript();
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:56, Sat Oct 11th 2008
|| # CVS: $RCSfile$ - $Revision: 26900 $
|| ####################################################################
\*======================================================================*/
Exemplo n.º 2
0
/**
* Prints a row containing template search javascript controls
*/
function print_template_javascript()
{
    global $stylevar, $vbphrase, $vbulletin;
    print_phrase_ref_popup_javascript();
    echo '<script type="text/javascript" src="../clientscript/vbulletin_templatemgr.js"></script>';
    echo '<script type="text/javascript">
<!--
	var textarea_id = "' . $vbulletin->textarea_id . '";
	var vbphrase = { \'not_found\' : "' . fetch_js_safe_string($vbphrase['not_found']) . '" };
// -->
</script>
';
    print_label_row(iif(is_browser('ie') or is_browser('mozilla', '20040707'), $vbphrase['search_in_template'], $vbphrase['additional_functions']), iif(is_browser('ie') or is_browser('mozilla', '1.7'), '
	<input type="text" class="bginput" name="string" accesskey="t" value="' . htmlspecialchars_uni($vbulletin->GPC['searchstring']) . '" size="20" onChange="n=0;" tabindex="1" />
	<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['find'] . ' " accesskey="f" onClick="findInPage(document.cpform.string.value);" tabindex="1" />
	&nbsp;') . '<input type="button" class="button" style="font-weight:normal" value=" ' . $vbphrase['copy'] . ' " accesskey="c" onclick="HighlightAll();" tabindex="1" />
	&nbsp;
	<input type="button" class="button" style="font-weight:normal" value="' . $vbphrase['view_quickref'] . '" accesskey="v" onclick="js_open_phrase_ref(0, 0);" tabindex="1" />
	');
}
/**
* Prints a row containing template search javascript controls
*/
function print_template_javascript($textarea_id)
{
    $vbphrase = vB_Api::instanceInternal('phrase')->fetch(array('not_found'));
    print_phrase_ref_popup_javascript();
    echo '<script type="text/javascript" src="' . vB::getDatastore()->getOption('bburl') . '/clientscript/vbulletin_templatemgr.js?v=' . SIMPLE_VERSION . '"></script>';
    echo '<script type="text/javascript">
<!--
	var vbphrase = { \'not_found\' : "' . fetch_js_safe_string($vbphrase['not_found']) . '" };
// -->
</script>
';
    activateCodeMirror(array($textarea_id));
}