กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see


วิธีการทํา addon ForoAgency-ColoredUsername bug

thxf.org

Staff Member
Adminstrator
Moderater
VIP Member
Registered
addon ForoAgency-ColoredUsername คือ addon ที่จะทำให้ชื่อของสมาชิกมีสีตามกลุ่มที่ตั้งไว้ใน user-groups นั้นๆ

bug ที่เจอคือมันจะไปทำให้ addon บางตัวไม่ทำงาน และ สีกลุ่มสมาชิกไม่แสดงใน Forum List - Category latest post


2020-05-10_15-36-02.jpeg


จากภาพ Forum List - Category latest post จะแสดงแค่ในส่วนที่เป็น Furum แต่ส่วน Category จะไม่แสดง

การแก้ไขทำได้โดยไปที่ /admin.php?template-modifications/&type=public เลื่อนลงหา [ForoAgency] Colored Username Everywhere

ที่หัวข้อ node_list_category Forum List - Category latest post ให้แกัไขตามนี้

ส่วน Fine :
HTML:
<li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" />
แก้เป็น
HTML:
<li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" /></li>
และ Replace :
HTML:
<xf:if is="{$xf.options.fa_cue_locations.fl_latestCategoryPost}">
    <li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" rich="true" /></li>
<xf:else />
    $0
</xf:if>
แก้เป็น
HTML:
<xf:if is="{$xf.options.fa_cue_locations.fl_latestCategoryPost}">
    <li class="node-extra-user"><xf:username user="{$extras.LastPostUser}" defaultname="{$extras.last_post_username}" rich="true" /></li>
<xf:else />
    $0
</xf:if>

2020-05-10_15-58-14.jpeg


ส่วน bug ที่ทำให้ addon บางตัวไม่ทำงานแก้ไขโดยไปที่ PAGE_CONTAINER Username color member find

ส่วน Replace :
HTML:
<xf:js src="foroagency/coloredusername/index.js" />
แก้เป็น
HTML:
<xf:js src="foroagency/coloredusername/index.js" />
$0


เรียบร้อยครับ 👍
 
แก้ไขล่าสุดเมื่อ:



กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see
ด้านบน ด้านล่าง