本文整理汇总了PHP中BxTemplVotingView::getJustVotingElement方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplVotingView::getJustVotingElement方法的具体用法?PHP BxTemplVotingView::getJustVotingElement怎么用?PHP BxTemplVotingView::getJustVotingElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxTemplVotingView
的用法示例。
在下文中一共展示了BxTemplVotingView::getJustVotingElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: genLeaderPack
function genLeaderPack($aMTypes, $sSex = 'male')
{
$sSLeaders = '';
if (is_array($aMTypes) and count($aMTypes) > 0) {
$sVacantC = _t('_Vacant');
$sOfflineC = _t('_Offline');
$sMaleIcon = getTemplateIcon('male.png');
$sFemaleIcon = getTemplateIcon('female.png');
$sSpacerIcon = getTemplateImage('spacer.gif');
$sOfflineIcon = getTemplateIcon('sys_status_offline.png');
$sSexIcon = $sThumbType = '';
switch ($sSex) {
case 'male':
$sSexIcon = $sMaleIcon;
$sThumbType = 'man';
break;
case 'female':
$sSexIcon = $sFemaleIcon;
$sThumbType = 'woman';
break;
}
$sSexThumbIcon = getTemplateIcon($sThumbType . '_medium.gif');
foreach ($aMTypes as $sTopType => $iMembID) {
$sTypeName = $sTopType;
$sTypeNameUcf = ucfirst($sTopType);
$sLabel = _t('_' . $sTypeNameUcf);
$oMembVoting = new BxTemplVotingView('profile', $iMembID);
$sVotingVal = '<div class="rate_block_position">' . $oMembVoting->getJustVotingElement(0) . '</div>';
$iVotesCnt = $oMembVoting->getVoteCount();
$sMembThumb = $sProfileLink = '';
if ($iMembID > 0) {
$sMembThumb = get_member_thumbnail($iMembID, 'none', false);
$sMemberName = getNickname($iMembID);
$sMemberLink = getProfileLink($iMembID);
$sProfileLink = <<<EOF
<a href="{$sMemberLink}">{$sMemberName}</a>
EOF;
} else {
$sMembThumb = <<<EOF
<div class="thumbnail_image" style="width: 68px; height: 68px;">
<a href="javascript:void(0)">
<img title="{$sVacantC}" alt="{$sVacantC}" style="background-image: url({$sSexThumbIcon}); width: 64px; height: 64px;" src="{$sSpacerIcon}" />
<img class="sys-online-offline" title="{$sOfflineC}" alt="{$sOfflineC}" src="{$sOfflineIcon}" />
</a>
</div>
EOF;
$sProfileLink = <<<EOF
<a class="vacant" href="javascript: void(0);">{$sVacantC}</a>
EOF;
}
$sVotes = _t('_{0} votes', $iVotesCnt);
$sSLeaders .= <<<EOF
<div id="prof_of_{$sTypeName}" class="featured_block_1">
\t<div class="top_rated_head">
\t\t<div class="sex_icon" style="background:url({$sSexIcon}) center 2px no-repeat;"> </div>
\t\t<div class="type_vote">
\t\t\t{$sLabel}<br />
\t\t\t<font style="font-size:9px;color:#999;">{$sVotes}</font>
\t\t</div>
\t\t<div class="clear_both"></div>
\t</div>
\t{$sMembThumb}
\t{$sVotingVal}
\t<div class="thumb_username">{$sProfileLink}</div>
\t<div class="clear_both"></div>
</div>
EOF;
}
return $sSLeaders;
}
}