Exemple #1
0
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];
}
Exemple #2
0
function SB_Spacer_DataSet($data)
{
    if (!is_integer(intval($data['height']))) {
        return false;
    }
    $cfg = Setting::fetchConfigVal($data);
    return true;
}
Exemple #3
0
function KeywordUI_handleConfig($data)
{
    $config = Setting::fetchConfigVal($data);
    if ($config['useKeywordAsTag'] == true) {
        Setting::setBlogSettingGlobal('useKeywordAsTag', true);
    }
    return true;
}
Exemple #4
0
function TextcubeBirthdayDataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    // if( $cfg['month'] != 날짜냐?) return "잘못된 날짜입니다.";
    // 등등등등 여기서 원하는 검증을 하시고 검증 실패시 사용자에게 보여줄 에러메세지를 보내주심 됩니다.
    // 성공하면 그냥 true
    return true;
}
Exemple #5
0
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;
}
Exemple #6
0
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;
}
 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;
 }
Exemple #8
0
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;
}
Exemple #9
0
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;
}
Exemple #10
0
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;
}
Exemple #11
0
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');
    ?>
/";
			editor.fixPosition = <?php 
    echo Setting::getBlogSettingGlobal('editorPropertyPositionFix', 0);
    ?>
;
			return editor;
<?php 
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
}
Exemple #12
0
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);
}
Exemple #13
0
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;
}
 function fetchConfigVal($DATA)
 {
     return Setting::fetchConfigVal($DATA);
 }
Exemple #15
0
function BlogIcon_DataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    return true;
}
Exemple #16
0
function convertDateFormat($argTarget, $argType)
{
    global $pluginURL, $configVal;
    global $rgDateInformation;
    if (is_null($configVal)) {
        return $argTarget;
    }
    $temp = explode('/', $pluginURL);
    array_shift($temp);
    array_shift($temp);
    if (empty($configVal)) {
        include 'config.ini.php';
        $tempArray = $data;
        unset($data);
    } else {
        requireComponent('Textcube.Function.misc');
        $tempArray = Setting::fetchConfigVal($configVal);
    }
    $rgDateFormat = array();
    $rgDateFormat['archive date'] = array("language" => $tempArray['language'], "format" => $tempArray['archive_date']);
    $rgDateFormat['calendar head'] = array("language" => $tempArray['language'], "format" => $tempArray['calendar_date']);
    $rgDateFormat['comment date'] = array("language" => $tempArray['language'], "format" => $tempArray['comment_date']);
    $rgDateFormat['comment list date'] = array("language" => $tempArray['language'], "format" => $tempArray['comment_list_date']);
    $rgDateFormat['guestbook date'] = array("language" => $tempArray['language'], "format" => $tempArray['guestbook_date']);
    $rgDateFormat['list date'] = array("language" => $tempArray['language'], "format" => $tempArray['list_date']);
    $rgDateFormat['notice date'] = array("language" => $tempArray['language'], "format" => $tempArray['notice_date']);
    $rgDateFormat['post date'] = array("language" => $tempArray['language'], "format" => $tempArray['post_date']);
    $rgDateFormat['recent comment date'] = array("language" => $tempArray['language'], "format" => $tempArray['recent_comment_date']);
    $rgDateFormat['recent trackback date'] = array("language" => $tempArray['language'], "format" => $tempArray['recent_trackback_date']);
    $rgDateFormat['trackback date'] = array("language" => $tempArray['language'], "format" => $tempArray['trackback_date']);
    if (isset($rgDateFormat[$argType])) {
        $strLanguage = $rgDateFormat[$argType]['language'];
    } else {
        return $argTarget;
    }
    if (empty($strLanguage) || $strLanguage == "default") {
        $strLanguage = "korean";
    }
    $strYear = NULL;
    $strMonth = NULL;
    $strDay = NULL;
    $strHour = NULL;
    $strMinute = NULL;
    $strSecond = NULL;
    switch ($argType) {
        case 'archive date':
        case 'calendar head':
            preg_match('@^([0-9]{4})/([0-9]{2})$@', $argTarget, $rgTemp);
            $strYear = $rgTemp[1];
            $strMonth = $rgTemp[2];
            break;
        case 'comment list date':
        case 'list date':
            if (preg_match('@^([0-9]{4})/([0-9]{2})/([0-9]{2})$@', $argTarget, $rgTemp)) {
                $strYear = $rgTemp[1];
                $strMonth = $rgTemp[2];
                $strDay = $rgTemp[3];
            } else {
                if (preg_match('@^([0-9]{2}):([0-9]{2}):([0-9]{2})$@', $argTarget, $rgTemp)) {
                    $strHour = $rgTemp[1];
                    $strMinute = $rgTemp[2];
                    $strSecond = $rgTemp[3];
                }
            }
            break;
        case 'comment date':
        case 'guestbook date':
        case 'notice date':
        case 'post date':
        case 'trackback date':
            preg_match('@^([0-9]{4})/([0-9]{2})/([0-9]{2}) ([0-9]{2}):([0-9]{2})$@', $argTarget, $rgTemp);
            $strYear = $rgTemp[1];
            $strMonth = $rgTemp[2];
            $strDay = $rgTemp[3];
            $strHour = $rgTemp[4];
            $strMinute = $rgTemp[5];
            break;
        case 'recent comment date':
        case 'recent trackback date':
            if (preg_match('@^([0-9]{2})/([0-9]{2})$@', $argTarget, $rgTemp)) {
                $strMonth = $rgTemp[1];
                $strDay = $rgTemp[2];
            } else {
                if (preg_match('@^([0-9]{2}):([0-9]{2})$@', $argTarget, $rgTemp)) {
                    $strHour = $rgTemp[1];
                    $strMinute = $rgTemp[2];
                }
            }
            break;
    }
    $rgCustomIdentifier = array();
    if ($strYear != false) {
        $rgCustomIdentifier['%Y'] = $strYear;
        $rgCustomIdentifier['%y'] = removeHeadZero($strYear);
    }
    if ($strMonth != false) {
        if (isset($rgDateInformation[$strLanguage]['month'][$strMonth])) {
            $rgCustomIdentifier['%M'] = $rgDateInformation[$strLanguage]['month'][$strMonth];
            if (isset($rgDateInformation[$strLanguage]['month']['length'])) {
                $rgCustomIdentifier['%m'] = preg_replace('/^(.{' . $rgDateInformation[$strLanguage]['month']['length'] . '})(.*)$/', '$1', $rgDateInformation[$strLanguage]['month'][$strMonth]);
            } else {
                $rgCustomIdentifier['%m'] = $rgCustomIdentifier['%M'];
            }
        } else {
            $rgCustomIdentifier['%M'] = $strMonth;
            $rgCustomIdentifier['%m'] = removeHeadZero($strMonth);
        }
    }
    if ($strDay != false) {
        $rgCustomIdentifier['%D'] = $strDay;
        $rgCustomIdentifier['%d'] = removeHeadZero($strDay);
        if (isset($rgDateInformation[$strLanguage]['day ordinal postfix']['00'])) {
            $rgCustomIdentifier['%o'] = $rgCustomIdentifier['%d'] . $rgDateInformation[$strLanguage]['day ordinal postfix']['00'];
        } else {
            if (isset($rgDateInformation[$strLanguage]['day ordinal postfix'][$strDay])) {
                $rgCustomIdentifier['%o'] = $rgCustomIdentifier['%d'] . $rgDateInformation[$strLanguage]['day ordinal postfix'][$strDay];
            } else {
                $rgCustomIdentifier['%o'] = $rgCustomIdentifier['%d'];
            }
        }
    }
    if ($strHour != false) {
        $rgCustomIdentifier['%H'] = $strHour;
        $rgCustomIdentifier['%h'] = removeHeadZero($strHour);
        $rgCustomIdentifier['%f'] = $rgCustomIdentifier['%h'] > 12 ? $rgCustomIdentifier['%h'] - 12 : $rgCustomIdentifier['%h'];
        $rgCustomIdentifier['%F'] = $rgCustomIdentifier['%f'] < 10 ? '0' . $rgCustomIdentifier['%f'] : $rgCustomIdentifier['%f'];
    }
    if ($strMinute != false) {
        $rgCustomIdentifier['%I'] = $strMinute;
        $rgCustomIdentifier['%i'] = removeHeadZero($strMinute);
    }
    if ($strSecond != false) {
        $rgCustomIdentifier['%S'] = $strSecond;
        $rgCustomIdentifier['%s'] = removeHeadZero($strSecond);
    }
    $newTarget = strtr($rgDateFormat[$argType]['format'], $rgCustomIdentifier);
    $newTarget = preg_replace('/\\{[^\\{]*%[a-z][^\\}]*\\}/i', '', $newTarget);
    return trim(str_replace(array('{', '}'), array('', ''), $newTarget));
}
Exemple #17
0
function MT_Cover_getRecentEntries_DataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    MT_Cover_getRecentEntries_purgeCache(null, null);
    return true;
}
Exemple #18
0
function CT_RecentRP_Default_DataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    return true;
}
Exemple #19
0
function refererkeyword_DataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    return true;
}
Exemple #20
0
function refererkeyword_DataSet($DATA)
{
    if (defined('TEXTCUBE_NAME')) {
        requireComponent('Textcube.Function.misc');
    } else {
        requireComponent('Tattertools.Function.misc');
    }
    $cfg = Setting::fetchConfigVal($DATA);
    return true;
}
Exemple #21
0
function GoogleMapUI_InsertMap()
{
    global $configVal, $pluginURL;
    $config = Setting::fetchConfigVal($configVal);
    $lat = $config['latitude'];
    $lng = $config['longitude'];
    $default_type = 'ROADMAP';
    $default_width = min(Misc::getContentWidth(), 500);
    $default_height = 400;
    $zoom = 10;
    _GMap_printHeaderForUI(_t('구글맵 삽입하기'), 'insert', $config['useSensor'] ? 'true' : 'false');
    ?>
	<div id="controls">
		<button id="toggleMarkerAddingMode"><?php 
    echo _t("마커 표시 모드");
    ?>
</button>
		<button id="doInsert"><?php 
    echo _t("본문에 삽입하기");
    ?>
</button>
	</div>
	<div style="text-align:center;">
		<div class="ui-widget-content" id="GoogleMapPreview" style="width:<?php 
    echo $default_width;
    ?>
px; height:<?php 
    echo $default_height;
    ?>
px; margin:0 auto;"></div>
	</div>
	<script type="text/javascript">
	//<![CDATA[
	GMapOnLoadCallbacks.push(function() {
		map = new google.maps.Map($('#GoogleMapPreview')[0], {
			'center':new google.maps.LatLng(<?php 
    echo $lat;
    ?>
, <?php 
    echo $lng;
    ?>
),
			'zoom': <?php 
    echo $zoom;
    ?>
,
			'mapTypeId': google.maps.MapTypeId.<?php 
    echo $default_type;
    ?>
,
			'mapTypeControl': true,
			'navigationControl': true,
			'scaleControl': true
		});
		google.maps.event.addListenerOnce(map, 'idle', initializeCustomizableMap);
	});
	//]]>
	</script>
	<h2><?php 
    echo _t("지도 검색");
    ?>
</h2>
	<div class="accordion-elem">
		<p><label><?php 
    echo _t("위치 검색");
    ?>
 : <input type="text" class="editControl" id="inputQuery" value="" /></label><button id="queryLocation"><?php 
    echo _t("찾기");
    ?>
</button></p>
	</div>
	<h2><?php 
    echo _t("기본 설정");
    ?>
</h2>
	<div class="accordion-elem">
		<p><label><?php 
    echo _t("가로");
    ?>
(px) : <input type="text" class="editControl" id="inputWidth" value="<?php 
    echo $default_width;
    ?>
" /></label></p>
		<p><label><?php 
    echo _t("세로");
    ?>
(px) : <input type="text" class="editControl" id="inputHeight" value="<?php 
    echo $default_height;
    ?>
" /></label></p>
		<p><button id="applyBasicSettings"><?php 
    echo _t("적용");
    ?>
</button></p>
	</div>
<?php 
    // TODO: 주소 추출 UI
    // - TODO: 포스트 내용 텍스트 얻어오기 및 주소 정보 추출
    _GMap_printFooterForUI('insert');
}
Exemple #22
0
function getTeamBlog_DataSet($DATA)
{
    requireComponent('Textcube.Function.misc');
    $cfg = Setting::fetchConfigVal($DATA);
    return true;
}
Exemple #23
0
            $invalidPlugin = false;
            if (!array_key_exists($sidbarPluginIndex, $coverpagePluginArray)) {
                // invalid or missed plug-in
                $coverpagePluginArray[$sidbarPluginIndex] = array();
                $coverpagePluginArray[$sidbarPluginIndex]['title'] = $plugin;
                $coverpagePluginArray[$sidbarPluginIndex]['handler'] = $handler;
                $coverpagePluginArray[$sidbarPluginIndex]['display'] = $plugin;
                $coverpagePluginArray[$sidbarPluginIndex]['parameters'] = array();
                $invalidPlugin = true;
            } else {
                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());
                }
                ?>
												<li class="coverpage-module coverpage-plugin-module" id="coverpage-element-<?php 
                echo "{$i}-{$j}";
                ?>
">
													<h4 class="module-title"><?php 
                echo $coverpagePluginArray[$sidbarPluginIndex]['display'], '::', $coverpagePluginArray[$sidbarPluginIndex]['title'];
                ?>
</h4>
													<div class="button-box">
<?php 
Exemple #24
0
function getTeamBlog_DataSet($DATA)
{
    $cfg = Setting::fetchConfigVal($DATA);
    return true;
}