Zeile 90 | Zeile 90 |
---|
break; case 3: // Announcement global $announcementarray, $message;
|
break; case 3: // Announcement global $announcementarray, $message;
|
$parser_options['allow_html'] = $announcementarray['allowhtml'];
| $parser_options['allow_html'] = $mybb->settings['announcementshtml'] && $announcementarray['allowhtml'];
|
$parser_options['allow_mycode'] = $announcementarray['allowmycode']; $parser_options['allow_smilies'] = $announcementarray['allowsmilies']; $parser_options['allow_imgcode'] = 1;
| $parser_options['allow_mycode'] = $announcementarray['allowmycode']; $parser_options['allow_smilies'] = $announcementarray['allowsmilies']; $parser_options['allow_imgcode'] = 1;
|
Zeile 110 | Zeile 110 |
---|
$parser_options['allow_imgcode'] = $forum['allowimgcode']; $parser_options['allow_videocode'] = $forum['allowvideocode']; $parser_options['filter_badwords'] = 1;
|
$parser_options['allow_imgcode'] = $forum['allowimgcode']; $parser_options['allow_videocode'] = $forum['allowvideocode']; $parser_options['filter_badwords'] = 1;
|
if(!$post['username']) { $post['username'] = $lang->guest; }
if($post['userusername']) { $parser_options['me_username'] = $post['userusername']; } else { $parser_options['me_username'] = $post['username']; }
| |
break;
|
break;
|
| }
if(!$post['username']) { $post['username'] = $lang->guest; // htmlspecialchars_uni'd below }
if($post['userusername']) { $parser_options['me_username'] = $post['userusername']; } else { $parser_options['me_username'] = $post['username'];
|
}
$post['username'] = htmlspecialchars_uni($post['username']);
| }
$post['username'] = htmlspecialchars_uni($post['username']);
|
Zeile 150 | Zeile 150 |
---|
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
| } else
|
{ $post_extra_style = "margin-top: 5px;"; }
| { $post_extra_style = "margin-top: 5px;"; }
|
Zeile 188 | Zeile 188 |
---|
if(!$post['displaygroup']) { $post['displaygroup'] = $post['usergroup'];
|
if(!$post['displaygroup']) { $post['displaygroup'] = $post['usergroup'];
|
}
| }
|
$usergroup = $groupscache[$post['displaygroup']];
|
$usergroup = $groupscache[$post['displaygroup']];
|
}
| }
|
else { $usergroup = $groupscache[1];
| else { $usergroup = $groupscache[1];
|
Zeile 200 | Zeile 200 |
---|
{ $cached_titles = $cache->read("usertitles"); if(!empty($cached_titles))
|
{ $cached_titles = $cache->read("usertitles"); if(!empty($cached_titles))
|
{
| {
|
foreach($cached_titles as $usertitle) { $titlescache[$usertitle['posts']] = $usertitle; }
|
foreach($cached_titles as $usertitle) { $titlescache[$usertitle['posts']] = $usertitle; }
|
}
| }
|
if(is_array($titlescache)) { krsort($titlescache); } unset($usertitle, $cached_titles);
|
if(is_array($titlescache)) { krsort($titlescache); } unset($usertitle, $cached_titles);
|
}
| }
|
// Work out the usergroup/title stuff $post['groupimage'] = '';
| // Work out the usergroup/title stuff $post['groupimage'] = '';
|
Zeile 406 | Zeile 406 |
---|
if($post_type != 3 && $post_type != 1 && purgespammer_show($post['postnum'], $post['usergroup'], $post['uid'])) { eval("\$post['button_purgespammer'] = \"".$templates->get('postbit_purgespammer')."\";");
|
if($post_type != 3 && $post_type != 1 && purgespammer_show($post['postnum'], $post['usergroup'], $post['uid'])) { eval("\$post['button_purgespammer'] = \"".$templates->get('postbit_purgespammer')."\";");
|
}
| }
|
// Display profile fields on posts - only if field is filled in if(is_array($profile_fields))
| // Display profile fields on posts - only if field is filled in if(is_array($profile_fields))
|
Zeile 503 | Zeile 503 |
---|
eval("\$post['user_details'] = \"".$templates->get("postbit_author_guest")."\";"); }
|
eval("\$post['user_details'] = \"".$templates->get("postbit_author_guest")."\";"); }
|
| $post['input_editreason'] = '';
|
$post['button_edit'] = ''; $post['button_quickdelete'] = ''; $post['button_quickrestore'] = '';
| $post['button_edit'] = ''; $post['button_quickdelete'] = ''; $post['button_quickrestore'] = '';
|
Zeile 536 | Zeile 537 |
---|
{ $forumpermissions = forum_permissions($fid); }
|
{ $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))) {
| // 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))) {
|
Zeile 557 | Zeile 558 |
---|
$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) {
|
$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['input_editreason'] = \"".$templates->get("postbit_editreason")."\";");
|
eval("\$post['button_edit'] = \"".$templates->get("postbit_edit")."\";");
|
eval("\$post['button_edit'] = \"".$templates->get("postbit_edit")."\";");
|
}
| }
|
// Quick Delete button $can_delete_thread = $can_delete_post = 0; if($mybb->user['uid'] == $post['uid'] && $thread['closed'] == 0)
| // Quick Delete button $can_delete_thread = $can_delete_post = 0; if($mybb->user['uid'] == $post['uid'] && $thread['closed'] == 0)
|
Zeile 567 | Zeile 569 |
---|
if($forumpermissions['candeletethreads'] == 1 && $postcounter == 1) { $can_delete_thread = 1;
|
if($forumpermissions['candeletethreads'] == 1 && $postcounter == 1) { $can_delete_thread = 1;
|
}
| }
|
else if($forumpermissions['candeleteposts'] == 1 && $postcounter != 1) { $can_delete_post = 1;
| else if($forumpermissions['candeleteposts'] == 1 && $postcounter != 1) { $can_delete_post = 1;
|
Zeile 580 | Zeile 582 |
---|
if((is_moderator($fid, "candeleteposts") || is_moderator($fid, "cansoftdeleteposts") || $can_delete_post == 1) && $postcounter != 1) { $postbit_qdelete = $lang->postbit_qdelete_post;
|
if((is_moderator($fid, "candeleteposts") || is_moderator($fid, "cansoftdeleteposts") || $can_delete_post == 1) && $postcounter != 1) { $postbit_qdelete = $lang->postbit_qdelete_post;
|
$display = ''; if($post['visible'] == -1) { $display = "none";
| $display = ''; if($post['visible'] == -1) { $display = "none";
|
} eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";"); }
| } eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";"); }
|
Zeile 600 | Zeile 602 |
---|
// Restore Post if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)
|
// Restore Post if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)
|
{ $display = "none";
| { $display = "none";
|
if($post['visible'] == -1) { $display = '';
| if($post['visible'] == -1) { $display = '';
|
Zeile 626 | Zeile 628 |
---|
if(!isset($ismod)) { $ismod = is_moderator($fid);
|
if(!isset($ismod)) { $ismod = is_moderator($fid);
|
}
| }
|
// Inline moderation stuff if($ismod) {
|
// Inline moderation stuff if($ismod) {
|
if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|".$post['pid']."|")) {
| if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|".$post['pid']."|") !== false) {
|
$inlinecheck = "checked=\"checked\""; $inlinecount++; } else { $inlinecheck = "";
|
$inlinecheck = "checked=\"checked\""; $inlinecount++; } else { $inlinecheck = "";
|
}
| }
|
eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");
| eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");
|
Zeile 651 | Zeile 653 |
---|
else { $post['inlinecheck'] = "";
|
else { $post['inlinecheck'] = "";
|
}
| }
|
$post['postlink'] = get_post_link($post['pid'], $post['tid']); $post_number = my_number_format($postcounter); eval("\$post['posturl'] = \"".$templates->get("postbit_posturl")."\";"); global $forum, $thread;
|
$post['postlink'] = get_post_link($post['pid'], $post['tid']); $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")."\";");
|
}
| }
|
if($mybb->user['uid'] != "0") {
| if($mybb->user['uid'] != "0") {
|
Zeile 675 | Zeile 677 |
---|
elseif($post_type == 3) // announcement { if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanageannounce'] == 1 && is_moderator($fid, "canmanageannouncements"))
|
elseif($post_type == 3) // announcement { if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanageannounce'] == 1 && is_moderator($fid, "canmanageannouncements"))
|
{
| {
|
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']));
// Show post IP addresses... PMs now can have IP addresses too as of 1.8! if($post_type == 2)
|
$post['iplogged'] = ''; $show_ips = $mybb->settings['logip']; $ipaddress = my_inet_ntop($db->unescape_binary($post['ipaddress']));
// Show post IP addresses... PMs now can have IP addresses too as of 1.8! if($post_type == 2)
|
{
| {
|
$show_ips = $mybb->settings['showpmip']; } if(!$post_type || $post_type == 2)
| $show_ips = $mybb->settings['showpmip']; } if(!$post_type || $post_type == 2)
|
Zeile 699 | Zeile 701 |
---|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";"); } else if($show_ips == "hide" && (is_moderator($fid, "canviewips") || $mybb->usergroup['issupermod']))
|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";"); } else if($show_ips == "hide" && (is_moderator($fid, "canviewips") || $mybb->usergroup['issupermod']))
|
{
| {
|
$action = 'getip'; if($post_type == 2) {
| $action = 'getip'; if($post_type == 2) {
|
Zeile 836 | Zeile 838 |
---|
$ignored_users[$uid] = 1; } }
|
$ignored_users[$uid] = 1; } }
|
| }
// 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;";
|
}
// Is this author on the ignore list of the current user? Hide this post
|
}
// 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)
| if(is_array($ignored_users) && $post['uid'] != 0 && isset($ignored_users[$post['uid']]) && $ignored_users[$post['uid']] == 1 && empty($deleted_bit))
|
{ $ignored_message = $lang->sprintf($lang->postbit_currently_ignoring_user, $post['username']); eval("\$ignore_bit = \"".$templates->get("postbit_ignored")."\";");
|
{ $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;
|
Zeile 859 | Zeile 861 |
---|
if($forumpermissions['canviewdeletionnotice'] == 1 && $post['visible'] == -1 && $post_type == 0 && !is_moderator($fid, "canviewdeleted")) { eval("\$postbit = \"".$templates->get("postbit_deleted_member")."\";");
|
if($forumpermissions['canviewdeletionnotice'] == 1 && $post['visible'] == -1 && $post_type == 0 && !is_moderator($fid, "canviewdeleted")) { eval("\$postbit = \"".$templates->get("postbit_deleted_member")."\";");
|
}
| }
|
else { if($mybb->settings['postlayout'] == "classic")
| else { if($mybb->settings['postlayout'] == "classic")
|
Zeile 870 | Zeile 872 |
---|
{ eval("\$postbit = \"".$templates->get("postbit")."\";"); }
|
{ eval("\$postbit = \"".$templates->get("postbit")."\";"); }
|
}
$GLOBALS['post'] = "";
| }
$GLOBALS['post'] = "";
|
return $postbit; }
| return $postbit; }
|
Zeile 887 | Zeile 889 |
---|
function get_post_attachments($id, &$post) { global $attachcache, $mybb, $theme, $templates, $forumpermissions, $lang;
|
function get_post_attachments($id, &$post) { global $attachcache, $mybb, $theme, $templates, $forumpermissions, $lang;
|
|
|
$validationcount = 0; $tcount = 0; $post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = '';
| $validationcount = 0; $tcount = 0; $post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = '';
|
Zeile 895 | Zeile 897 |
---|
{ $forumpermissions = forum_permissions($post['fid']); }
|
{ $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)
|
Zeile 920 | Zeile 922 |
---|
{ $attachment['dateuploaded'] = $attachment['dateline']; }
|
{ $attachment['dateuploaded'] = $attachment['dateline']; }
|
$attachdate = my_date('relative', $attachment['dateuploaded']);
| $attachdate = my_date('normal', $attachment['dateuploaded']);
|
// Support for [attachment=id] code if(stripos($post['message'], "[attachment=".$attachment['aid']."]") !== false) {
| // Support for [attachment=id] code if(stripos($post['message'], "[attachment=".$attachment['aid']."]") !== false) {
|