by Ittichai_chupol » 15/06/2019 2:14 pm
ผมอยากทราบว่าถ้าต้องการที่จะดึกรูปภาพที่แนบเก็บไว้ แต่ไม่ได้นำมาโพสต์ มาแสดงใน html ธรรมดา โดยที่ไม่ผ่าน phpbb จะต้องอย่างไรครับ ถึึงจะได้ html ที่มาการแสดงผลลักษณะ ดังภาพครับ

- Selection_999(1467).png (111.09 KiB) Viewed 299 times
โคดที่ใช้ในการหาครับ
Code: Select all
$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
$message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true);
if (!empty($attachments[$post_id])) {
parse_attachments($forum_id, $message, $attachments[$post_id], $update_count);
$massage_share = str_replace('./../../', $url_user . '/', $message); //แทน ./../../ ให้เป็น url เพื่อใช้แสดงรูปภาพด้านนอกของ html
$message = $massage_share;
}
ผมอยากทราบว่าถ้าต้องการที่จะดึกรูปภาพที่แนบเก็บไว้ แต่ไม่ได้นำมาโพสต์ มาแสดงใน html ธรรมดา โดยที่ไม่ผ่าน phpbb จะต้องอย่างไรครับ ถึึงจะได้ html ที่มาการแสดงผลลักษณะ ดังภาพครับ
[attachment=0]Selection_999(1467).png[/attachment]
โคดที่ใช้ในการหาครับ
[code]
$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
$message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true);
if (!empty($attachments[$post_id])) {
parse_attachments($forum_id, $message, $attachments[$post_id], $update_count);
$massage_share = str_replace('./../../', $url_user . '/', $message); //แทน ./../../ ให้เป็น url เพื่อใช้แสดงรูปภาพด้านนอกของ html
$message = $massage_share;
}
[/code]