MyBB Community Forums

Full Version: display a thread on a custom page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hey guys

i have some code here i'm playing with that works pretty well to make a custom page with the myBB header and footer and session management..

define("KILL_GLOBALS", 1);
require "./global.php";
require "./inc/functions_post.php";
$newpage = 0;
$templatelist = _blank_page;
$newpage="<html><head><title>Custom page</title>";

eval("\$newpage .= \"".$templates->get("headerinclude")."\";");
eval("\$newpage .= \"".$templates->get("fuoc")."\";");
eval("\$newpage .= \"".$templates->get("header")."\";");

ob_start();
include 'includefile.htm';
$newpage.= ob_get_contents();
ob_end_clean();

eval("\$newpage .= \"".$templates->get("footer")."\";");
outputpage($newpage);

what i want to do is basically insert a thread from the forum in there just before ob_end_clean(); ... i would know the tid and could pass it to whatever code i call at that spot... but the question is what code, hook, plugin do i use to just drop that thread in there without any header/footer "wrapping" on it?

thanks in advance

s
can nobody can help with this?
^ bump
By thread, do you mean an entire thread, or the first post from a thread?

Although it would not require any hooks or plugins (as far as I know), you would be required to execute a SELECT query into the database and pull out the thread information according to the thread id which, of course, is easier said than done.
hey thar

>By thread, do you mean an entire thread, or the first post from a thread?

the entire thread.

>Although it would not require any hooks or plugins (as far as I know),
>you would be required to execute a SELECT query into the database
>and pull out the thread information according to the thread id which,
>of course, is easier said than done.

yeah - that's what i kinda thought.

thanks

s
If you are intent on doing it, feel free to contact me on MSN or email me at the same address listed in my profile.