mirror of
https://github.com/e107inc/e107.git
synced 2025-08-17 20:01:47 +02:00
Fixes #4669 - Forum print issue.
This commit is contained in:
@@ -6,28 +6,7 @@ function print_item($thread_id)
|
|||||||
// moved to e_print.php
|
// moved to e_print.php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function email_item($thread_id)
|
function email_item($thread_id)
|
||||||
{
|
{
|
||||||
global $tp;
|
return e107::getAddon('forum','e_print')->render($thread_id); // Quick Fix
|
||||||
$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 $text;
|
|
||||||
}
|
}
|
@@ -15,7 +15,7 @@ class forum_print // plugin-folder + '_print'
|
|||||||
//print_a($thread_info);
|
//print_a($thread_info);
|
||||||
|
|
||||||
// Check if user is allowed to view this forum topic
|
// Check if user is allowed to view this forum topic
|
||||||
if(!$forum->checkPerm($thread_info['thread_forum_id'], 'view'))
|
if(!$forum->checkPerm($thread_info['thread_forum_id']))
|
||||||
{
|
{
|
||||||
return LAN_FORUM_0008;
|
return LAN_FORUM_0008;
|
||||||
}
|
}
|
||||||
@@ -28,12 +28,12 @@ class forum_print // plugin-folder + '_print'
|
|||||||
$topic_name = e107::getParser()->toHTML($thread_info['thread_name'], true);
|
$topic_name = e107::getParser()->toHTML($thread_info['thread_name'], true);
|
||||||
|
|
||||||
// Display topic name
|
// Display topic name
|
||||||
$text .= "<strong>".$topic_name."</strong><br />";
|
$text .= "<h3>".$topic_name."</h3>";
|
||||||
|
|
||||||
// Display initial (first) post in topic
|
// Display initial (first) post in topic
|
||||||
$text .= "
|
$text .= "<em>
|
||||||
".$post_list[0]['user_name'].", ".e107::getDate()->convert_date($post_list[0]['post_datestamp'], "forum")."
|
".$post_list[0]['user_name'].", ".e107::getDate()->convert_date($post_list[0]['post_datestamp'], "forum")."
|
||||||
<br /><br />
|
</em><br /><br />
|
||||||
".$tp->toHTML($post_list[0]['post_entry'], true);
|
".$tp->toHTML($post_list[0]['post_entry'], true);
|
||||||
|
|
||||||
// Remove original post from $post_list array, so only replies are left
|
// Remove original post from $post_list array, so only replies are left
|
||||||
@@ -42,9 +42,10 @@ class forum_print // plugin-folder + '_print'
|
|||||||
// Loop through each reply
|
// Loop through each reply
|
||||||
foreach($post_list as $reply)
|
foreach($post_list as $reply)
|
||||||
{
|
{
|
||||||
$text .= "<br /><br />Re: <strong>".$topic_name."</strong><br />
|
$text .= "<div style='padding:10px 0px; border-top:1px dashed #cccccc'>Re: <strong>".$topic_name."</strong><br />
|
||||||
".$reply['user_name'].", ".e107::getDate()->convert_date($reply['post_datestamp'], "forum")."<br /><br />
|
<em>".$reply['user_name'].", ".e107::getDate()->convert_date($reply['post_datestamp'], "forum")."</em><br /><br />
|
||||||
".$tp->toHTML($reply['post_entry'], TRUE);
|
".$tp->toHTML($reply['post_entry'], true).
|
||||||
|
"</div>\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
|
@@ -177,11 +177,11 @@ if (isset($_POST['emailsubmit']))
|
|||||||
|
|
||||||
if (sendemail($email_send, LAN_EMAIL_3.SITENAME,$email_body))
|
if (sendemail($email_send, LAN_EMAIL_3.SITENAME,$email_body))
|
||||||
{
|
{
|
||||||
$text = "<div style='text-align:center'>".LAN_EMAIL_10." ".$email_send."</div>";
|
$text = "<div class='alert alert-success alert-block' style='text-align:center'>".LAN_EMAIL_10." ".$email_send."</div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text = "<div style='text-align:center'>".LAN_EMAIL_9."</div>";
|
$text = "<div class='alert alert-dangere alert-block' style='text-align:center'>".LAN_EMAIL_9."</div>";
|
||||||
}
|
}
|
||||||
$ns->tablerender(LAN_EMAIL_11, $text);
|
$ns->tablerender(LAN_EMAIL_11, $text);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user