Hướng dẫn Widget Framework Poll Block - Chỉnh sửa block bỏ phiếu của Widget Framework

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,829
Được Like
12,688
Widget Framework Poll Block - Chỉnh sửa block bỏ phiếu của Widget Framework

Điều này sẽ làm cho kết quả của bạn xuất hiện như sau:

Selection_13-19.jpg

Trong template wf_widget_poll_block_result thay thế toàn bộ bằng đoạn code sau:
Mã:
<xen:edithint template="wf_default.css" />
<xen:edithint template="polls.css" />
<style type="text/css">
.widget-poll .pollBlock .pollResult h3.optionText {
text-overflow: inherit !important;
width: 100% !important;
display:block !important;
margin: 0;
padding: 0;
}
.widget-poll .pollBlock .pollResult div {
display:block !important;
}
.widget-poll .pollBlock .pollResult .count {
width:100% !important;
text-align:left !important;
}
.widget-poll .pollBlock .pollResult .barCell {
padding-left:0 !important;
margin-bottom: 10px;
}
.widget-poll div.totalVotes {
font-size: 12px;
}
.widget-poll .pollResult .barContainer {
border: none !important;
}
</style>
<div class="overlayScroll pollResultsOverlay">

<ol class="pollResults">
<xen:foreach loop="$poll.responses" key="$pollResponseId" value="$response">
<li class="pollResult {xen:if $response.hasVoted, voted}">
<h3 class="optionText" {xen:if $response.hasVoted, 'title="{xen:phrase your_vote}"'}>
{$response.response}
</h3>


<div class="count">
(<xen:if is="{$poll.voter_count}">
{xen:number {xen:calc "100 * {$response.response_vote_count} / {$poll.voter_count}"}, 1}%
<xen:else />
{xen:number 0, 1}%
</xen:if>,
<xen:if is="{$poll.public_votes} AND {$response.response_vote_count}">
<a href="{xen:link threads/poll/results, $thread, 'poll_response_id={$pollResponseId}'}" class="concealed OverlayTrigger">{xen:phrase x_votes, 'count={xen:number $response.response_vote_count}'}</a>
<xen:else />
{xen:phrase x_votes, 'count={xen:number $response.response_vote_count}'}
</xen:if>)

</div>

<div class="barCell">
<span class="barContainer">
<xen:if is="{$response.response_vote_count}"><span class="bar" style="width: {xen:calc "100 * {$response.response_vote_count} / {$poll.voter_count}"}%"></span></xen:if>
</span>
</div>
</li>
</xen:foreach>
</ol>
<div class="totalVotes">Total votes: {$poll.voter_count}</div>
</div>

Chúc các bạn thành công.


Nguồn: xenforo.rocks​
 
  • Like
Reactions: THB

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom