本文整理汇总了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");
}
示例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();