1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 21:32:09 +02:00

#4452 - Add e_print addon code and check

This commit is contained in:
Moc
2021-03-17 19:42:21 +01:00
parent 07faad666a
commit b2cf6c07b3
3 changed files with 60 additions and 35 deletions

View File

@@ -3,33 +3,10 @@ if (!defined('e107_INIT')) { exit; }
function print_item($thread_id)
{
global $tp;
$gen = new convert;
include_once(e_PLUGIN.'forum/forum_class.php');
$forum = new e107forum;
$thread_info = $forum->threadGet($thread_id,0,999);
$thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE);
$text = "<b>".$thread_name."</b><br />
".$thread_info[0]['user_name'].", ".$gen->convert_date($thread_info[0]['thread_datestamp'], "forum")."<br /><br />
".$tp->toHTML($thread_info[0]['thread_thread'], TRUE);
$count = 1;
unset($thread_info[0], $thread_info['head']);
foreach($thread_info as $reply)
{
$text .= "<br /><br />Re: <b>".$thread_name."</b><br />
".$reply['user_name'].", ".$gen->convert_date($reply['thread_datestamp'], "forum")."<br /><br />
".$tp->toHTML($reply['thread_thread'], TRUE);
}
// return "<pre>".print_r($thread_info,TRUE)."</pre>";
return $text;
// moved to e_print.php
}
function email_item($thread_id)
{
global $tp;
@@ -53,5 +30,4 @@ function email_item($thread_id)
".$tp->toHTML($reply['thread_thread'], TRUE);
}
return $text;
}
}