Hey guys i made a tutoriel section on my website based on threads posted on certain boards. The module works great but now i would like to loop the messages posted in that thread id using the forum template system ... How can i do that?
I currently have the thread id as a var and the first message of the thread is already showed in a certain way. All i need is the other messages.
if i add the folowing code:
I get the post i need but it comes with the hole forum template ... all i need is the post part with out the header and foother of the board.
i got it working thx ;-)
I currently have the thread id as a var and the first message of the thread is already showed in a certain way. All i need is the other messages.
if i add the folowing code:
$tid = intval($_GET["tid"]);
$thread = get_thread($tid);
$fid = $thread['fid'];
$forum = get_forum($fid);
$post = get_post($thread['firstpost']);
$msg = $post['message'];
$forumpermissions = forum_permissions($thread['fid']);
if($forumpermissions['canviewthreads'] == 1) {
$parser_options = array(
"allow_html" => 0,
"allow_mycode" => 1,
"allow_smilies" => 1,
"allow_imgcode" => 1,
"allow_videocode" => 1,
"filter_badwords" => 1
);
$message = $parser->parse_message($msg, $parser_options);
$message = str_replace("\"images/", "\"forum/images/", $message);
chdir('forum/');
include("showthread.php");
chdir('../');
}
I get the post i need but it comes with the hole forum template ... all i need is the post part with out the header and foother of the board.
i got it working thx ;-)