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


PHP Setting::fetchConfigVal方法代码示例

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


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

示例1: getEditorInfo

function getEditorInfo($editor)
{
    global $pluginURL, $pluginName, $configVal, $pluginPath;
    $context = Model_Context::getInstance();
    $configMappings = $context->getProperty('plugin.configMappings');
    $editorMappings = $context->getProperty('plugin.editorMappings');
    if (!isset($editorMappings[$editor])) {
        reset($editorMappings);
        $editor = key($editorMappings);
        // gives first declared (thought to be default) editor
    }
    if (isset($editorMappings[$editor]['plugin'])) {
        $pluginURL = $context->getProperty('service.path') . '/plugins/' . $editorMappings[$editor]['plugin'];
        $pluginName = $editorMappings[$editor]['plugin'];
        $pluginPath = ROOT . "/plugins/{$pluginName}";
        $context->setProperty('plugin.url', $context->getProperty('service.path') . '/plugins/' . $editorMappings[$editor]['plugin']);
        $context->setProperty('plugin.name', $editorMappings[$editor]['plugin']);
        $context->setProperty('plugin.path', ROOT . "/plugins/{$pluginName}");
        if (!empty($configMappings[$pluginName]['config'])) {
            $configVal = getCurrentSetting($pluginName);
            $context->setProperty('plugin.config', Setting::fetchConfigVal($configVal));
        } else {
            $configVal = null;
            $context->setProperty('plugin.config', array());
        }
        include_once ROOT . "/plugins/{$editorMappings[$editor]['plugin']}/index.php";
    }
    return $editorMappings[$editor];
}
开发者ID:Avantians,项目名称:Textcube,代码行数:29,代码来源:module.php

示例2: SB_Spacer_DataSet

function SB_Spacer_DataSet($data)
{
    if (!is_integer(intval($data['height']))) {
        return false;
    }
    $cfg = Setting::fetchConfigVal($data);
    return true;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:8,代码来源:index.php

示例3: KeywordUI_handleConfig

function KeywordUI_handleConfig($data)
{
    $config = Setting::fetchConfigVal($data);
    if ($config['useKeywordAsTag'] == true) {
        Setting::setBlogSettingGlobal('useKeywordAsTag', true);
    }
    return true;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:8,代码来源:index.php

示例4: TextcubeBirthdayDataSet

function TextcubeBirthdayDataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    // if( $cfg['month'] != 날짜냐?) return "잘못된 날짜입니다.";
    // 등등등등 여기서 원하는 검증을 하시고 검증 실패시 사용자에게 보여줄 에러메세지를 보내주심 됩니다.
    // 성공하면 그냥 true
    return true;
}
开发者ID:ni5am,项目名称:Textcube,代码行数:8,代码来源:index.php

示例5: WikiCube_FormatErrorPage

function WikiCube_FormatErrorPage($target)
{
    global $configVal;
    $config = Setting::fetchConfigVal($configVal);
    if (empty($config['mode'])) {
        $config['mode'] = 'entry';
    }
    $context = Model_Context::getInstance();
    $additional = '<div style="border:none;width:100%;text-align:center;"><a href="' . $context->getProperty('uri.blog') . '/owner/entry/post?slogan=' . $context->getProperty('suri.value') . ($config['mode'] == 'entry' ? '' : '&category=-3') . '">' . _text('Empty page. Click here to add a new entry.') . '</a></div>';
    return $target . $additional;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:11,代码来源:index.php

示例6: SB_Spacer

function SB_Spacer($target)
{
    global $configVal;
    $data = Setting::fetchConfigVal($configVal);
    if (!is_null($data) && array_key_exists('height', $data)) {
        $height = $data['height'];
    } else {
        $height = '20';
    }
    $text = '<div class="SB_Spacer" style="height:' . $height . 'px;"></div>';
    return $text;
}
开发者ID:ni5am,项目名称:Textcube,代码行数:12,代码来源:index.php

示例7: __getPluginConfig

 function __getPluginConfig()
 {
     global $database;
     if (defined("__TISTORY__") == true) {
         global $__globalCache_data;
         if (isset($__globalCache_data['pluginSettings']) && array_key_exists($this->pluginName, $__globalCache_data['pluginSettings'])) {
             return $__globalCache_data['pluginSettings'][$this->pluginName];
         }
     }
     $configXml = POD::queryCell("SELECT settings FROM {$database['prefix']}Plugins WHERE blogid = {$this->blogid} AND name = '{$this->pluginName}'");
     $t = Setting::fetchConfigVal($configXml);
     return false == is_array($t) ? array() : $t;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:13,代码来源:Textcube.Model.PluginCustomConfig.php

示例8: FM_Modern_editorinit

function FM_Modern_editorinit($editor)
{
    global $service, $configVal, $entry;
    $blogid = getBlogId();
    if (is_null($configVal) || empty($configVal)) {
        $config = array('paragraphdelim' => 'BR', 'defaultmode' => 'WYSIWYG');
    } else {
        $config = Setting::fetchConfigVal($configVal);
    }
    if (in_array(Setting::getBlogSettingGlobal('defaultFormatter', 'html'), array('markdown', 'textile')) || in_array($entry['contentformatter'], array('markdown', 'textile'))) {
        $config['defaultmode'] = 'TEXTAREA';
    } else {
        if (!isset($config['defaultmode'])) {
            $config['defaultmode'] = 'WYSIWYG';
        }
    }
    ob_start();
    ?>
			if (typeof(document.execCommand) == "undefined" || !(STD.isIE || STD.isFirefox || (STD.isWebkit && STD.engineVersion >= 419.3))) return null;
			var editor = new TTModernEditor();
			editor.fixPosition = <?php 
    echo Setting::getBlogSettingGlobal('editorPropertyPositionFix', 0);
    ?>
;
			editor.hasGD = <?php 
    echo extension_loaded('gd') ? 'true' : 'false';
    ?>
;
			editor.propertyFilePath = "<?php 
    echo $service['path'];
    ?>
/attach/<?php 
    echo $blogid;
    ?>
/";
			editor.editMode = "<?php 
    echo $config['defaultmode'];
    ?>
";
			editor.newLineToParagraph = <?php 
    echo isset($config['paragraphdelim']) && $config['paragraphdelim'] == 'P' ? 'true' : 'false';
    ?>
;
			return editor;
<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:seojangho,项目名称:Textcube,代码行数:49,代码来源:index.php

示例9: URLkeeper

function URLkeeper($target)
{
    global $hostURL, $blogURL;
    global $configVal;
    requireComponent('Tattertools.Function.misc');
    $data = Setting::fetchConfigVal($configVal);
    $config = $data['viewForm'];
    $target .= '
<script type="text/javascript">
//<![CDATA[

		window.onload = function(){
		var type = navigator.appName
		var lang;
		var msg;
		var myurl = location.href;
		var config = "' . $config . '";
	
		if (type=="Netscape")
			lang = navigator.language
		else
			lang = navigator.userLanguage
		
		// 국가코드에서 앞 2글자만 자름
		var lang = lang.substr(0,2)
		// 한글인 경우
		if (lang == "ko")
			msg = " 원래 주소인 "+myurl+" 로 접속해주세요.";
		// 다른 언어인 경우
		else
			msg =  "please, visit directly via "+myurl;
		try {
			if(top != self){
				if (config == "1") {
					window.open(myurl,"_top");
				}else{
				if (confirm(msg)) window.open(myurl,"_top");
				}
			}
		} catch (e) {
		}	
		}
//]]>
</script>
' . CRLF;
    return $target;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:47,代码来源:index.php

示例10: Xquared_editorinit

function Xquared_editorinit($editor)
{
    global $configVal, $entry, $pluginURL;
    $blogid = getBlogId();
    if (is_null($configVal) || empty($configVal)) {
        $config = array('paragraphdelim' => 'BR', 'defaultmode' => 'WYSIWYG');
    } else {
        $config = Setting::fetchConfigVal($configVal);
    }
    if (in_array(Setting::getBlogSettingGlobal('defaultFormatter', 'html'), array('markdown', 'textile')) || in_array($entry['contentformatter'], array('markdown', 'textile'))) {
        $config['defaultmode'] = 'TEXTAREA';
    } else {
        if (!isset($config['defaultmode'])) {
            $config['defaultmode'] = 'WYSIWYG';
        }
    }
    ob_start();
    ?>
			var editor = new xq.Editor("editWindow");
			editor.config.contentCssList = ["<?php 
    echo $pluginURL;
    ?>
/stylesheets/xq_contents.css"];
			editor.config.imagePathForDefaultToolbar = '<?php 
    echo $pluginURL;
    ?>
/images/toolbar/';
			editor.setEditMode('wysiwyg');
			editor.origInitialize = editor.initialize;
			editor.origFinalize = editor.finalize;
			editor.initialize = function() {
				this.origInitialize();
			}
			editor.finalize = function() {
				this.origFinalize();
			}
			editor.syncTextarea = function(){
				var oForm = document.getElementById('editor-form');
				oForm.content.value = this.getCurrentContent();
			}

			return editor;
<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:47,代码来源:index.php

示例11: tinyMCE_editorinit

function tinyMCE_editorinit($editor)
{
    global $configVal, $entry, $pluginURL;
    $context = Model_Context::getInstance();
    $blogid = getBlogId();
    $config = Setting::fetchConfigVal($configVal);
    if (empty($config['editormode'])) {
        $config['editormode'] = 'simple';
    }
    if (empty($config['width'])) {
        $config['width'] = 'full';
    }
    ob_start();
    ?>
			var editor = new tinymce.Editor('editWindow', {
				// General options
				mode : 'exact',
				theme : 'advanced',
				skin : "default",
				language : '<?php 
    echo strtolower($context->getProperty('blog.language'));
    ?>
',
				popup_css_add: "<?php 
    echo $pluginURL;
    ?>
/popup.css",
<?php 
    if ($config['editormode'] == 'simple') {
        ?>
				plugins : "autolink,autoresize,lists,style,advimage,advlink,emotions,inlinepopups,preview,media,contextmenu,fullscreen,noneditable,visualchars,xhtmlxtras,advlist,TTMLsupport",
				// Theme options
				theme_advanced_buttons1 : "tcsave,|,visualchars,bold,italic,underline,strikethrough,|,styleselect,formatselect,fontselect,fontsizeselect,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,hr,tcmoreless",
				theme_advanced_buttons2 : "tcattach,image,media,|,charmap,emotions,|,link,unlink,anchor,|,undo,redo,|,code,preview,fullscreen",

				theme_advanced_buttons3 : "",
				theme_advanced_buttons4 : "",
<?php 
    } else {
        ?>
				plugins : "autolink,autoresize,lists,pagebreak,style,table,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount,advlist,TTMLsupport",
				// Theme options
				theme_advanced_buttons1 : "tcsave,|,visualchars,bold,italic,underline,strikethrough,|,styleselect,formatselect,fontselect,fontsizeselect,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,hr,tcmoreless",
				theme_advanced_buttons2 : "tcattach,image,media,|,charmap,emotions,|,sub,sup,|,link,unlink,anchor,advhr,|,tablecontrols,|,hr,removeformat,visualaid,|,ltr,rtl,|,search,replace,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking,pagebreak,restoredraft,|,styleprops,|,undo,redo,|,code,cleanup,preview,fullscreen",

				theme_advanced_buttons3 : "",
				theme_advanced_buttons4 : "",
<?php 
    }
    ?>
				theme_advanced_toolbar_location : "top",
				theme_advanced_toolbar_align : "left",
				theme_advanced_statusbar_location : "bottom",
				theme_advanced_resizing : true,

				// content CSS
				content_css : "<?php 
    echo file_exists(ROOT . '/skin/blog/' . $context->getProperty('skin.skin') . '/wysiwyg.css') ? $context->getProperty('uri.service') . '/skin/blog/' . $context->getProperty('skin.skin') . '/wysiwyg.css' : $context->getProperty('uri.service') . '/resources/style/default-wysiwyg.css';
    ?>
",

				// Drop lists for link/image/media dialogs
				external_link_list_url : "lists/link_list.js",
				external_image_list_url : "lists/image_list.js",
				media_external_list_url : "lists/media_list.js",

				// Style formats
				style_formats : [
					{title : 'Bold text', inline : 'b'}
				],
				forced_root_block : false,
				width : "<?php 
    echo $config['width'] == 'full' ? '100%' : $context->getProperty('skin.contentWidth');
    ?>
",
				theme_advanced_toolbar_location : "external"
			});
			editor.initialize = function() {
				this.render();
			};
			editor.addObject = function(data) {
				this.plugins.TTMLsupport.addObject(data);
			};
			editor.finalize = function() {
				this.syncTextarea();
				this.destroy();
			};
			editor.syncTextarea = function(){
				this.save();
			};
			editor.syncEditorWindow = function() {
				this.load();
			};
			editor.onKeyUp.add(editorChanged);
			editor.onMouseDown.add(editorChanged);
			editor.propertyFilePath = "<?php 
    echo $context->getProperty('uri.service');
    ?>
/attach/<?php 
    echo $context->getProperty('blog.id');
//.........这里部分代码省略.........
开发者ID:ragi79,项目名称:Textcube,代码行数:101,代码来源:index.php

示例12: handleConfig

function handleConfig($plugin)
{
    global $service, $typeSchema, $pluginURL, $pluginPath, $pluginName, $configMappings, $configVal, $adminSkinSetting;
    $context = Model_Context::getInstance();
    $typeSchema = array('text', 'textarea', 'select', 'checkbox', 'radio');
    $manifest = @file_get_contents(ROOT . "/plugins/{$plugin}/index.xml");
    $xmls = new XMLStruct();
    $CDSPval = '';
    $i = 0;
    $dfVal = Setting::fetchConfigVal(getCurrentSetting($plugin));
    $name = '';
    $clientData = '[';
    $title = $plugin;
    if ($manifest && $xmls->open($manifest)) {
        $title = $xmls->getValue('/plugin/title[lang()]');
        //설정 핸들러가 존재시 바꿈
        $config = $xmls->selectNode('/plugin/binding/config[lang()]');
        unset($xmls);
        if (!empty($config['.attributes']['manifestHandler'])) {
            $handler = $config['.attributes']['manifestHandler'];
            $oldconfig = $config;
            $context->setProperty('plugin.uri', $context->getProperty('service.path') . "/plugins/{$plugin}");
            $context->setProperty('plugin.path', ROOT . "/plugins/{$plugin}");
            $context->setProperty('plugin.name', $plugin);
            $pluginURL = $context->getProperty('plugin.uri');
            // Legacy plugin support.
            $pluginPath = $context->getProperty('plugin.path');
            $pluginName = $context->getProperty('plugin.name');
            include_once ROOT . "/plugins/{$plugin}/index.php";
            if (function_exists($handler)) {
                if (!empty($configMappings[$plugin]['config'])) {
                    $configVal = getCurrentSetting($plugin);
                    $context->setProperty('plugin.config', Setting::fetchConfigVal($configVal));
                } else {
                    $configVal = '';
                    $context->setProperty('plugin.config', array());
                }
                $manifest = call_user_func($handler, $plugin);
                if (!is_null($languageDomain)) {
                    $locale->domain = $languageDomain;
                }
            }
            $newXmls = new XMLStruct();
            if ($newXmls->open($manifest)) {
                unset($config);
                $config = $newXmls->selectNode('/config[lang()]');
            }
            unset($newXmls);
        }
        if (is_null($config['fieldset'])) {
            return array('code' => _t('설정 값이 없습니다.'), 'script' => '[]');
        }
        foreach ($config['fieldset'] as $fieldset) {
            $legend = !empty($fieldset['.attributes']['legend']) ? htmlspecialchars($fieldset['.attributes']['legend']) : '';
            $CDSPval .= CRLF . TAB . "<fieldset>" . CRLF . TAB . TAB . "<legend><span class=\"text\">{$legend}</span></legend>" . CRLF;
            if (!empty($fieldset['field'])) {
                foreach ($fieldset['field'] as $field) {
                    if (empty($field['.attributes']['name'])) {
                        continue;
                    }
                    $name = $field['.attributes']['name'];
                    $clientData .= getFieldName($field, $name);
                    $CDSPval .= TreatType($field, $dfVal, $name);
                }
            }
            $CDSPval .= TAB . "</fieldset>" . CRLF;
        }
    } else {
        $CDSPval = _t('설정 값이 없습니다.');
    }
    $clientData .= ']';
    return array('code' => $CDSPval, 'script' => $clientData, 'title' => $title);
}
开发者ID:webhacking,项目名称:Textcube,代码行数:73,代码来源:plugin.php

示例13: Recaptcha_Footer

function Recaptcha_Footer($target)
{
    global $configVal, $pluginURL;
    $config = Setting::fetchConfigVal($configVal);
    if (!is_null($config) && isset($config['siteKey'])) {
        $target .= <<<EOS
<script type="text/javascript">
(function(\$) {
\$(document).ready(function() {
\tif (!doesHaveOwnership) {
\t\t\$('a[id^=commentCount]').click(function(e) {
\t\t\tvar entryId = \$(e.target).attr('id').match(/(\\d+)/)[1];
\t\t\t\$('#entry' + entryId + 'Comment').empty(); // prevent interference with previously shown controls.
\t\t\tif (\$('#entry' + entryId + 'Comment:visible').length > 0) {
\t\t\t\t/* The comment view is opened. */
\t\t\t\tif (recaptcha_waitTimer != null) {
\t\t\t\t\twindow.clearInterval(recaptcha_waitTimer);
\t\t\t\t\trecaptcha_waitTimer = null;
\t\t\t\t}
\t\t\t\trecaptcha_waitForElement('form[id=entry' + entryId + 'WriteComment]', function(f) {
\t\t\t\t\trecaptcha_addControl(f, entryId);
\t\t\t\t});
\t\t\t} else {
\t\t\t\t/* The comment view is closed. */
\t\t\t\tif (recaptcha_waitTimer != null) {
\t\t\t\t\twindow.clearInterval(recaptcha_waitTimer);
\t\t\t\t\trecaptcha_waitTimer = null;
\t\t\t\t}
\t\t\t\tif (recaptcha_widgets[entryId] != undefined)
\t\t\t\t\tdelete recaptcha_widgets[entryId];
\t\t\t}
\t\t});
\t}
});
})(jQuery);
</script>
EOS;
    }
    return $target;
}
开发者ID:ni5am,项目名称:Textcube,代码行数:40,代码来源:index.php

示例14: fetchConfigVal

 function fetchConfigVal($DATA)
 {
     return Setting::fetchConfigVal($DATA);
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:4,代码来源:Textcube.Function.Misc.php

示例15: BlogIcon_DataSet

function BlogIcon_DataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    return true;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:5,代码来源:index.php


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