mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 11:36:08 +02:00
new module creation
This commit is contained in:
57
e107_plugins/forum/e_emailprint.php
Executable file
57
e107_plugins/forum/e_emailprint.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
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->thread_get($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;
|
||||
}
|
||||
|
||||
function email_item($thread_id)
|
||||
{
|
||||
global $tp;
|
||||
$gen = new convert;
|
||||
include_once(e_PLUGIN.'forum/forum_class.php');
|
||||
$forum = new e107forum;
|
||||
$thread_info = $forum->thread_get($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 $text;
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user