本文整理汇总了PHP中misc::fetchConfigVal方法的典型用法代码示例。如果您正苦于以下问题:PHP misc::fetchConfigVal方法的具体用法?PHP misc::fetchConfigVal怎么用?PHP misc::fetchConfigVal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类misc
的用法示例。
在下文中一共展示了misc::fetchConfigVal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FlashCounterViewDataSet
function FlashCounterViewDataSet($DATA)
{
global $blog, $service;
requireComponent('Textcube.Function.misc');
$cfg = misc::fetchConfigVal($DATA);
if (!isset($blog['blogLanguage'])) {
$blog['blogLanguage'] = $service['language'];
}
// Locale language file support.
switch ($blog['blogLanguage']) {
case "zh-TW":
$retval = 'Flash 計數器尺寸 "205x85" 僅適用於黑色底色設定。';
break;
case "zh-CN":
$retval = 'Flash 计数器尺寸 "205x85" 仅适用于黑色底色设定。';
break;
default:
$retval = "플래쉬카운터 '205x85' 크기는 검정색만 설정가능합니다.";
}
if ($cfg['flashsize'] == '205') {
if ($cfg['flashcolor'] == 'white') {
return $retval;
}
}
return true;
}
示例2: EntriesWithTags_DataSet
function EntriesWithTags_DataSet($data)
{
requireComponent('Textcube.Function.misc');
$cfg = misc::fetchConfigVal($data);
if (!$cfg['entries'] || empty($cfg['entries']) || intval($cfg['entries'] <= 0)) {
$cfg['entries'] = 5;
}
return true;
}
示例3: getPlurkDataSet
function getPlurkDataSet($data)
{
requireComponent('Textcube.Function.misc');
$cfg = misc::fetchConfigVal($data);
if (!$cfg['plurknickname'] || empty($cfg['plurknickname']) || !$cfg['plurkpassword'] || empty($cfg['plurkpassword'])) {
return "::Input error::\n\n Plurk's nickname and password must input certainly.";
}
return true;
}
示例4: PN_Blog_Statistics_DataSet
function PN_Blog_Statistics_DataSet($DATA)
{
requireComponent('Textcube.Function.misc');
$cfg = misc::fetchConfigVal($DATA);
return true;
}
示例5: DEFENSIO
function DEFENSIO()
{
global $blogid, $pluginMenuURL, $pluginURL, $pluginSelfParam, $blog, $user, $blogURL, $defaultURL, $hostURL, $service, $skinSetting, $configVal;
requireComponent('Textcube.Function.misc');
$comment_TYPE = !empty($_GET['t']) ? $_GET['t'] : '';
$page = !empty($_GET['page']) ? $_GET['page'] : 1;
$perPage = getBlogSetting('rowsPerPage', 10);
if ($comment_TYPE != "T") {
$comment_TYPE = "C";
}
$data = misc::fetchConfigVal($configVal);
$blogHome = preg_replace("'^http://'", "", $hostURL);
print '<div><h2 class="caption"><span class="main-text">Defensio Anti Spam Filter</span></h2></div>';
if (!isset($data['apikey']) || $data['apikey'] == '') {
print <<<ENDL
\t\t<div>
\t\t\t<p><a href="http://www.defensio.com">Defensio</a>'s blog spam web service aggressively and intelligently prevents comment and trackback spam from hitting your blog. You should quickly notice a dramatic reduction in the amount of spam you have to worry about.</p><br />
\t\t\t<p>When the filter does rarely make a mistake (say, the odd spam message gets through or a rare good comment is marked as spam) we've made it a joy to sort through your comments and set things straight. Not only will the filter learn and improve over time, but it will do so in a personalized way!</p><br />
\t\t\t<p>In order to use our service, you will need a free Defensio API key. Get yours now at <a href="http://www.defensio.com/signup">Defensio.com</a>.</p>
\t\t</div>
ENDL;
return;
}
print "<div>";
// TODO: Cache?
// get stats
$stats = defensio_get_stats();
if ($stats !== false) {
$accuracy = number_format($stats['accuracy'] * 100, 2, '.', '');
$spam = $stats['spam'];
$ham = $stats['ham'];
$fn = $stats['false-negatives'];
$fp = $stats['false-positives'];
$apikey = $data['apikey'];
print <<<ENDL
\t\t<div class="defensio_stats" style="margin:10px;padding:5px;">
\t\t<div style="float:right;"><a href="http://defensio.com/manage/stats/{$apikey}">Detail Stats</a></div>
\t\t<ul>
\t\t\t<li><strong>Recent accuracy: {$accuracy}%</strong><hr></li>
\t\t\t<li><strong>{$spam}</strong> spams, <strong>{$ham}</strong> legitimate comments</li>
\t\t\t<li><strong>{$fn}</strong> false negatives (undetected spam)</li>
\t\t\t<li><strong>{$fp}</strong> false positives (legitimate comments identified as spam)</li>
\t\t</ul>
\t\t</div>
ENDL;
}
// get quarntines list
list($comments, $paging) = defensio_get_data($comment_TYPE, $page, $perPage);
include 'template/' . ($comment_TYPE == 'C' ? 'comment' : 'trackback') . '.php';
print "</div>";
}
示例6: MailNotificationDataSet
function MailNotificationDataSet($DATA)
{
requireComponent('Textcube.Function.misc');
$cfg = misc::fetchConfigVal($DATA);
return true;
}
示例7: getFlickrPhotosDataSet
function getFlickrPhotosDataSet($DATA)
{
requireComponent('Textcube.Function.misc');
$cfg = misc::fetchConfigVal($DATA);
if (!$cfg['flickruserid'] || empty($cfg['flickruserid'])) {
return "::Input error::\n\n Flickr's NSID must input certainly.";
}
return true;
}