วิธีทำปุ่มให้คะแนน X1
แก้ไขครั้งสุดท้ายโดย rokaisakkon เมื่อ 2011-3-30 02:16วิธีทำปุ่มให้คะแนน X1
แบบนี้ครับ
ต้องแก้ไข 3 ไฟล์ ครับ
*module.css
*ajaxaction.gif
*viewthread_node_body.htm
เปิดไฟล์ *root\template\"สกินที่คุณใช้"\common\module.css
ค้นหา
.uo { clear: both; display: block; margin: 20px auto; width: 180px; height: 50px; }
.nrate { width: 240px; }
.uo a { float: left; margin-right: 10px; padding: 34px 0 0; width: 53px; height: 27px; text-align: center; background: url({IMGDIR}/ajaxaction.gif) no-repeat 0 0; }
.uo #k_share { background-position: 0 -61px; }
เปลี่ยนเป็น
.uo { clear: both; display: block; margin: 20px auto; width: 180px; height: 50px; }
.nrate { width: 300px; }
.uo a { float: left; margin-right: 10px; padding: 34px 0 0; width: 53px; height: 27px; text-align: center; background: url({IMGDIR}/ajaxaction.gif) no-repeat 0 0; }
.uo #k_share { background-position: 0 -122px; }
.uo #k_score{ background-position: 0 0px; }
.uo #k_favorite{ background-position: 0 -61px; }
เปิดไฟล์ *root\template\"สกินที่คุณใช้"\forum\viewthread_node_body.htm
ค้นหา
<div class="uo{if $_G['group']['allowrecommend'] && $_G['setting']['recommendthread']} nrate{/if}">
<!--{if $_G}-->
<a href="home.php?mod=spacecp&ac=favorite&type=thread&id=$_G&handlekey=forumthread" id="k_favorite" onclick="showWindow(this.id, this.href, 'get', 0);">{lang thread_favorite}</a>
<a href="home.php?mod=spacecp&ac=share&type=thread&id=$_G" id="k_share" onclick="showWindow(this.id, this.href, 'get', 0);">{lang thread_share}</a>
<!--{/if}-->
เปลี่ยนเป็น //ปล. ผมได้เปลี่ยนโค้ดใหม่ เมื่อคุณไม่ได้เข้าสู่ระบบ จะไม่เป็นพื้นที่ ขาว ๆ โล่ง ๆ ^^
<!--{if $_G}-->
<div class="uo{if $_G['group']['allowrecommend'] && $_G['setting']['recommendthread']} nrate{/if}">
<a href="javascript:;" onclick="showWindow('rate', 'forum.php?mod=misc&action=rate&tid=$_G&pid=$post{if $_G}&from=$_G{/if}');return false;">{lang rate}</a>
<a href="home.php?mod=spacecp&ac=favorite&type=thread&id=$_G&handlekey=forumthread" id="k_favorite" onclick="showWindow(this.id, this.href, 'get', 0);">{lang thread_favorite}</a>
<a href="home.php?mod=spacecp&ac=share&type=thread&id=$_G" id="k_share" onclick="showWindow(this.id, this.href, 'get', 0);">{lang thread_share}</a>
<!--{/if}-->
เอารูปภาพอันนี้ไปแทนที่
สำหรับคนใช้สกินเดิม >> *root\static\image\common\ajaxaction.gif
สำหรับคนใช้สกินแต่ง >> *root\static\image\"สกินที่คุณใช้"\ajaxaction.gif
DEMO
http://www.Ge-7.Com
เอาไปใช้กับ 1.5 ได้ไหมเอ่ย ขอบคุณมากค่ะ
หน้า:
[1]