Не хотелось создавать дополнительную тему.
Подскажите пожалуйста как выводить текст( это уже понятно из предыдущих постов ) да еще и с картинками?
Спасибо большое.


$sql = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_last_post_id, t.topic_first_post_id, t.topic_replies, t.topic_replies_real, p.post_id, p.post_text, p.bbcode_uid, p.bbcode_bitfield, p.post_attachment, p.post_approved, a.topic_id, a.real_filename, a.attach_id
FROM ' . TOPICS_TABLE . ' AS t, ' . POSTS_TABLE . ' AS p, '.ATTACHMENTS_TABLE." AS a
WHERE t.topic_id = $topic_id
AND p.post_id = t.topic_first_post_id
AND a.topic_id = $topic_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
echo '<pre>';print_r($row);echo '</pre>';
$post_text = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], 7);
// Assign index specific vars
$template->assign_vars(array(
'POST_TEXT' => $post_text)
);
// Output page
page_header($user->lang['INDEX']);
$template->set_filenames('announcements',array(
'body' => 'test_body.html')
);

/**
* General attachment parsing
*
* @param mixed $forum_id The forum id the attachments are displayed in (false if in private message)
* @param string &$message The post/private message
* @param array &$attachments The attachments to parse for (inline) display. The attachments array will hold templated data after parsing.
* @param array &$update_count The attachment counts to be updated - will be filled
* @param bool $preview If set to true the attachments are parsed for preview. Within preview mode the comments are fetched from the given $attachments array and not fetched from the database.
*/
function parse_attachments($forum_id, &$message, &$attachments, &$update_count, $preview = false)
Вернуться в Запросы модов для phpBB 3.0.x
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0