本文整理汇总了PHP中flexicontent_html::ItemVote方法的典型用法代码示例。如果您正苦于以下问题:PHP flexicontent_html::ItemVote方法的具体用法?PHP flexicontent_html::ItemVote怎么用?PHP flexicontent_html::ItemVote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类flexicontent_html
的用法示例。
在下文中一共展示了flexicontent_html::ItemVote方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDisplayCoreFieldValue
//.........这里部分代码省略.........
if ($itemprop) {
$field->{$prop} = '<div style="display:inline" itemprop="' . $itemprop . '" >' . $field->{$prop} . '</div>';
}
break;
case 'hits':
// hits
$field->value[] = $item->hits;
$field->{$prop} = $pretext . $item->hits . $posttext;
break;
case 'type':
// document type
$field->value[] = $item->type_id;
$field->{$prop} = $pretext . JText::_($item->typename) . $posttext;
break;
case 'version':
// version
$field->value[] = $item->version;
$field->{$prop} = $pretext . $item->version . $posttext;
break;
case 'state':
// state
$field->value[] = $item->state;
$field->{$prop} = $pretext . flexicontent_html::stateicon($item->state, $field->parameters) . $posttext;
break;
case 'voting':
// voting button
if ($_vote === false) {
$vote =& $item->vote;
} else {
$vote =& $_vote;
}
$field->value[] = 'button';
// dummy value to force display
$field->{$prop} = $pretext . flexicontent_html::ItemVote($field, 'all', $vote) . $posttext;
break;
case 'favourites':
// favourites button
if ($_favourites === false) {
$favourites =& $item->favs;
} else {
$favourites =& $_favourites;
}
if ($_favoured === false) {
$favoured =& $item->fav;
} else {
$favoured =& $_favoured;
}
$field->value[] = 'button';
// dummy value to force display
$favs = flexicontent_html::favoured_userlist($field, $item, $favourites);
$field->{$prop} = $pretext . '
<div class="fav-block">
' . flexicontent_html::favicon($field, $favoured, $item) . '
<div id="fcfav-reponse_item_' . $item->id . '" class="fcfav-reponse-tip">
<div class="fc-mssg-inline fc-info fc-iblock fc-nobgimage ' . ($favoured ? 'fcfavs-is-subscriber' : 'fcfavs-isnot-subscriber') . '">
' . JText::_($favoured ? 'FLEXI_FAVS_YOU_HAVE_SUBSCRIBED' : 'FLEXI_FAVS_CLICK_TO_SUBSCRIBE') . '
</div>
' . $favs . '
</div>
</div>
' . $posttext;
break;
case 'categories':
// assigned categories
$field->{$prop} = '';
if ($_categories === false) {
示例2: onDisplayCoreFieldValue
//.........这里部分代码省略.........
JFactory::getDocument()->addCustomTag('<meta property="og:title" content="' . $content_val . '" />');
}
}
break;
case 'hits':
// hits
$field->value[] = $item->hits;
$field->display = $pretext . $item->hits . $posttext;
break;
case 'type':
// document type
$field->value[] = $item->type_id;
$field->display = $pretext . JText::_($item->typename) . $posttext;
break;
case 'version':
// version
$field->value[] = $item->version;
$field->display = $pretext . $item->version . $posttext;
break;
case 'state':
// state
$field->value[] = $item->state;
$field->display = $pretext . flexicontent_html::stateicon($item->state, $field->parameters) . $posttext;
break;
case 'voting':
// voting button
if ($_vote === false) {
$vote =& $item->vote;
} else {
$vote =& $_vote;
}
$field->value[] = 'button';
// dummy value to force display
$field->display = $pretext . flexicontent_html::ItemVote($field, 'all', $vote) . $posttext;
break;
case 'favourites':
// favourites button
if ($_favourites === false) {
$favourites =& $item->favs;
} else {
$favourites =& $_favourites;
}
if ($_favoured === false) {
$favoured =& $item->fav;
} else {
$favoured =& $_favoured;
}
$field->value[] = 'button';
// dummy value to force display
$favs = flexicontent_html::favoured_userlist($field, $item, $favourites);
$field->display = $pretext . '
<span class="fav-block">
' . flexicontent_html::favicon($field, $favoured, $item) . '
<span id="fcfav-reponse_' . $field->item_id . '" class="fcfav-reponse">
<small>' . $favs . '</small>
</span>
</span>
' . $posttext;
break;
case 'categories':
// assigned categories
$field->display = '';
if ($_categories === false) {
$categories =& $item->cats;
} else {
$categories =& $_categories;