本文整理匯總了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;