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


PHP Definition::getWordCountLastMonth方法代码示例

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


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

示例1: smarty_fetchSkin

function smarty_fetchSkin()
{
    $skin = session_getSkin();
    // Set some skin variables based on the skin preferences in the config file.
    // Also assign some skin-specific variables so we don't compute them unless we need them
    $skinVariables = session_getSkinPreferences($skin);
    switch ($skin) {
        case 'zepu':
            $skinVariables['afterSearchBoxBanner'] = true;
            break;
        case 'polar':
            $wordCount = Definition::getWordCount();
            $wordCountRough = $wordCount - $wordCount % 10000;
            smarty_assign('words_total', util_formatNumber($wordCount, 0));
            smarty_assign('words_rough', util_formatNumber($wordCountRough, 0));
            smarty_assign('words_last_month', util_formatNumber(Definition::getWordCountLastMonth(), 0));
            break;
        case 'mobile':
            smarty_assign('words_total', util_formatNumber(Definition::getWordCount(), 0));
            smarty_assign('words_last_month', util_formatNumber(Definition::getWordCountLastMonth(), 0));
            break;
    }
    smarty_assign('skinVariables', $skinVariables);
    smarty_register_outputfilters();
    return $GLOBALS['smarty_theSmarty']->fetch("{$skin}/pageLayout.ihtml");
}
开发者ID:nastasie-octavian,项目名称:DEXonline,代码行数:26,代码来源:smarty.php

示例2: array_reduce

// Display a custom ad 50% of the times
if (rand(0, 99) < 50) {
    AdsModule::runAllModules(null, null);
}
$widgets = Preferences::getWidgets(session_getUser());
$numEnabledWidgets = array_reduce($widgets, function ($result, $w) {
    return $result + $w['enabled'];
});
$wordCount = Definition::getWordCount();
$wordCountRough = $wordCount - $wordCount % 10000;
SmartyWrap::assign('page_title', 'Dicționar explicativ al limbii române');
SmartyWrap::assign('onHomePage', '1');
SmartyWrap::assign('letters', preg_split('//u', 'aăâbcdefghiîjklmnopqrsștțuvwxyz'));
SmartyWrap::assign('words_total', util_formatNumber($wordCount, 0));
SmartyWrap::assign('words_rough', util_formatNumber($wordCountRough, 0));
SmartyWrap::assign('words_last_month', util_formatNumber(Definition::getWordCountLastMonth(), 0));
SmartyWrap::assign('widgets', $widgets);
SmartyWrap::assign('numEnabledWidgets', $numEnabledWidgets);
/* WotD part */
$wotd = WordOfTheDay::getTodaysWord();
if (!$wotd) {
    WordOfTheDay::updateTodaysWord();
    $wotd = WordOfTheDay::getTodaysWord();
}
$defId = WordOfTheDayRel::getRefId($wotd->id);
$def = Model::factory('Definition')->where('id', $defId)->where('status', ST_ACTIVE)->find_one();
SmartyWrap::assign('thumbUrl', $wotd->getThumbUrl());
SmartyWrap::assign('title', $def->lexicon);
SmartyWrap::assign('today', date('Y/m/d'));
/* WotM part */
$wotm = WordOfTheMonth::getCurrentWotM();
开发者ID:Jobava,项目名称:mirror-dexonline,代码行数:31,代码来源:index.php


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