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


PHP Setting::getBlogSettingGlobal方法代码示例

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


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

示例1: getBlogTags

function getBlogTags($blogid)
{
    if ($tags = Setting::getBlogSettingGlobal('blogTags')) {
        return $tags;
    }
    return null;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:7,代码来源:blog.blogSetting.php

示例2: CT_Start_Default

function CT_Start_Default($target)
{
    requireModel("blog.attachment");
    requireComponent("Eolin.PHP.Core");
    requireComponent("Textcube.Function.misc");
    global $blogid, $blogURL, $database, $service;
    $target .= '<ul>';
    $target .= '<li><a href="' . $blogURL . '/owner/entry/post">' . _t('새 글을 씁니다') . '</a></li>' . CRLF;
    $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0);
    if ($latestEntryId !== 0) {
        $latestEntry = CT_Start_Default_getEntry($blogid, $latestEntryId);
        if ($latestEntry != false) {
            $target .= '<li><a href="' . $blogURL . '/owner/entry/edit/' . $latestEntry['id'] . '">' . _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10))) . '</a></li>';
        }
    }
    if (Acl::check('group.administrators')) {
        $target .= '<li><a href="' . $blogURL . '/owner/skin">' . _t('스킨을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/sidebar">' . _t('사이드바 구성을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/setting">' . _t('블로그에 표시되는 값들을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/entry/category">' . _t('카테고리를 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/plugin">' . _t('플러그인을 켜거나 끕니다') . '</a></li>' . CRLF;
    }
    if ($service['reader'] != false) {
        $target .= '<li><a href="' . $blogURL . '/owner/network/reader">' . _t('RSS 리더를 봅니다') . '</a></li>' . CRLF;
    }
    $target .= '</ul>';
    return $target;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:28,代码来源:index.php

示例3: CT_Start_Default

function CT_Start_Default($target)
{
    importlib("model.blog.attachment");
    $context = Model_Context::getInstance();
    $blogURL = $context->getProperty('uri.blog');
    $blogid = $context->getProperty('blog.id');
    $target .= '<ul>';
    $target .= '<li><a href="' . $blogURL . '/owner/entry/post">' . _t('새 글을 씁니다') . '</a></li>' . CRLF;
    $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0);
    if ($latestEntryId !== 0) {
        $latestEntry = CT_Start_Default_getEntry($blogid, $latestEntryId);
        if ($latestEntry != false) {
            $target .= '<li><a href="' . $blogURL . '/owner/entry/edit/' . $latestEntry['id'] . '">' . _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10))) . '</a></li>';
        }
    }
    if (Acl::check('group.administrators')) {
        $target .= '<li><a href="' . $blogURL . '/owner/skin">' . _t('스킨을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/sidebar">' . _t('사이드바 구성을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/skin/setting">' . _t('블로그에 표시되는 값들을 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/entry/category">' . _t('카테고리를 변경합니다') . '</a></li>' . CRLF;
        $target .= '<li><a href="' . $blogURL . '/owner/plugin">' . _t('플러그인을 켜거나 끕니다') . '</a></li>' . CRLF;
    }
    if ($context->getProperty('service.reader', false) != false) {
        $target .= '<li><a href="' . $blogURL . '/owner/network/reader">' . _t('RSS 리더를 봅니다') . '</a></li>' . CRLF;
    }
    $target .= '</ul>';
    return $target;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:28,代码来源:index.php

示例4: getDefaultFormatter

function getDefaultFormatter()
{
    $context = Model_Context::getInstance();
    $formatterMappings = $context->getProperty('plugin.formatterMappings');
    reset($formatterMappings);
    return Setting::getBlogSettingGlobal('defaultFormatter', key($formatterMappings));
}
开发者ID:ni5am,项目名称:Textcube,代码行数:7,代码来源:module.php

示例5: getSidebarModuleOrderData

function getSidebarModuleOrderData($sidebarCount)
{
    if (!is_null($tempValue = Setting::getBlogSettingGlobal("sidebarOrder", NULL))) {
        $emptyArray = unserialize($tempValue);
    } else {
        $emptyArray = false;
    }
    if ($emptyArray === false) {
        return null;
    }
    return $emptyArray;
}
开发者ID:webhacking,项目名称:Textcube,代码行数:12,代码来源:sidebar.php

示例6: getCoverpageModuleOrderData

function getCoverpageModuleOrderData()
{
    if (!is_null($tempValue = Setting::getBlogSettingGlobal("coverpageOrder", NULL))) {
        $emptyArray = unserialize($tempValue);
    } else {
        $emptyArray = false;
    }
    if ($emptyArray === false) {
        return null;
    }
    return $emptyArray;
}
开发者ID:webhacking,项目名称:Textcube,代码行数:12,代码来源:coverpage.php

示例7: FM_Modern_editorinit

function FM_Modern_editorinit($editor)
{
    global $entry;
    $context = Model_Context::getInstance();
    $blogid = getBlogId();
    if (is_null($context->getProperty('plugin.config', null))) {
        $config = array('paragraphdelim' => 'BR', 'defaultmode' => 'WYSIWYG');
    } else {
        $config = $context->getProperty('plugin.config');
    }
    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 $context->getProperty('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:Avantians,项目名称:Textcube,代码行数:50,代码来源:index.php

示例8: 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

示例9: openid_ViewCommenter

function openid_ViewCommenter($name, $comment)
{
    $context = Model_Context::getInstance();
    if ($comment['secret']) {
        return $name;
    }
    if (empty($comment['openid'])) {
        return $name;
    }
    $openidlogodisplay = Setting::getBlogSettingGlobal("OpenIDLogoDisplay", 0);
    if ($openidlogodisplay) {
        $name = "<a href=\"" . $comment['openid'] . "\" class=\"openid\"><img src=\"" . $context->getProperty('service.path') . "/resources/image/icon_openid.gif\" alt=\"OpenID Logo\" title=\"" . _textf("오픈아이디(%1)로 작성하였습니다", $comment['openid']) . "\" /></a>" . $name;
    } else {
        preg_match_all('@<a(.*)>(.*)</a>@Usi', $name, $temp);
        for ($i = 0; $i < count($temp[0]); $i++) {
            if (strip_tags($temp[2][$i]) == $comment['name']) {
                $name = str_replace($temp[0][$i], "<a{$temp[1][$i]} title='" . _textf("오픈아이디(%1)로 작성하였습니다", $comment['openid']) . "'>" . $temp[2][$i] . "</a>", $name);
            }
        }
        $name .= "<a href=\"" . $comment['openid'] . "\" class=\"openid\">&nbsp;</a>";
    }
    return $name;
}
开发者ID:Avantians,项目名称:Textcube,代码行数:23,代码来源:index.php

示例10: printMobileEntryContentView

    ?>
</h3>
		</div>
		<div class="content"><?php 
    printMobileEntryContentView($blogid, $entry, null);
    ?>
</div>
<?php 
    $entryTags = getTags($entry['blogid'], $entry['id']);
    if (sizeof($entryTags) > 0) {
        ?>
		<div class="entry_tags" data-role="content" data-theme="c">
		<h3 class="tags_title">Tags</h3>
<?php 
        $tags = array();
        $relTag = Setting::getBlogSettingGlobal('useMicroformat', 3) > 1 && (count($entries) == 1 || !empty($skin->hentryExisted));
        foreach ($entryTags as $entryTag) {
            $tags[$entryTag['name']] = '<a href="' . $context->getProperty('uri.blog') . '/tag/' . $entryTag['id'] . '">' . htmlspecialchars($entryTag['name']) . '</a>';
        }
        echo implode(",\r\n", array_values($tags));
        ?>
		</div>
	</div>
<?php 
    }
    if (doesHaveOwnership() || $entry['visibility'] >= 2 || isset($_COOKIE['GUEST_PASSWORD']) && trim($_COOKIE['GUEST_PASSWORD']) == trim($entry['password'])) {
        printMobileNavigation($entry, true, true, $paging);
    } else {
        printMobileNavigation($entry, false, false, $paging);
    }
    if (!empty($entryPrint)) {
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例11: list

         $listCache = $cache;
         //preserve for ordering
     }
 }
 if ($skinSetting['showListOnTag'] != 2) {
     list($entries, $paging) = getEntriesWithPagingByTag($blogid, $tag, $suri['page'], $blog['entriesOnList'], $skinSetting['showListOnTag'] == 3 ? $blog['entriesOnPage'] : $blog['entriesOnList']);
     if ($skinSetting['showListOnTag'] == 1) {
         $skinSetting['showListWithTotalEntries'] = true;
     }
     $preservedEntries = $entries;
     unset($entries);
 }
 // Now, print starts.
 require ROOT . '/interface/common/blog/begin.php';
 $cache->reset();
 if (Setting::getBlogSettingGlobal('useKeywordAsTag', true) == true) {
     $cache->name = 'keyword-' . $tag . '-';
     if ($cache->load()) {
         require ROOT . '/interface/common/blog/entries.php';
     } else {
         $entries[0] = getKeylogByTitle(getBlogId(), $suri['value']);
         if (!empty($entries[0])) {
             require ROOT . '/interface/common/blog/entries.php';
             unset($entries);
         }
     }
 }
 if ($skinSetting['showListOnTag'] != 0) {
     $cache = $listCache;
     require ROOT . '/interface/common/blog/list.php';
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:tag.php

示例12: getBlogSetting

function getBlogSetting($name, $default = null, $blogid = null)
{
    return Setting::getBlogSettingGlobal($name, $default);
}
开发者ID:hinablue,项目名称:TextCube,代码行数:4,代码来源:common.setting.php

示例13: changeBlog

 static function changeBlog()
 {
     global $database, $blogURL, $blog, $service;
     $blogid = getBlogId();
     $blogList = User::getBlogs();
     if (count($blogList) == 0) {
         return;
     }
     $changeBlogView = str_repeat(TAB, 6) . "<select id=\"blog-list\" onchange=\"location.href='{$blogURL}/owner/network/teamblog/changeBlog/?blogid='+this.value\">" . CRLF;
     foreach ($blogList as $info) {
         $title = Utils_Unicode::lessen(Setting::getBlogSettingGlobal("title", null, $info, true), 30);
         $title = $title ? $title : _f('%1 님의 블로그', User::getBlogOwnerName($info));
         $changeBlogView .= str_repeat(TAB, 7) . '<option value="' . $info . '"';
         if ($info == $blogid) {
             $changeBlogView .= ' selected="selected"';
         }
         $changeBlogView .= '>' . $title . '</option>' . CRLF;
     }
     $changeBlogView .= str_repeat(TAB, 6) . '</select>' . CRLF;
     return $changeBlogView;
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:21,代码来源:Textcube.Core.php

示例14: applyMF2Entry

 function applyMF2Entry($type, $content)
 {
     /* This function contains heavy regular expressions, but this function is called once and stored in cache by skin setup logic */
     $bareContent = $this->getTopLevelContent($content);
     $content = preg_replace("/<((br|hr|img)[^>]*)>/sm", "{{{\\1}}}", $content);
     /* hAtom:entry-title */
     $content = addAttributeCore($content, '@(.*?)(<(a|span|textarea|td|h1|h2|h3|strong|cite|font)[^>]*>[^<>]*?\\[##_article_rep_title_##\\].*?</\\3>)(.*)@sm', array('class' => 'entry-title'), array(1, 2, 4), 1);
     if (preg_match('@<(a|span|textarea|td|h1|h2|h3|strong|cite|font)[^>]*?class=[\'"][^\'"]*entry-title[^\'"]*[\'"][^>]*>@sm', $content)) {
         array_push($this->microformatDebug, _text('Microformat-info: 제목에 hAtom용 title을 추가합니다.'));
     } else {
         array_push($this->microformatDebug, _text('Microformat-warn: 제목에 hAtom용 title을 추가하지 못했습니다.'));
     }
     /* hAtom:entry-content */
     $content = addAttributeCore($content, '@(.*?)(<(div|td|span|p)[^>]*>[^<>]*?\\[##_article_rep_desc_##\\].*?</\\3>)(.*)@sm', array('class' => 'entry-content'), array(1, 2, 4), 1);
     if (strstr($bareContent, '[##_article_rep_desc_##]') !== false) {
         $content = str_replace("[##_article_rep_desc_##]", "<div class=\"entry-content\">[##_article_rep_desc_##]</div>", $content);
         array_push($this->microformatDebug, _text('Microformat-info: 본문을 감싸고 있는 태그가 없어 div를 삽입한 뒤 hAtom용 entry-content를 추가합니다.'));
     } else {
         if (preg_match('@<(div|td|span|p)[^>]*?class=[\'"][^\'"]*entry-content[^\'"]*[\'"][^>]*>@sm', $content)) {
             array_push($this->microformatDebug, _text('Microformat-info: hAtom용 content를 추가합니다.'));
         } else {
             array_push($this->microformatDebug, _text('Microformat-warn: hAtom용 content를 추가하지 못했습니다.'));
         }
     }
     /* hAtom:updated, published */
     if (Setting::getBlogSettingGlobal('useMicroformat', 3) > 2) {
         /* Adding published, updated date */
         $content = preg_replace('@(<(div|td|span|p)[^>]*>[^<>]*?\\[##_article_rep_desc_##\\].*?</\\2>)@sm', "\\1\n\t\t\t\t\t<div style=\"display:none\">\n\t\t\t\t\t<abbr class=\"updated\" title=\"[##_article_rep_microformat_updated_##]\">[##_article_rep_date_##]</abbr>\n\t\t\t\t\t<abbr class=\"published\" title=\"[##_article_rep_microformat_published_##]\">[##_article_rep_date_##]</abbr>\n\t\t\t\t\t</div>", $content);
         if (preg_match('@<abbr[^>]*?class=[\'"][^\'"]*\\bupdated\\b[^\'"]*[\'"][^>]*>@sm', $content)) {
             array_push($this->microformatDebug, _text('Microformat-info: hAtom용 발행일(published,updated)을 보이지 않게 추가하였습니다.'));
         } else {
             array_push($this->microformatDebug, _text('Microformat-warn: hAtom용 발행일을 추가하지 못하였습니다.'));
         }
     } else {
         array_push($this->microformatDebug, _text('Microformat-info: 의미상 어긋나는 사용인 hAtom용 발행일(published,updated)을 추가하지 않았습니다.'));
     }
     /* hAtom:author should be a complete inner text(without other text such as 'By', 'From') of span,cite,label,li. */
     if (!preg_match('@<(\\w+)\\b[^>]*?class=[\'"][^\'"]*author[^\'"]*[\'"][^>]*>@sm', $content)) {
         if (preg_match('@<(span|cite|label|li)[^>]*>([^<>]*)\\[##_article_rep_author_##\\]([^<>]*)</\\1>@sm', $content, $match)) {
             /* If there are garbage texts around author's name..., embrace author's name with a span */
             if (!preg_match('/^\\s*$/', $match[2]) || !preg_match('/^\\s*$/', $match[3])) {
                 $content = str_replace("[##_article_rep_author_##]", "<span>[##_article_rep_author_##]</span>", $content);
                 array_push($this->microformatDebug, _text('Microformat-info: 작성자 주위로 공백외의 문자가 있어 <span>으로 한번 더 감쌉니다.'));
             }
         } else {
             array_push($this->microformatDebug, _text('Microformat-info: 작성자가 출력되지 않는 스킨입니다. 작성자를 보이지 않게 추가하였습니다.'));
             $content = preg_replace('@(<(div|td|span|p)[^>]*>[^<>]*?\\[##_article_rep_desc_##\\].*?</\\2>)@sm', "\\1\n\t\t\t\t\t<span style=\"display:none\">[##_article_rep_author_##]</span>", $content);
         }
         $content = addAttributeCore($content, '@(.*?)(<(span|cite|label|li|div)[^>]*>\\s*\\[##_article_rep_author_##\\]\\s*</\\3>)(.*)@sm', array('class' => 'author'), array(1, 2, 4), 1);
         if (preg_match('@<(span|cite|label|li|div)[^>]*?class=[\'"][^\'"]*\\bauthor\\b[^\'"]*[\'"][^>]*>@sm', $content)) {
             array_push($this->microformatDebug, _text('Microformat-info: 작성자에 hAtom용 class="author"를 추가합니다'));
         } else {
             array_push($this->microformatDebug, _text('Microformat-warn: 작성자에 hAtom용 class="author"를 추가하지 못하였습니다'));
         }
     } else {
         array_push($this->microformatDebug, _text('Microformat-info: class="author"를 사용한 스킨입니다. hAtom용 author는 삽입하지 않았습니다. 주의: 스킨에 사용된 author의 용도가 마이크로포맷과 다를 수 있습니다.'));
     }
     /* hAtom:hEntry is a unique division in a blog entry*/
     if (!preg_match('/<(p|div)[^>]*class=[\'"][^\'"]*\\bhentry\\b[^\'"]*[\'"][^>]*>/sm', $content)) {
         $content = "<div class=\"hentry\">\r\n{$content}\r\n</div>";
         array_push($this->microformatDebug, _text('Microformat-info: 블로그 글영역 전체를 hAtom용 entry로 간주합니다. 적절한 class="hentry" 삽입이 필요할 수 있습니다.'));
     } else {
         array_push($this->microformatDebug, _text('Microformat-info: 스킨에 class="hentry"가 있으므로, hAtom용 entry는 삽입하지 않았습니다.'));
     }
     /* bookmark to A link */
     addAttribute($content, 'a', 'href', '##_article_rep_link_##', array('rel' => 'bookmark', 'title' => "[##_article_rep_title_##]"));
     if (preg_match('@<a\\b[^>]*?rel=[\'"][^\'"]*bookmark[^\'"]*[\'"][^>]*>@sm', $content)) {
         array_push($this->microformatDebug, _text('Microformat-info: 제목에 bookmark를 추가합니다'));
     } else {
         if (Setting::getBlogSettingGlobal('useMicroformat', 3) > 2) {
             $content = str_replace("[##_article_rep_desc_##]", "<a style=\"display:none\" href=\"[##_article_rep_link_##]\" rel=\"bookmark\" class=\"entry-title\" title=\"[##_article_rep_title_##]\">[##_article_rep_title_##]</a>\r\n[##_article_rep_desc_##]", $content);
         }
         array_push($this->microformatDebug, _text('Microformat-info: 링크가 걸린 제목이 없어 보이지 않는 링크를 추가한 뒤 rel="bookmark"와 hAtom용 title을 추가하였습니다'));
     }
     $this->hentryExisted = true;
     $content = preg_replace("/{{{([^}]+)}}}/sm", '<\\1>', $content);
     return $content;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:78,代码来源:blogskin.php

示例15: define

/// Copyright (c) 2004-2016, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_ADMINPANEL__', true);
require ROOT . '/library/preprocessor.php';
importlib('model.blog.comment');
$IV = array('POST' => array('name' => array('string', 'default' => ''), 'comment' => array('string', 'default' => ''), 'mode' => array(array('commit'), 'default' => ''), 'homepage' => array('string', 'default' => ''), 'password' => array('string', 'default' => ''), 'secret' => array(array('on'), 'default' => null)));
$context = Model_Context::getInstance();
$customIV = fireEvent('ManipulateIVRules', $IV, $context->getProperty('uri.interfaceRoute'));
Validator::addRule($customIV);
if (!Validator::isValid()) {
    Respond::PrintResult(array('error' => 1, 'description' => 'Illegal parameters'));
}
requireStrictRoute();
if (!Setting::getBlogSettingGlobal('acceptComments', 0) && !doesHaveOwnership()) {
    Respond::PrintResult(array('error' => 0, 'commentBlock' => '', 'recentCommentBlock' => ''));
    exit;
}
$pool = DBModel::getInstance();
if ((doesHaveMembership() || !empty($_POST['name'])) && !empty($_POST['comment']) && !empty($_POST['mode']) && $_POST['mode'] == 'commit') {
    if (!empty($_POST['name'])) {
        setcookie('guestName', $_POST['name'], time() + 2592000, $context->getProperty('uri.blog') . "/");
    }
    if (!empty($_POST['homepage']) && $_POST['homepage'] != 'http://') {
        if (strpos($_POST['homepage'], 'http://') === 0) {
            setcookie('guestHomepage', $_POST['homepage'], time() + 2592000, $context->getProperty('uri.blog') . "/");
        } else {
            setcookie('guestHomepage', 'http://' . $_POST['homepage'], time() + 2592000, $context->getProperty('uri.blog') . "/");
        }
    }
开发者ID:webhacking,项目名称:Textcube,代码行数:30,代码来源:index.php


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