<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
$topic_id = 5;
$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
FROM ' . TOPICS_TABLE . ' AS t, ' . POSTS_TABLE . " AS p
WHERE t.topic_id = $topic_id
AND p.post_id = t.topic_first_post_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$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(array(
'body' => 'test_body.html')
);
page_footer();
?>{POST_TEXT}NCom писал(а):создание новой не требуется.... как мне это сделть?
$topic_id = 5;
$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
FROM ' . TOPICS_TABLE . ' AS t, ' . POSTS_TABLE . " AS p
WHERE t.topic_id = $topic_id
AND p.post_id = t.topic_first_post_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$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)
);
Вернуться в Запросы модов для phpBB 3.0.x
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0