Zeile 11 | Zeile 11 |
---|
/** * Build a post bit *
|
/** * Build a post bit *
|
* @param array The post data * @param int The type of post bit we're building (1 = preview, 2 = pm, 3 = announcement, else = post)
| * @param array $post The post data * @param int $post_type The type of post bit we're building (1 = preview, 2 = pm, 3 = announcement, else = post)
|
* @return string The built post bit */ function build_postbit($post, $post_type=0)
| * @return string The built post bit */ function build_postbit($post, $post_type=0)
|
Zeile 126 | Zeile 126 |
---|
} break; }
|
} break; }
|
| $post['username'] = htmlspecialchars_uni($post['username']); $post['userusername'] = htmlspecialchars_uni($post['userusername']);
|
if(!$postcounter) { // Used to show the # of the post
| if(!$postcounter) { // Used to show the # of the post
|
Zeile 137 | Zeile 140 |
---|
}
$postcounter = $mybb->settings['postsperpage']*($page-1);
|
}
$postcounter = $mybb->settings['postsperpage']*($page-1);
|
}
| }
|
else { $postcounter = 0; }
|
else { $postcounter = 0; }
|
$post_extra_style = "border-top-width: 0;";
| $post_extra_style = "border-top-width: 0;";
|
} elseif($mybb->input['mode'] == "threaded") { $post_extra_style = "border-top-width: 0;";
|
} elseif($mybb->input['mode'] == "threaded") { $post_extra_style = "border-top-width: 0;";
|
}
| }
|
else { $post_extra_style = "margin-top: 5px;";
| else { $post_extra_style = "margin-top: 5px;";
|
Zeile 158 | Zeile 161 |
---|
$altbg = "trow1"; } $postcounter++;
|
$altbg = "trow1"; } $postcounter++;
|
|
|
// Format the post date and time using my_date $post['postdate'] = my_date('relative', $post['dateline']);
| // Format the post date and time using my_date $post['postdate'] = my_date('relative', $post['dateline']);
|
Zeile 178 | Zeile 181 |
---|
$post['author'] = $post['uid']; $post['subject_title'] = $post['subject'];
|
$post['author'] = $post['uid']; $post['subject_title'] = $post['subject'];
|
|
|
// Get the usergroup if($post['userusername']) {
| // Get the usergroup if($post['userusername']) {
|
Zeile 189 | Zeile 192 |
---|
$usergroup = $groupscache[$post['displaygroup']]; } else
|
$usergroup = $groupscache[$post['displaygroup']]; } else
|
{
| {
|
$usergroup = $groupscache[1]; }
| $usergroup = $groupscache[1]; }
|
Zeile 209 | Zeile 212 |
---|
krsort($titlescache); } unset($usertitle, $cached_titles);
|
krsort($titlescache); } unset($usertitle, $cached_titles);
|
}
| }
|
// Work out the usergroup/title stuff $post['groupimage'] = '';
| // Work out the usergroup/title stuff $post['groupimage'] = '';
|
Zeile 219 | Zeile 222 |
---|
if(!empty($mybb->user['language'])) { $language = $mybb->user['language'];
|
if(!empty($mybb->user['language'])) { $language = $mybb->user['language'];
|
}
| }
|
$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']); $usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']);
| $usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']); $usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']);
|
Zeile 249 | Zeile 252 |
---|
$post['usertitle'] = $usergroup['usertitle']; } elseif(is_array($titlescache) && !$usergroup['usertitle'])
|
$post['usertitle'] = $usergroup['usertitle']; } elseif(is_array($titlescache) && !$usergroup['usertitle'])
|
{
| {
|
reset($titlescache); foreach($titlescache as $key => $titleinfo) {
| reset($titlescache); foreach($titlescache as $key => $titleinfo) {
|
Zeile 265 | Zeile 268 |
---|
} } }
|
} } }
|
|
|
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
if($usergroup['stars'])
|
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
if($usergroup['stars'])
|
{
| {
|
$post['stars'] = $usergroup['stars']; }
| $post['stars'] = $usergroup['stars']; }
|
Zeile 290 | Zeile 293 |
---|
}
$post['userstars'] .= "<br />";
|
}
$post['userstars'] .= "<br />";
|
}
| }
|
$postnum = $post['postnum']; $post['postnum'] = my_number_format($post['postnum']); $post['threadnum'] = my_number_format($post['threadnum']);
| $postnum = $post['postnum']; $post['postnum'] = my_number_format($post['postnum']); $post['threadnum'] = my_number_format($post['threadnum']);
|
Zeile 301 | Zeile 304 |
---|
if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive']) { eval("\$post['onlinestatus'] = \"".$templates->get("postbit_online")."\";");
|
if($post['lastactive'] > $timecut && ($post['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $post['lastvisit'] != $post['lastactive']) { eval("\$post['onlinestatus'] = \"".$templates->get("postbit_online")."\";");
|
}
| }
|
else { if($post['away'] == 1 && $mybb->settings['allowaway'] != 0)
|
else { if($post['away'] == 1 && $mybb->settings['allowaway'] != 0)
|
{
| {
|
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_away")."\";"); } else { eval("\$post['onlinestatus'] = \"".$templates->get("postbit_offline")."\";");
|
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_away")."\";"); } else { eval("\$post['onlinestatus'] = \"".$templates->get("postbit_offline")."\";");
|
} }
| } }
|
$post['useravatar'] = ''; if(isset($mybb->user['showavatars']) && $mybb->user['showavatars'] != 0 || $mybb->user['uid'] == 0)
|
$post['useravatar'] = ''; if(isset($mybb->user['showavatars']) && $mybb->user['showavatars'] != 0 || $mybb->user['uid'] == 0)
|
{ $useravatar = format_avatar(htmlspecialchars_uni($post['avatar']), $post['avatardimensions'], $mybb->settings['postmaxavatarsize']);
| { $useravatar = format_avatar($post['avatar'], $post['avatardimensions'], $mybb->settings['postmaxavatarsize']);
|
eval("\$post['useravatar'] = \"".$templates->get("postbit_avatar")."\";");
|
eval("\$post['useravatar'] = \"".$templates->get("postbit_avatar")."\";");
|
} else { $post['useravatar'] = '';
| |
}
|
}
|
eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";");
if($mybb->settings['enablepms'] == 1 && $post['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false) { eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";");
| $post['button_find'] = ''; if($mybb->usergroup['cansearch'] == 1) { eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";");
|
}
|
}
|
$post['button_rep'] = ''; if($post_type != 3 && $mybb->settings['enablereputation'] == 1 && $mybb->settings['postrep'] == 1 && $mybb->usergroup['cangivereputations'] == 1 && $usergroup['usereputationsystem'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']) && $post['uid'] != $mybb->user['uid'])
| if($mybb->settings['enablepms'] == 1 && $post['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false) { eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";"); }
$post['button_rep'] = ''; if($post_type != 3 && $mybb->settings['enablereputation'] == 1 && $mybb->settings['postrep'] == 1 && $mybb->usergroup['cangivereputations'] == 1 && $usergroup['usereputationsystem'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']) && $post['uid'] != $mybb->user['uid'] && (!isset($post['visible']) || $post['visible'] == 1) && (!isset($thread['visible']) || $thread['visible'] == 1))
|
{ if(!$post['pid']) {
| { if(!$post['pid']) {
|
Zeile 343 | Zeile 346 |
---|
eval("\$post['button_rep'] = \"".$templates->get("postbit_rep_button")."\";"); }
|
eval("\$post['button_rep'] = \"".$templates->get("postbit_rep_button")."\";"); }
|
if($post['website'] != "" && $mybb->settings['hidewebsite'] != -1 && !is_member($mybb->settings['hidewebsite']) && $usergroup['canchangewebsite'] == 1)
| if($post['website'] != "" && !is_member($mybb->settings['hidewebsite']) && $usergroup['canchangewebsite'] == 1)
|
{ $post['website'] = htmlspecialchars_uni($post['website']); eval("\$post['button_www'] = \"".$templates->get("postbit_www")."\";");
| { $post['website'] = htmlspecialchars_uni($post['website']); eval("\$post['button_www'] = \"".$templates->get("postbit_www")."\";");
|
Zeile 354 | Zeile 357 |
---|
}
if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1)
|
}
if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1)
|
{
| {
|
eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";"); } else
| eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";"); } else
|
Zeile 374 | Zeile 377 |
---|
// Showing the warning level? (only show if not announcement) if($post_type != 3 && $mybb->settings['enablewarningsystem'] != 0 && $usergroup['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $post['uid'] && $mybb->settings['canviewownwarning'] != 0))) {
|
// Showing the warning level? (only show if not announcement) if($post_type != 3 && $mybb->settings['enablewarningsystem'] != 0 && $usergroup['canreceivewarnings'] != 0 && ($mybb->usergroup['canwarnusers'] != 0 || ($mybb->user['uid'] == $post['uid'] && $mybb->settings['canviewownwarning'] != 0))) {
|
| if($mybb->settings['maxwarningpoints'] < 1) { $mybb->settings['maxwarningpoints'] = 10; }
|
$warning_level = round($post['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100) {
| $warning_level = round($post['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100) {
|
Zeile 459 | Zeile 467 |
---|
}
eval("\$post['profilefield'] .= \"".$templates->get("postbit_profilefield")."\";");
|
}
eval("\$post['profilefield'] .= \"".$templates->get("postbit_profilefield")."\";");
|
} } }
| } } }
|
eval("\$post['user_details'] = \"".$templates->get("postbit_author_user")."\";"); }
| eval("\$post['user_details'] = \"".$templates->get("postbit_author_user")."\";"); }
|
Zeile 476 | Zeile 484 |
---|
else { $post['usertitle'] = $lang->guest;
|
else { $post['usertitle'] = $lang->guest;
|
}
| }
|
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
$usergroup['title'] = $lang->na;
| $post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
$usergroup['title'] = $lang->na;
|
Zeile 508 | Zeile 516 |
---|
// For private messages, fetch the reply/forward/delete icons if($post_type == 2 && $post['pmid'])
|
// For private messages, fetch the reply/forward/delete icons if($post_type == 2 && $post['pmid'])
|
{
| {
|
global $replyall;
|
global $replyall;
|
|
|
eval("\$post['button_reply_pm'] = \"".$templates->get("postbit_reply_pm")."\";"); eval("\$post['button_forward_pm'] = \"".$templates->get("postbit_forward_pm")."\";"); eval("\$post['button_delete_pm'] = \"".$templates->get("postbit_delete_pm")."\";");
if($replyall == true)
|
eval("\$post['button_reply_pm'] = \"".$templates->get("postbit_reply_pm")."\";"); eval("\$post['button_forward_pm'] = \"".$templates->get("postbit_forward_pm")."\";"); eval("\$post['button_delete_pm'] = \"".$templates->get("postbit_delete_pm")."\";");
if($replyall == true)
|
{
| {
|
eval("\$post['button_replyall_pm'] = \"".$templates->get("postbit_replyall_pm")."\";");
|
eval("\$post['button_replyall_pm'] = \"".$templates->get("postbit_replyall_pm")."\";");
|
}
| }
|
}
$post['editedmsg'] = ''; if(!$post_type) {
|
}
$post['editedmsg'] = ''; if(!$post_type) {
|
| if(!isset($forumpermissions)) { $forumpermissions = forum_permissions($fid); }
|
// Figure out if we need to show an "edited by" message if($post['edituid'] != 0 && $post['edittime'] != 0 && $post['editusername'] != "" && (($mybb->settings['showeditedby'] != 0 && $usergroup['cancp'] == 0) || ($mybb->settings['showeditedbyadmin'] != 0 && $usergroup['cancp'] == 1))) { $post['editdate'] = my_date('relative', $post['edittime']); $post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate']);
|
// Figure out if we need to show an "edited by" message if($post['edituid'] != 0 && $post['edittime'] != 0 && $post['editusername'] != "" && (($mybb->settings['showeditedby'] != 0 && $usergroup['cancp'] == 0) || ($mybb->settings['showeditedbyadmin'] != 0 && $usergroup['cancp'] == 1))) { $post['editdate'] = my_date('relative', $post['edittime']); $post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate']);
|
| $post['editusername'] = htmlspecialchars_uni($post['editusername']);
|
$post['editedprofilelink'] = build_profile_link($post['editusername'], $post['edituid']); $editreason = ""; if($post['editreason'] != "")
| $post['editedprofilelink'] = build_profile_link($post['editusername'], $post['edituid']); $editreason = ""; if($post['editreason'] != "")
|
Zeile 540 | Zeile 554 |
---|
eval("\$post['editedmsg'] = \"".$templates->get("postbit_editedby")."\";"); }
|
eval("\$post['editedmsg'] = \"".$templates->get("postbit_editedby")."\";"); }
|
if((is_moderator($fid, "caneditposts") || ($forumpermissions['caneditposts'] == 1 && $mybb->user['uid'] == $post['uid'] && $thread['closed'] != 1)) && $mybb->user['uid'] != 0)
| $time = TIME_NOW; if((is_moderator($fid, "caneditposts") || ($forumpermissions['caneditposts'] == 1 && $mybb->user['uid'] == $post['uid'] && $thread['closed'] != 1 && ($mybb->usergroup['edittimelimit'] == 0 || $mybb->usergroup['edittimelimit'] != 0 && $post['dateline'] > ($time-($mybb->usergroup['edittimelimit']*60))))) && $mybb->user['uid'] != 0)
|
{ eval("\$post['button_edit'] = \"".$templates->get("postbit_edit")."\";"); }
| { eval("\$post['button_edit'] = \"".$templates->get("postbit_edit")."\";"); }
|
Zeile 559 | Zeile 574 |
---|
} }
|
} }
|
$postbit_qdelete = '';
| $postbit_qdelete = $postbit_qrestore = '';
|
if($mybb->user['uid'] != 0) {
|
if($mybb->user['uid'] != 0) {
|
if((is_moderator($fid, "candeleteposts") || $can_delete_post == 1) && $postcounter != 1)
| if((is_moderator($fid, "candeleteposts") || is_moderator($fid, "cansoftdeleteposts") || $can_delete_post == 1) && $postcounter != 1)
|
{ $postbit_qdelete = $lang->postbit_qdelete_post;
|
{ $postbit_qdelete = $lang->postbit_qdelete_post;
|
$display = "";
| $display = '';
|
if($post['visible'] == -1) { $display = "none"; } eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
|
if($post['visible'] == -1) { $display = "none"; } eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
|
// Restore Post if(is_moderator($fid, "canrestoreposts")) { $display = "none"; if($post['visible'] == -1) { $display = ""; } $postbit_qrestore = $lang->postbit_qrestore_post; eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";"); } } else if((is_moderator($fid, "candeletethreads") || $can_delete_thread == 1) && $postcounter == 1) {
| } else if((is_moderator($fid, "candeletethreads") || is_moderator($fid, "cansoftdeletethreads") || $can_delete_thread == 1) && $postcounter == 1) {
|
$postbit_qdelete = $lang->postbit_qdelete_thread;
|
$postbit_qdelete = $lang->postbit_qdelete_thread;
|
$display = "";
| $display = '';
|
if($post['visible'] == -1) { $display = "none"; }
|
if($post['visible'] == -1) { $display = "none"; }
|
$postbit_qrestore = $lang->postbit_qrestore_thread;
| |
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
|
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
|
| }
// Restore Post if(is_moderator($fid, "canrestoreposts") && $postcounter != 1) { $display = "none"; if($post['visible'] == -1) { $display = ''; } $postbit_qrestore = $lang->postbit_qrestore_post; eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";"); }
|
|
|
// Restore Post if(is_moderator($fid, "canrestoreposts"))
| // Restore Thread else if(is_moderator($fid, "canrestorethreads") && $postcounter == 1) { $display = "none"; if($post['visible'] == -1)
|
{
|
{
|
$display = "none"; if($post['visible'] == -1) { $display = ""; } eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");
| $display = "";
|
}
|
}
|
} }
| $postbit_qrestore = $lang->postbit_qrestore_thread; eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";"); } }
if(!isset($ismod)) { $ismod = is_moderator($fid); }
|
// Inline moderation stuff if($ismod)
| // Inline moderation stuff if($ismod)
|
Zeile 619 | Zeile 639 |
---|
else { $inlinecheck = "";
|
else { $inlinecheck = "";
|
}
eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");
| }
eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");
|
if($post['visible'] == 0) {
| if($post['visible'] == 0) {
|
Zeile 636 | Zeile 656 |
---|
$post_number = my_number_format($postcounter); eval("\$post['posturl'] = \"".$templates->get("postbit_posturl")."\";"); global $forum, $thread;
|
$post_number = my_number_format($postcounter); eval("\$post['posturl'] = \"".$templates->get("postbit_posturl")."\";"); global $forum, $thread;
|
|
|
if($forum['open'] != 0 && ($thread['closed'] != 1 || is_moderator($forum['fid'], "canpostclosedthreads")) && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1)) { eval("\$post['button_quote'] = \"".$templates->get("postbit_quote")."\";"); }
if($forumpermissions['canpostreplys'] != 0 && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1) && ($thread['closed'] != 1 || is_moderator($fid, "canpostclosedthreads")) && $mybb->settings['multiquote'] != 0 && $forum['open'] != 0 && !$post_type)
|
if($forum['open'] != 0 && ($thread['closed'] != 1 || is_moderator($forum['fid'], "canpostclosedthreads")) && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1)) { eval("\$post['button_quote'] = \"".$templates->get("postbit_quote")."\";"); }
if($forumpermissions['canpostreplys'] != 0 && ($thread['uid'] == $mybb->user['uid'] || $forumpermissions['canonlyreplyownthreads'] != 1) && ($thread['closed'] != 1 || is_moderator($fid, "canpostclosedthreads")) && $mybb->settings['multiquote'] != 0 && $forum['open'] != 0 && !$post_type)
|
{
| {
|
eval("\$post['button_multiquote'] = \"".$templates->get("postbit_multiquote")."\";"); }
| eval("\$post['button_multiquote'] = \"".$templates->get("postbit_multiquote")."\";"); }
|
Zeile 658 | Zeile 678 |
---|
{ eval("\$post['button_edit'] = \"".$templates->get("announcement_edit")."\";"); eval("\$post['button_quickdelete'] = \"".$templates->get("announcement_quickdelete")."\";");
|
{ eval("\$post['button_edit'] = \"".$templates->get("announcement_edit")."\";"); eval("\$post['button_quickdelete'] = \"".$templates->get("announcement_quickdelete")."\";");
|
} }
| } }
|
$post['iplogged'] = ''; $show_ips = $mybb->settings['logip']; $ipaddress = my_inet_ntop($db->unescape_binary($post['ipaddress']));
| $post['iplogged'] = ''; $show_ips = $mybb->settings['logip']; $ipaddress = my_inet_ntop($db->unescape_binary($post['ipaddress']));
|
Zeile 671 | Zeile 691 |
---|
$show_ips = $mybb->settings['showpmip']; } if(!$post_type || $post_type == 2)
|
$show_ips = $mybb->settings['showpmip']; } if(!$post_type || $post_type == 2)
|
{
| {
|
if($show_ips != "no" && !empty($post['ipaddress'])) { if($show_ips == "show")
| if($show_ips != "no" && !empty($post['ipaddress'])) { if($show_ips == "show")
|
Zeile 688 | Zeile 708 |
---|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";"); } }
|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";"); } }
|
| }
$post['poststatus'] = ''; if(!$post_type && $post['visible'] != 1) { if(is_moderator($fid, "canviewdeleted") && $postcounter != 1 && $post['visible'] == -1) { $status_type = $lang->postbit_post_deleted; } else if(is_moderator($fid, "canviewunapprove") && $postcounter != 1 && $post['visible'] == 0) { $status_type = $lang->postbit_post_unapproved; } else if(is_moderator($fid, "canviewdeleted") && $postcounter == 1 && $post['visible'] == -1) { $status_type = $lang->postbit_thread_deleted; } else if(is_moderator($fid, "canviewunapprove") && $postcounter == 1 && $post['visible'] == 0) { $status_type = $lang->postbit_thread_unapproved; }
eval("\$post['poststatus'] = \"".$templates->get("postbit_status")."\";");
|
}
if(isset($post['smilieoff']) && $post['smilieoff'] == 1)
| }
if(isset($post['smilieoff']) && $post['smilieoff'] == 1)
|
Zeile 720 | Zeile 763 |
---|
get_post_attachments($id, $post); }
|
get_post_attachments($id, $post); }
|
if(isset($post['includesig']) && $post['includesig'] != 0 && $post['username'] && $post['signature'] != "" && ($mybb->user['uid'] == 0 || $mybb->user['showsigs'] != 0) && ($post['suspendsignature'] == 0 || $post['suspendsignature'] == 1 && $post['suspendsigtime'] != 0 && $post['suspendsigtime'] < TIME_NOW) && $usergroup['canusesig'] == 1 && ($usergroup['canusesigxposts'] == 0 || $usergroup['canusesigxposts'] > 0 && $postnum > $usergroup['canusesigxposts']) && $mybb->settings['hidesignatures'] != -1 && !is_member($mybb->settings['hidesignatures']))
| if(isset($post['includesig']) && $post['includesig'] != 0 && $post['username'] && $post['signature'] != "" && ($mybb->user['uid'] == 0 || $mybb->user['showsigs'] != 0) && ($post['suspendsignature'] == 0 || $post['suspendsignature'] == 1 && $post['suspendsigtime'] != 0 && $post['suspendsigtime'] < TIME_NOW) && $usergroup['canusesig'] == 1 && ($usergroup['canusesigxposts'] == 0 || $usergroup['canusesigxposts'] > 0 && $postnum > $usergroup['canusesigxposts']) && !is_member($mybb->settings['hidesignatures']))
|
{ $sig_parser = array( "allow_html" => $mybb->settings['sightml'], "allow_mycode" => $mybb->settings['sigmycode'], "allow_smilies" => $mybb->settings['sigsmilies'], "allow_imgcode" => $mybb->settings['sigimgcode'],
|
{ $sig_parser = array( "allow_html" => $mybb->settings['sightml'], "allow_mycode" => $mybb->settings['sigmycode'], "allow_smilies" => $mybb->settings['sigsmilies'], "allow_imgcode" => $mybb->settings['sigimgcode'],
|
"me_username" => $post['username'],
| "me_username" => $parser_options['me_username'],
|
"filter_badwords" => 1 );
| "filter_badwords" => 1 );
|
Zeile 765 | Zeile 810 |
---|
$post['icon'] = ""; }
|
$post['icon'] = ""; }
|
$post_visibility = $ignore_bit = '';
| $post_visibility = $ignore_bit = $deleted_bit = '';
|
switch($post_type) { case 1: // Message preview
| switch($post_type) { case 1: // Message preview
|
Zeile 779 | Zeile 824 |
---|
break; default: // Regular post $post = $plugins->run_hooks("postbit", $post);
|
break; default: // Regular post $post = $plugins->run_hooks("postbit", $post);
|
| if(!isset($ignored_users)) { $ignored_users = array(); if($mybb->user['uid'] > 0 && $mybb->user['ignorelist'] != "") { $ignore_list = explode(',', $mybb->user['ignorelist']); foreach($ignore_list as $uid) { $ignored_users[$uid] = 1; } } }
|
// Is this author on the ignore list of the current user? Hide this post if(is_array($ignored_users) && $post['uid'] != 0 && isset($ignored_users[$post['uid']]) && $ignored_users[$post['uid']] == 1) { $ignored_message = $lang->sprintf($lang->postbit_currently_ignoring_user, $post['username']); eval("\$ignore_bit = \"".$templates->get("postbit_ignored")."\";");
|
// Is this author on the ignore list of the current user? Hide this post if(is_array($ignored_users) && $post['uid'] != 0 && isset($ignored_users[$post['uid']]) && $ignored_users[$post['uid']] == 1) { $ignored_message = $lang->sprintf($lang->postbit_currently_ignoring_user, $post['username']); eval("\$ignore_bit = \"".$templates->get("postbit_ignored")."\";");
|
| $post_visibility = "display: none;"; }
// Has this post been deleted but can be viewed? Hide this post if($post['visible'] == -1 && is_moderator($fid, "canviewdeleted")) { $deleted_message = $lang->sprintf($lang->postbit_deleted_post_user, $post['username']); eval("\$deleted_bit = \"".$templates->get("postbit_deleted")."\";");
|
$post_visibility = "display: none;"; } break;
|
$post_visibility = "display: none;"; } break;
|
}
if($mybb->settings['postlayout'] == "classic") { eval("\$postbit = \"".$templates->get("postbit_classic")."\";"); }
| }
if($forumpermissions['canviewdeletionnotice'] == 1 && $post['visible'] == -1 && $post_type == 0 && !is_moderator($fid, "canviewdeleted")) { eval("\$postbit = \"".$templates->get("postbit_deleted_member")."\";"); }
|
else {
|
else {
|
eval("\$postbit = \"".$templates->get("postbit")."\";");
| if($mybb->settings['postlayout'] == "classic") { eval("\$postbit = \"".$templates->get("postbit_classic")."\";"); } else { eval("\$postbit = \"".$templates->get("postbit")."\";"); }
|
}
|
}
|
|
|
$GLOBALS['post'] = "";
return $postbit; }
|
$GLOBALS['post'] = "";
return $postbit; }
|
|
|
/** * Fetch the attachments for a specific post and parse inline [attachment=id] code. * Note: assumes you have $attachcache, an array of attachments set up. *
|
/** * Fetch the attachments for a specific post and parse inline [attachment=id] code. * Note: assumes you have $attachcache, an array of attachments set up. *
|
* @param int The ID of the item. * @param array The post or item passed by reference.
| * @param int $id The ID of the item. * @param array $post The post or item passed by reference.
|
*/ function get_post_attachments($id, &$post) {
| */ function get_post_attachments($id, &$post) {
|
Zeile 817 | Zeile 891 |
---|
$validationcount = 0; $tcount = 0; $post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = '';
|
$validationcount = 0; $tcount = 0; $post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = '';
|
| if(!isset($forumpermissions)) { $forumpermissions = forum_permissions($post['fid']); }
|
if(isset($attachcache[$id]) && is_array($attachcache[$id])) { // This post has 1 or more attachments foreach($attachcache[$id] as $aid => $attachment)
| if(isset($attachcache[$id]) && is_array($attachcache[$id])) { // This post has 1 or more attachments foreach($attachcache[$id] as $aid => $attachment)
|