Đầu tiên các bạn install mod post thank you hack: [AJAX] Post Thank You Hack 7.83 (updated)
Vào style mobile add các templates sau:
post_thanks_box
post_thanks_box_bit
post_thanks_button
post_thanks_javascript
post_thanks_memberinfo_block
post_thanks_postbit
post_thanks_postbit_info
Vào template postbit hoặc postbit_legacy add đoạn code này vào cuối cùng:
Tiếp tục add đoạn code này vào nơi bạn muốn hiện nút thank trong postbit hoặc postbit_legacy
Vào style mobile add các templates sau:
post_thanks_box
HTML:
<div class="postbit<vb:if condition="$vboptions['legacypostbit']">legacy</vb:if> postbitim" id="post_thanks_box_{vb:raw post.postid}"<vb:if condition="!$post_thanks_box == 1"> style="display:none"</vb:if>> {vb:raw post_thanks_box}
</div>
post_thanks_box_bit
HTML:
<a href="member.php?{vb:raw session.sessionurl}u={vb:raw thank.userid}" rel="nofollow">{vb:raw thank.username}</a><vb:if condition="$date_thank"> ({vb:raw date_thank})</vb:if>{vb:raw virg}
post_thanks_button
HTML:
<a id="btn" href="post_thanks.php?{vb:raw session.sessionurl}do=post_thanks_add&p={vb:raw post.postid}&securitytoken={vb:raw bbuserinfo.securitytoken}" id="post_thanks_button_{vb:raw post.postid}"<vb:if condition="$vboptions[disable_ajax] != 2"> onclick="return post_thanks_give({vb:raw post.postid}, <vb:if condition="$vboptions[post_groan_integrate]">true<vb:else />false</vb:if>);"</vb:if> <vb:if condition="$display_thanks_image == 'none'">style="display:none"</vb:if> rel="nofollow" class="post_thanks_button">{vb:rawphrase post_thanks_thanks}</a>
<span class="seperator" id="post_thanks_separator_{vb:raw post.postid}" <vb:if condition="$display_thanks_image == 'none'">style="display:none"</vb:if>> </span>
post_thanks_javascript
HTML:
<script type="text/javascript" src="clientscript/post_thanks.js"></script>
<style type="text/css">
.postbitlegacy .postfoot .textcontrols a.post_thanks_button, .postbit .postfoot .textcontrols a.post_thanks_button {
background: url({vb:stylevar imgdir_button}/post_thanks.png) no-repeat transparent {vb:stylevar left};
padding-{vb:stylevar left}: 20px;
}
.postbitlegacy .postfoot .textcontrols a.post_thanks_button:hover, .postbit .postfoot .textcontrols a.post_thanks_button:hover {
background: url({vb:stylevar imgdir_button}/post_thanks-hover.png) no-repeat transparent {vb:stylevar left};
</style>
post_thanks_memberinfo_block
HTML:
<h5 class="subsubsectionhead">{vb:rawphrase post_thanks_total_thanks}</h5><dl class="stats">
<dt>{vb:rawphrase post_thanks_total_thanks}</dt>
<dd>{vb:raw userinfo.post_thanks_user_amount_formatted}</dd>
</dl>
<ul class="group">
<li>
<vb:if condition="$userinfo[post_thanks_thanked_times] == 1">
{vb:rawphrase post_thanks_time_post}
<vb:else />
<vb:if condition="$userinfo[post_thanks_thanked_posts] == 1">
{vb:rawphrase post_thanks_times_post, {vb:raw userinfo.post_thanks_thanked_times_formatted}}
<vb:else />
{vb:rawphrase post_thanks_times_posts, {vb:raw userinfo.post_thanks_thanked_times_formatted}, {vb:raw userinfo.post_thanks_thanked_posts_formatted}}
</vb:if>
</vb:if>
</li>
<!-- <li>
<a href="post_thanks.php?{vb:raw session.sessionurl}do=findthanks&u={vb:raw userinfo.userid}">{vb:rawphrase post_thanks_search_user, {vb:raw userinfo.username}}</a>
</li>
<li>
<a href="post_thanks.php?{vb:raw session.sessionurl}do=findthanks_user_gave&u={vb:raw userinfo.userid}">{vb:rawphrase post_thanks_search_user_gave, {vb:raw userinfo.username}}</a>
</li>-->
</ul>
post_thanks_postbit
HTML:
Thành viên đã cảm ơn: {vb:raw post.post_thanks_bit}
post_thanks_postbit_info
HTML:
<vb:if condition="$post['userid']">Thank: [{vb:raw post.post_thanks_user_amount_formatted}/{vb:raw post.post_thanks_thanked_times_formatted}]
</vb:if>
Vào template postbit hoặc postbit_legacy add đoạn code này vào cuối cùng:
HTML:
{vb:raw template_hook.postbit_end}
HTML:
{vb:raw template_hook.postbit_controls}