SMF Thailand.

SMF Development => SMF Coding Discussion => ข้อความที่เริ่มโดย: mapandy ที่ 2/02/06, 17:00:40

หัวข้อ: ถึงคุณ КёngЯacing เรื่อง [code] แยกระหว่างหัวข้อติดหมุดกับหัวข้อปกติออกจากกัน
เริ่มหัวข้อโดย: mapandy ที่ 2/02/06, 17:00:40
จากที่เข้าไปที่กระทู้  http://smf.rcweb.net/index.php?topic=89.0

ผมลองแก้ไฟล์ดู  ปรากฏว่าเปลี่ยนยังไงก็แสดงผลเหมือนเดิมครับ  เลยขอความกระจ่างอีกครั้ง

1. ค้นหาโค๊ด 

foreach ($context['topics'] as $topic)
   {

2. ใส่โค๊ดต่อ

if (isset($previousTopicClass) && strpos($previousTopicClass, 'sticky') !== false && !$topic['is_sticky'])
echo '
<tr class="titlebg" style="font-size: 1ex;">
<td colspan="2">&nbsp;</td>
<td colspan="7">&nbsp;</td>
</tr>';
$previousTopicClass = $topic['class'];

อยากถามว่าต่อตรงไหนครับ 
ระหว่าง 1
foreach ($context['topics'] as $topic)
   {if (isset($previousTopicClass) && strpos($previousTopicClass, 'sticky') !== false && !$topic['is_sticky'])
echo '
<tr class="titlebg" style="font-size: 1ex;">
<td colspan="2">&nbsp;</td>
<td colspan="7">&nbsp;</td>
</tr>';
$previousTopicClass = $topic['class'];

หรือ 2
foreach ($context['topics'] as $topic) if (isset($previousTopicClass) && strpos($previousTopicClass, 'sticky') !== false && !$topic['is_sticky'])
echo '
<tr class="titlebg" style="font-size: 1ex;">
<td colspan="2">&nbsp;</td>
<td colspan="7">&nbsp;</td>
</tr>';
$previousTopicClass = $topic['class'];
   {

หรือแบบอื่นครับ  ยังไงขอความอนุเคราะห์ให้ความกระจ่างด้วยครับ
หัวข้อ: Re: ถึงคุณ КёngЯacing เรื่อง [code] แยกระหว่างหัวข้อติดหมุดกับหัวข้อปกติออกจากก
เริ่มหัวข้อโดย: КёngЯacing ที่ 2/02/06, 21:25:31
ใส่ต่อ หมายถึงขึ้นบรรทัดใหม่ ของ {