当前位置: 首页>>代码示例>>PHP>>正文


PHP PMF_Language::isASupportedTinyMCELanguage方法代码示例

本文整理汇总了PHP中PMF_Language::isASupportedTinyMCELanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP PMF_Language::isASupportedTinyMCELanguage方法的具体用法?PHP PMF_Language::isASupportedTinyMCELanguage怎么用?PHP PMF_Language::isASupportedTinyMCELanguage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMF_Language的用法示例。


在下文中一共展示了PMF_Language::isASupportedTinyMCELanguage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

    print $LANGCODE;
    ?>
" style="border: none;" width="0" height="0"></iframe>
<?php 
    if (isset($auth) && ('takequestion' == $action || 'editentry' == $action || 'editpreview' == $action || 'addnews' == $action || 'editnews' == $action || 'copyentry' == $action)) {
        if ($faqconfig->get('main.enableWysiwygEditor') == true) {
            ?>
<!-- tinyMCE -->
<script type="text/javascript">
/*<![CDATA[*/ //<!--
 
tinyMCE.init({
    // General options
    mode     : "exact",
    language : "<?php 
            print PMF_Language::isASupportedTinyMCELanguage($LANGCODE) ? $LANGCODE : 'en';
            ?>
",
    elements : "content",
    width    : "720",
    height   : "480",
    theme    : "advanced",
    plugins  : "spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,syntaxhl,phpmyfaq",
    theme_advanced_blockformats : "p,div,h1,h2,h3,h4,h5,h6,blockquote,dt,dd,code,samp",

    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,phpmyfaq,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,syntaxhl,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen,help",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
开发者ID:rybal06,项目名称:phpMyFAQ,代码行数:31,代码来源:footer.php

示例2: catch

    exit;
}
$translationLanguage = PMF_Filter::filterInput(INPUT_POST, 'translation', FILTER_SANITIZE_STRIPPED, $LANGCODE);
if (!PMF_Language::isASupportedLanguage($translationLanguage)) {
    $translationLanguage = $LANGCODE;
}
$faqSource['id'] = 'writeSourceFaqId';
$faqSource['lang'] = $translationLanguage;
$faqSource['title'] = 'writeSourceTitle';
$faqSource['content'] = 'writeSourceContent';
$faqSource['keywords'] = 'writeSourceKeywords';
try {
    $faqsession->userTracking('new_translation_entry', 0);
} catch (PMF_Exception $e) {
    // @todo handle the exception
}
$id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT);
$categoryId = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT);
$srclang = PMF_Filter::filterInput(INPUT_GET, 'srclang', FILTER_SANITIZE_STRIPPED);
if (!is_null($id) && !is_null($srclang) && PMF_Language::isASupportedLanguage($srclang)) {
    $oFaq = new PMF_Faq($faqConfig);
    $oFaq->getRecord($id);
    $faqSource = $oFaq->faqRecord;
}
$captchaHelper = new PMF_Helper_Captcha($faqConfig);
// Enable/Disable WYSIWYG editor
if ($faqConfig->get('main.enableWysiwygEditorFrontend')) {
    $tpl->parseBlock('writeContent', 'enableWysiwygEditor', array('currentTimestamp' => $_SERVER['REQUEST_TIME']));
}
$tpl->parse('writeContent', array('writeSourceFaqId' => $faqSource['id'], 'writeSourceTitle' => $faqSource['title'], 'writeSourceContent' => strip_tags($faqSource['content']), 'writeSourceKeywords' => $faqSource['keywords'], 'categoryId' => $categoryId, 'msgNewTranslationHeader' => $PMF_LANG['msgNewTranslationHeader'], 'msgNewTranslationAddon' => $PMF_LANG['msgNewTranslationAddon'], 'msgNewTransSourcePane' => $PMF_LANG['msgNewTransSourcePane'], 'msgNewTranslationPane' => $PMF_LANG['msgNewTranslationPane'], 'writeSendAdress' => '?' . $sids . 'action=save', 'defaultContentName' => $user ? $user->getUserData('display_name') : '', 'defaultContentMail' => $user ? $user->getUserData('email') : '', 'msgNewTranslationQuestion' => $PMF_LANG['msgNewContentTheme'], 'msgNewTranslationAnswer' => $PMF_LANG['msgNewContentArticle'], 'msgNewTranslationName' => $PMF_LANG['msgNewTranslationName'], 'msgNewTranslationMail' => $PMF_LANG['msgNewTranslationMail'], 'msgNewTranslationKeywords' => $PMF_LANG['msgNewTranslationKeywords'], 'writeTransFaqLanguage' => $translationLanguage, 'captchaFieldset' => $captchaHelper->renderCaptcha($captcha, 'translate', $PMF_LANG['msgCaptcha'], $auth), 'msgNewTranslationSubmit' => $PMF_LANG['msgNewTranslationSubmit'], 'tinyMCELanguage' => PMF_Language::isASupportedTinyMCELanguage($LANGCODE) ? $LANGCODE : 'en'));
$tpl->merge('writeContent', 'index');
开发者ID:ae120,项目名称:phpMyFAQ,代码行数:31,代码来源:translate.php

示例3: header

 * @since     2006-11-12
 */
if (!defined('IS_VALID_PHPMYFAQ')) {
    header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
$captcha = new PMF_Captcha($db, $Language);
$captcha->setSessionId($sids);
if (!is_null($showCaptcha)) {
    $captcha->showCaptchaImg();
    exit;
}
$translationLanguage = PMF_Filter::filterInput(INPUT_POST, 'translation', FILTER_SANITIZE_STRIPPED, $LANGCODE);
if (!PMF_Language::isASupportedLanguage($translationLanguage)) {
    $translationLanguage = $LANGCODE;
}
$faqSource['id'] = 'writeSourceFaqId';
$faqSource['lang'] = $translationLanguage;
$faqSource['title'] = 'writeSourceTitle';
$faqSource['content'] = 'writeSourceContent';
$faqSource['keywords'] = 'writeSourceKeywords';
$faqsession->userTracking('new_translation_entry', 0);
$id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT);
$srclang = PMF_Filter::filterInput(INPUT_GET, 'srclang', FILTER_SANITIZE_STRIPPED);
if (!is_null($id) && !is_null($srclang) && PMF_Language::isASupportedLanguage($srclang)) {
    $oFaq = new PMF_Faq();
    $oFaq->getRecord($id);
    $faqSource = $oFaq->faqRecord;
}
$tpl->processTemplate('writeContent', array('writeSourceFaqId' => $faqSource['id'], 'writeSourceTitle' => $faqSource['title'], 'writeSourceContent' => $faqSource['content'], 'writeSourceKeywords' => $faqSource['keywords'], 'msgNewTranslationHeader' => $PMF_LANG['msgNewTranslationHeader'], 'msgNewTranslationAddon' => $PMF_LANG['msgNewTranslationAddon'], 'msgNewTransSourcePane' => $PMF_LANG['msgNewTransSourcePane'], 'msgNewTranslationPane' => $PMF_LANG['msgNewTranslationPane'], 'writeSendAdress' => '?' . $sids . 'action=save', 'defaultContentName' => $user ? $user->getUserData('display_name') : '', 'defaultContentMail' => $user ? $user->getUserData('email') : '', 'msgNewTranslationName' => $PMF_LANG['msgNewTranslationName'], 'msgNewTranslationMail' => $PMF_LANG['msgNewTranslationMail'], 'msgNewTranslationKeywords' => $PMF_LANG['msgNewTranslationKeywords'], 'writeTransFaqLanguage' => $translationLanguage, 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderFieldset($PMF_LANG['msgCaptcha'], $captcha->printCaptcha('translate')), 'msgNewTranslationSubmit' => $PMF_LANG['msgNewTranslationSubmit'], 'tinyMCELanguage' => PMF_Language::isASupportedTinyMCELanguage($LANGCODE) ? $LANGCODE : 'en'));
$tpl->includeTemplate('writeContent', 'index');
开发者ID:jr-ewing,项目名称:phpMyFAQ,代码行数:31,代码来源:translate.php

示例4: header

 * @since     2003-02-26
 */
if (!defined('IS_VALID_PHPMYFAQ')) {
    $protocol = 'http';
    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
        $protocol = 'https';
    }
    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
$templateVars = array('PMF_LANG' => $PMF_LANG, 'debugInformation' => DEBUG ? $faqConfig->getDb()->log() : '', 'formAction' => 'index.php' . (isset($action) ? '?action=' . $action : ''), 'isAuthenticated' => isset($auth), 'languageSelector' => PMF_Language::selectLanguages($LANGCODE, true), 'pmfVersion' => $faqConfig->get('main.currentVersion'), 'sessionKeepaliveUrl' => 'session.keepalive.php?lang=' . $LANGCODE, 'userDisplayName' => isset($user) ? $user->userdata->get('display_name') : '', 'userId' => isset($user) ? $user->userdata->get('user_id') : '');
$wysiwygActions = array('takequestion', 'editentry', 'editpreview', 'addnews', 'editnews', 'copyentry');
if (isset($auth) && in_array($action, $wysiwygActions) && $faqConfig->get('main.enableWysiwygEditor')) {
    $templateVars['wysiwygActive'] = true;
    $templateVars['tinyMceContentCss'] = '../assets/template/' . PMF_Template::getTplSetName() . '/css/style.css';
    $templateVars['tinyMceLanguage'] = PMF_Language::isASupportedTinyMCELanguage($LANGCODE) ? $LANGCODE : 'en';
    if ('addnews' == $action || 'editnews' == $action) {
        $templateVars['tinyMceElements'] = 'news';
        $templateVars['tinyMceSave'] = '';
    } else {
        $templateVars['tinyMceElements'] = 'answer';
        $templateVars['tinyMceSave'] = 'save,|,';
    }
    if (isset($faqData['id']) && $faqData['id'] == 0) {
        $templateVars['tinyMceSaveCallbackAction'] = 'recordAdd';
    } else {
        $templateVars['tinyMceSaveCallbackAction'] = 'recordSave';
    }
} else {
    $templateVars['wysiwygActive'] = false;
    $twig->loadTemplate('footer.twig')->display($templateVars);
开发者ID:Ravikumarsreerama,项目名称:faq,代码行数:31,代码来源:footer.php


注:本文中的PMF_Language::isASupportedTinyMCELanguage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。