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 133 | Zeile 133 |
---|
if(!$postcounter) { // Used to show the # of the post if($page > 1)
|
if(!$postcounter) { // Used to show the # of the post if($page > 1)
|
{
| {
|
if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1) { $mybb->settings['postsperpage'] = 20;
| if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1) { $mybb->settings['postsperpage'] = 20;
|
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;";
|
}
| }
|
if(!$altbg) { // Define the alternate background colour if this is the first post $altbg = "trow1"; } $postcounter++;
|
if(!$altbg) { // Define the alternate background colour if this is the first post $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']);
|
|
|
// Dont want any little 'nasties' in the subject $post['subject'] = $parser->parse_badwords($post['subject']);
// Pm's have been htmlspecialchars_uni()'ed already. if($post_type != 2)
|
// Dont want any little 'nasties' in the subject $post['subject'] = $parser->parse_badwords($post['subject']);
// Pm's have been htmlspecialchars_uni()'ed already. if($post_type != 2)
|
{
| {
|
$post['subject'] = htmlspecialchars_uni($post['subject']); }
| $post['subject'] = htmlspecialchars_uni($post['subject']); }
|
Zeile 183 | Zeile 183 |
---|
$post['subject_title'] = $post['subject'];
// Get the usergroup
|
$post['subject_title'] = $post['subject'];
// Get the usergroup
|
if($post['userusername'])
| if($post['usergroup'])
|
{
|
{
|
if(!$post['displaygroup']) { $post['displaygroup'] = $post['usergroup']; } $usergroup = $groupscache[$post['displaygroup']];
| $usergroup = usergroup_permissions($post['usergroup']); } else { $usergroup = usergroup_permissions(1);
|
}
|
}
|
else
| // Fetch display group data. $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $displaygroup = usergroup_displaygroup($post['displaygroup']); if(is_array($displaygroup))
|
{
|
{
|
$usergroup = $groupscache[1];
| $usergroup = array_merge($usergroup, $displaygroup);
|
}
if(!is_array($titlescache))
| }
if(!is_array($titlescache))
|
Zeile 310 | Zeile 314 |
---|
if($post['away'] == 1 && $mybb->settings['allowaway'] != 0) { eval("\$post['onlinestatus'] = \"".$templates->get("postbit_away")."\";");
|
if($post['away'] == 1 && $mybb->settings['allowaway'] != 0) { eval("\$post['onlinestatus'] = \"".$templates->get("postbit_away")."\";");
|
} else {
| } else {
|
eval("\$post['onlinestatus'] = \"".$templates->get("postbit_offline")."\";"); } }
| eval("\$post['onlinestatus'] = \"".$templates->get("postbit_offline")."\";"); } }
|
Zeile 503 | Zeile 507 |
---|
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 541 |
---|
{ $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 562 |
---|
$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 573 |
---|
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 586 |
---|
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 591 | Zeile 597 |
---|
{ $postbit_qdelete = $lang->postbit_qdelete_thread; $display = '';
|
{ $postbit_qdelete = $lang->postbit_qdelete_thread; $display = '';
|
if($post['visible'] == -1) {
| if($post['visible'] == -1) {
|
$display = "none"; } eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
| $display = "none"; } eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";");
|
Zeile 600 | Zeile 606 |
---|
// Restore Post if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)
|
// Restore Post if(is_moderator($fid, "canrestoreposts") && $postcounter != 1)
|
{ $display = "none"; if($post['visible'] == -1) {
| { $display = "none"; if($post['visible'] == -1) {
|
$display = ''; } $postbit_qrestore = $lang->postbit_qrestore_post;
| $display = ''; } $postbit_qrestore = $lang->postbit_qrestore_post;
|
Zeile 631 | Zeile 637 |
---|
// 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++;
| { $inlinecheck = "checked=\"checked\""; $inlinecount++;
|
Zeile 701 | Zeile 707 |
---|
else if($show_ips == "hide" && (is_moderator($fid, "canviewips") || $mybb->usergroup['issupermod'])) { $action = 'getip';
|
else if($show_ips == "hide" && (is_moderator($fid, "canviewips") || $mybb->usergroup['issupermod'])) { $action = 'getip';
|
| $javascript = 'getIP';
|
if($post_type == 2) { $action = 'getpmip';
|
if($post_type == 2) { $action = 'getpmip';
|
| $javascript = 'getPMIP';
|
}
|
}
|
|
|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";"); } }
| eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";"); } }
|
Zeile 736 | Zeile 746 |
---|
if(isset($post['smilieoff']) && $post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0;
|
if(isset($post['smilieoff']) && $post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0;
|
}
| }
|
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0) { $parser_options['allow_imgcode'] = 0;
| if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0) { $parser_options['allow_imgcode'] = 0;
|
Zeile 761 | Zeile 771 |
---|
if($mybb->settings['enableattachments'] != 0) { get_post_attachments($id, $post);
|
if($mybb->settings['enableattachments'] != 0) { 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
| 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
|
Zeile 785 | Zeile 795 |
---|
{ $sig_parser['allow_imgcode'] = 0; }
|
{ $sig_parser['allow_imgcode'] = 0; }
|
|
|
$post['signature'] = $parser->parse_message($post['signature'], $sig_parser); eval("\$post['signature'] = \"".$templates->get("postbit_signature")."\";");
|
$post['signature'] = $parser->parse_message($post['signature'], $sig_parser); eval("\$post['signature'] = \"".$templates->get("postbit_signature")."\";");
|
}
| }
|
else { $post['signature'] = ""; }
|
else { $post['signature'] = ""; }
|
|
|
$icon_cache = $cache->read("posticons");
if(isset($post['icon']) && $post['icon'] > 0 && $icon_cache[$post['icon']])
|
$icon_cache = $cache->read("posticons");
if(isset($post['icon']) && $post['icon'] > 0 && $icon_cache[$post['icon']])
|
{
| {
|
$icon = $icon_cache[$post['icon']];
|
$icon = $icon_cache[$post['icon']];
|
|
|
$icon['path'] = htmlspecialchars_uni($icon['path']); $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
| $icon['path'] = htmlspecialchars_uni($icon['path']); $icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']);
|
Zeile 808 | Zeile 818 |
---|
else { $post['icon'] = "";
|
else { $post['icon'] = "";
|
}
| }
|
$post_visibility = $ignore_bit = $deleted_bit = ''; switch($post_type) { case 1: // Message preview $post = $plugins->run_hooks("postbit_prev", $post);
|
$post_visibility = $ignore_bit = $deleted_bit = ''; switch($post_type) { case 1: // Message preview $post = $plugins->run_hooks("postbit_prev", $post);
|
break;
| break;
|
case 2: // Private message $post = $plugins->run_hooks("postbit_pm", $post); break; case 3: // Announcement $post = $plugins->run_hooks("postbit_announcement", $post);
|
case 2: // Private message $post = $plugins->run_hooks("postbit_pm", $post); break; case 3: // Announcement $post = $plugins->run_hooks("postbit_announcement", $post);
|
break;
| break;
|
default: // Regular post $post = $plugins->run_hooks("postbit", $post);
| default: // Regular post $post = $plugins->run_hooks("postbit", $post);
|
Zeile 836 | Zeile 846 |
---|
$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 870 | Zeile 880 |
---|
{ eval("\$postbit = \"".$templates->get("postbit")."\";"); }
|
{ eval("\$postbit = \"".$templates->get("postbit")."\";"); }
|
}
| }
|
$GLOBALS['post'] = "";
| $GLOBALS['post'] = "";
|
Zeile 895 | Zeile 905 |
---|
{ $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 930 |
---|
{ $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) {
|