Zeile 230 | Zeile 230 |
---|
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";"); } eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
|
eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";"); } eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
|
| $attach_mod_options = '';
|
eval("\$attemplate = \"".$templates->get("post_attachments_attachment")."\";"); $ret['template'] = $attemplate;
| eval("\$attemplate = \"".$templates->get("post_attachments_attachment")."\";"); $ret['template'] = $attemplate;
|
Zeile 572 | Zeile 573 |
---|
{ $quoted_ids = explode("|", $mybb->get_input('quoted_ids')); $multiquote = explode("|", $mybb->cookies['multiquote']);
|
{ $quoted_ids = explode("|", $mybb->get_input('quoted_ids')); $multiquote = explode("|", $mybb->cookies['multiquote']);
|
if(is_array($multiquote) && is_array($quoted_ids))
| if(!empty($multiquote) && !empty($quoted_ids))
|
{ foreach($multiquote as $key => $quoteid) {
| { foreach($multiquote as $key => $quoteid) {
|
Zeile 583 | Zeile 584 |
---|
} } // Still have an array - set the new cookie
|
} } // Still have an array - set the new cookie
|
if(is_array($multiquote))
| if(!empty($multiquote))
|
{ $new_multiquote = implode(",", $multiquote); my_setcookie("multiquote", $new_multiquote);
| { $new_multiquote = implode(",", $multiquote); my_setcookie("multiquote", $new_multiquote);
|
Zeile 858 | Zeile 859 |
---|
} eval("\$multiquote_external = \"".$templates->get("newreply_multiquote_external")."\";"); }
|
} eval("\$multiquote_external = \"".$templates->get("newreply_multiquote_external")."\";"); }
|
if(is_array($quoted_ids) && count($quoted_ids) > 0) { $quoted_ids = implode("|", $quoted_ids); }
| $quoted_ids = implode("|", $quoted_ids);
|
} }
if(isset($mybb->input['quoted_ids']))
|
} }
if(isset($mybb->input['quoted_ids']))
|
{ $quoted_ids = htmlspecialchars_uni($mybb->get_input('quoted_ids', MyBB::INPUT_INT));
| { $quoted_ids = htmlspecialchars_uni($mybb->get_input('quoted_ids'));
|
}
if(isset($mybb->input['previewpost']))
|
}
if(isset($mybb->input['previewpost']))
|
{
| {
|
$previewmessage = $mybb->get_input('message'); } if(empty($message))
| $previewmessage = $mybb->get_input('message'); } if(empty($message))
|
Zeile 889 | Zeile 887 |
---|
$postoptions = $mybb->get_input('postoptions', MyBB::INPUT_ARRAY);
if(isset($postoptions['signature']) && $postoptions['signature'] == 1)
|
$postoptions = $mybb->get_input('postoptions', MyBB::INPUT_ARRAY);
if(isset($postoptions['signature']) && $postoptions['signature'] == 1)
|
{
| {
|
$postoptionschecked['signature'] = " checked=\"checked\""; } if(isset($postoptions['disablesmilies']) && $postoptions['disablesmilies'] == 1)
| $postoptionschecked['signature'] = " checked=\"checked\""; } if(isset($postoptions['disablesmilies']) && $postoptions['disablesmilies'] == 1)
|
Zeile 898 | Zeile 896 |
---|
} $subscription_method = get_subscription_method($tid, $postoptions); $subject = $mybb->input['subject'];
|
} $subscription_method = get_subscription_method($tid, $postoptions); $subject = $mybb->input['subject'];
|
}
| }
|
elseif($mybb->input['action'] == "editdraft" && $mybb->user['uid']) { $message = htmlspecialchars_uni($post['message']);
| elseif($mybb->input['action'] == "editdraft" && $mybb->user['uid']) { $message = htmlspecialchars_uni($post['message']);
|
Zeile 915 | Zeile 913 |
---|
$mybb->input['icon'] = $post['icon']; } else
|
$mybb->input['icon'] = $post['icon']; } else
|
{
| {
|
if($mybb->user['signature'] != '') { $postoptionschecked['signature'] = " checked=\"checked\""; } $subscription_method = get_subscription_method($tid);
|
if($mybb->user['signature'] != '') { $postoptionschecked['signature'] = " checked=\"checked\""; } $subscription_method = get_subscription_method($tid);
|
}
| }
|
${$subscription_method.'subscribe'} = "checked=\"checked\" ";
|
${$subscription_method.'subscribe'} = "checked=\"checked\" ";
|
|
|
if($forum['allowpicons'] != 0) { $posticons = get_post_icons();
| if($forum['allowpicons'] != 0) { $posticons = get_post_icons();
|
Zeile 931 | Zeile 929 |
---|
// No subject? if(!isset($subject))
|
// No subject? if(!isset($subject))
|
{
| {
|
if(!empty($mybb->input['subject'])) { $subject = $mybb->get_input('subject');
| if(!empty($mybb->input['subject'])) { $subject = $mybb->get_input('subject');
|
Zeile 996 | Zeile 994 |
---|
if(isset($mybb->input['pid'])) { $post['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);
|
if(isset($mybb->input['pid'])) { $post['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);
|
}
| }
|
$posthandler->set_data($post);
// Now let the post handler do all the hard work.
| $posthandler->set_data($post);
// Now let the post handler do all the hard work.
|
Zeile 1030 | Zeile 1028 |
---|
{ $quote_ids = htmlspecialchars_uni($mybb->get_input('quote_ids')); $mybb->input['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT);
|
{ $quote_ids = htmlspecialchars_uni($mybb->get_input('quote_ids')); $mybb->input['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT);
|
$query = $db->query("
| $query = $db->query("
|
SELECT u.*, f.* FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
| SELECT u.*, f.* FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
|
Zeile 1047 | Zeile 1045 |
---|
$post['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT); $mybb->input['postoptions'] = $mybb->get_input('postoptions', MyBB::INPUT_ARRAY); if(isset($mybb->input['postoptions']['disablesmilies']))
|
$post['icon'] = $mybb->get_input('icon', MyBB::INPUT_INT); $mybb->input['postoptions'] = $mybb->get_input('postoptions', MyBB::INPUT_ARRAY); if(isset($mybb->input['postoptions']['disablesmilies']))
|
{
| {
|
$post['smilieoff'] = $mybb->input['postoptions']['disablesmilies']; } $post['dateline'] = TIME_NOW; if(isset($mybb->input['postoptions']['signature']))
|
$post['smilieoff'] = $mybb->input['postoptions']['disablesmilies']; } $post['dateline'] = TIME_NOW; if(isset($mybb->input['postoptions']['signature']))
|
{
| {
|
$post['includesig'] = $mybb->input['postoptions']['signature'];
|
$post['includesig'] = $mybb->input['postoptions']['signature'];
|
}
| }
|
if(!isset($post['includesig']) || $post['includesig'] != 1)
|
if(!isset($post['includesig']) || $post['includesig'] != 1)
|
{
| {
|
$post['includesig'] = 0; }
| $post['includesig'] = 0; }
|
Zeile 1064 | Zeile 1062 |
---|
if($mybb->get_input('pid', MyBB::INPUT_INT)) { $attachwhere = "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'";
|
if($mybb->get_input('pid', MyBB::INPUT_INT)) { $attachwhere = "pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'";
|
}
| }
|
else { $attachwhere = "posthash='".$db->escape_string($mybb->get_input('posthash'))."'";
|
else { $attachwhere = "posthash='".$db->escape_string($mybb->get_input('posthash'))."'";
|
}
| }
|
$query = $db->simple_select("attachments", "*", $attachwhere); while($attachment = $db->fetch_array($query)) {
| $query = $db->simple_select("attachments", "*", $attachwhere); while($attachment = $db->fetch_array($query)) {
|
Zeile 1078 | Zeile 1076 |
---|
$postbit = build_postbit($post, 1); eval("\$preview = \"".$templates->get("previewpost")."\";");
|
$postbit = build_postbit($post, 1); eval("\$preview = \"".$templates->get("previewpost")."\";");
|
} }
| } }
|
$subject = htmlspecialchars_uni($parser->parse_badwords($subject));
$posthash = htmlspecialchars_uni($mybb->get_input('posthash'));
| $subject = htmlspecialchars_uni($parser->parse_badwords($subject));
$posthash = htmlspecialchars_uni($mybb->get_input('posthash'));
|
Zeile 1114 | Zeile 1112 |
---|
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { eval("\$postinsert = \"".$templates->get("post_attachments_attachment_postinsert")."\";");
|
}
| }
|
$attach_mod_options = ''; eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
| $attach_mod_options = ''; eval("\$attach_rem_options = \"".$templates->get("post_attachments_attachment_remove")."\";");
|
Zeile 1163 | Zeile 1161 |
---|
$attach_add_options = ''; if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
|
$attach_add_options = ''; if($mybb->settings['maxattachments'] == 0 || ($mybb->settings['maxattachments'] != 0 && $attachcount < $mybb->settings['maxattachments']) && !$noshowattach)
|
{
| {
|
eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";"); }
| eval("\$attach_add_options = \"".$templates->get("post_attachments_add")."\";"); }
|
Zeile 1186 | Zeile 1184 |
---|
}
// If the user is logged in, provide a save draft button.
|
}
// If the user is logged in, provide a save draft button.
|
| $savedraftbutton = '';
|
if($mybb->user['uid']) { eval("\$savedraftbutton = \"".$templates->get("post_savedraftbutton", 1, 0)."\";");
| if($mybb->user['uid']) { eval("\$savedraftbutton = \"".$templates->get("post_savedraftbutton", 1, 0)."\";");
|
Zeile 1213 | Zeile 1212 |
---|
}
if(!$correct)
|
}
if(!$correct)
|
{
| {
|
if($post_captcha->type == captcha::DEFAULT_CAPTCHA) { $post_captcha->build_captcha();
| if($post_captcha->type == captcha::DEFAULT_CAPTCHA) { $post_captcha->build_captcha();
|
Zeile 1243 | Zeile 1242 |
---|
}
$reviewmore = '';
|
}
$reviewmore = '';
|
| $threadreview = '';
|
if($mybb->settings['threadreview'] != 0) { if(is_moderator($fid, "canviewunapprove") || $mybb->settings['showownunapproved'])
|
if($mybb->settings['threadreview'] != 0) { if(is_moderator($fid, "canviewunapprove") || $mybb->settings['showownunapproved'])
|
{
| {
|
$visibility = "(visible='1' OR visible='0')"; } else
| $visibility = "(visible='1' OR visible='0')"; } else
|
Zeile 1255 | Zeile 1255 |
---|
} $query = $db->simple_select("posts", "COUNT(pid) AS post_count", "tid='{$tid}' AND {$visibility}"); $numposts = $db->fetch_field($query, "post_count");
|
} $query = $db->simple_select("posts", "COUNT(pid) AS post_count", "tid='{$tid}' AND {$visibility}"); $numposts = $db->fetch_field($query, "post_count");
|
|
|
if($numposts > $mybb->settings['postsperpage']) { $numposts = $mybb->settings['postsperpage']; $lang->thread_review_more = $lang->sprintf($lang->thread_review_more, $mybb->settings['postsperpage'], get_thread_link($tid)); eval("\$reviewmore = \"".$templates->get("newreply_threadreview_more")."\";");
|
if($numposts > $mybb->settings['postsperpage']) { $numposts = $mybb->settings['postsperpage']; $lang->thread_review_more = $lang->sprintf($lang->thread_review_more, $mybb->settings['postsperpage'], get_thread_link($tid)); eval("\$reviewmore = \"".$templates->get("newreply_threadreview_more")."\";");
|
}
| }
$pidin = array();
|
$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND {$visibility}", array("order_by" => "dateline DESC, pid DESC", "limit" => $mybb->settings['postsperpage']));
|
$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND {$visibility}", array("order_by" => "dateline DESC, pid DESC", "limit" => $mybb->settings['postsperpage']));
|
while($post = $db->fetch_array($query)) {
| while($post = $db->fetch_array($query)) {
|
$pidin[] = $post['pid'];
|
$pidin[] = $post['pid'];
|
}
$pidin = implode(",", $pidin);
| }
|
|
|
// Fetch attachments $query = $db->simple_select("attachments", "*", "pid IN ($pidin)"); while($attachment = $db->fetch_array($query)) { $attachcache[$attachment['pid']][$attachment['aid']] = $attachment; } $query = $db->query(" SELECT p.*, u.username AS userusername FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE pid IN ($pidin) ORDER BY dateline DESC, pid DESC "); $postsdone = 0; $altbg = "trow1"; $reviewbits = ''; while($post = $db->fetch_array($query))
| if(!empty($pidin))
|
{
|
{
|
if($post['userusername']) { $post['username'] = $post['userusername']; } $reviewpostdate = my_date('relative', $post['dateline']); $parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'], "allow_smilies" => $forum['allowsmilies'], "allow_imgcode" => $forum['allowimgcode'], "allow_videocode" => $forum['allowvideocode'], "me_username" => $post['username'], "filter_badwords" => 1 ); if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
| $pidin = implode(",", $pidin);
|
|
|
if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
| // Fetch attachments $query = $db->simple_select("attachments", "*", "pid IN ($pidin)"); while($attachment = $db->fetch_array($query))
|
{
|
{
|
$parser_options['allow_imgcode'] = 0;
| $attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
|
}
|
}
|
if($mybb->user['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)
| $query = $db->query(" SELECT p.*, u.username AS userusername FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE pid IN ($pidin) ORDER BY dateline DESC, pid DESC "); $postsdone = 0; $altbg = "trow1"; $reviewbits = ''; while($post = $db->fetch_array($query))
|
{
|
{
|
$parser_options['allow_videocode'] = 0; }
$post['username'] = htmlspecialchars_uni($post['username']);
| if($post['userusername']) { $post['username'] = $post['userusername']; } $reviewpostdate = my_date('relative', $post['dateline']); $parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'], "allow_smilies" => $forum['allowsmilies'], "allow_imgcode" => $forum['allowimgcode'], "allow_videocode" => $forum['allowvideocode'], "me_username" => $post['username'], "filter_badwords" => 1 ); if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0) { $parser_options['allow_imgcode'] = 0; }
if($mybb->user['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0) { $parser_options['allow_videocode'] = 0; }
$post['username'] = htmlspecialchars_uni($post['username']);
if($post['visible'] != 1) { $altbg = "trow_shaded"; }
|
|
|
if($post['visible'] != 1) { $altbg = "trow_shaded"; }
| $plugins->run_hooks("newreply_threadreview_post");
|
|
|
$plugins->run_hooks("newreply_threadreview_post");
$post['message'] = $parser->parse_message($post['message'], $parser_options); get_post_attachments($post['pid'], $post); $reviewmessage = $post['message']; eval("\$reviewbits .= \"".$templates->get("newreply_threadreview_post")."\";"); if($altbg == "trow1") { $altbg = "trow2"; } else { $altbg = "trow1";
| $post['message'] = $parser->parse_message($post['message'], $parser_options); get_post_attachments($post['pid'], $post); $reviewmessage = $post['message']; eval("\$reviewbits .= \"".$templates->get("newreply_threadreview_post")."\";"); if($altbg == "trow1") { $altbg = "trow2"; } else { $altbg = "trow1"; }
|
}
|
}
|
| eval("\$threadreview = \"".$templates->get("newreply_threadreview")."\";");
|
}
|
}
|
eval("\$threadreview = \"".$templates->get("newreply_threadreview")."\";");
| |
}
// Hide signature option if no permission
| }
// Hide signature option if no permission
|