0124 | อัปรูปใน smf ไม่เปลืองพื้นที่ ^^

ใครผ่านไป ผ่านมาที่ใช้เว็บบอร์ด SMF อยู่ เรียนเชิญเอา iframe ไปแปะ เพือให้อัปโหลดรูปได้สะดวก สบาย ไม่เปลืองพื้นที่กันครับ

1. ให้เปิดไฟล์? Post.Template.php ที่อยู่ใน folder ของ theme ที่ท่านใช้อยู่ครับ และค้นหา

[code lang=”php”]
// Finally the most important bit – the actual text box to write in!
echo ‘
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="’, $context[‘post_box_name’], ‘" rows="’, $context[‘post_box_rows’], ‘" cols="’, $context[‘post_box_columns’], ‘" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="’, $context[‘tabindex’]++, ‘"’, isset($context[‘post_error’][‘no_message’]) || isset($context[‘post_error’][‘long_message’]) ? ‘ style="border: 1px solid red;"’ : ”, ‘>’, $message, ‘</textarea>
</td>
</tr>’;
[/code]


2. แทนที่ด้วย

[code lang=”php”]
// Finally the most important bit – the actual text box to write in!

echo ‘
<tr>
<td valign="top" align="right"></td>
<td>
<textarea class="editor" name="’, $context[‘post_box_name’], ‘" rows="’, $context[‘post_box_rows’], ‘" cols="’, $context[‘post_box_columns’], ‘" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="’, $context[‘tabindex’]++, ‘"’, isset($context[‘post_error’][‘no_message’]) || isset($context[‘post_error’][‘long_message’]) ? ‘ style="border: 1px solid red;"’ : ”, ‘>’, $message, ‘</textarea>
</td>
</tr>
<tr><td align="right"><b>Upload Pic:</b></td><td><iframe src="http://pic9.in/upload-iframe.php" style="width: 400px; height: 100px;" marginheight="0" marginwidth="0" allowtransparency="true" frameborder="0" scrolling="no"></iframe></td></tr>’;
}
[/code]

แค่นี้แหละครับ เสร็จแล้ว

หน้าตาที่ได้ ก็จะประมาณนี้

You may also like...

3 Responses

  1. ถ้ามันไม่พอดียังไง ก็ลองปรับขนาดให้เหมาะสมเอาเองนะครับ

  2. Kaijae4 says:

    แล้วมันจะลิ้งไปฝากไว้ที่ไหนครับ

  3. iGOLF says:

    ออ พอดีเว็บ pic9.in ปิดตัวไปแล้วนะครับ

Leave a Reply

Your email address will not be published. Required fields are marked *