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['userusername'] = htmlspecialchars_uni($post['userusername']);
| $post['username'] = htmlspecialchars_uni($post['username']); $post['userusername'] = htmlspecialchars_uni($post['userusername']);
|
Zeile 137 | Zeile 137 |
---|
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;
|
}
| }
|
$postcounter = $mybb->settings['postsperpage']*($page-1); }
| $postcounter = $mybb->settings['postsperpage']*($page-1); }
|
Zeile 172 | Zeile 172 |
---|
if($post_type != 2) { $post['subject'] = htmlspecialchars_uni($post['subject']);
|
if($post_type != 2) { $post['subject'] = htmlspecialchars_uni($post['subject']);
|
}
| }
|
if(empty($post['subject'])) { $post['subject'] = ' '; }
|
if(empty($post['subject'])) { $post['subject'] = ' '; }
|
|
|
$post['author'] = $post['uid']; $post['subject_title'] = $post['subject'];
// Get the usergroup
|
$post['author'] = $post['uid']; $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 {
|
else {
|
$usergroup = $groupscache[1];
| $usergroup = usergroup_permissions(1); }
// Fetch display group data. $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $displaygroup = usergroup_displaygroup($post['displaygroup']); if(is_array($displaygroup)) { $usergroup = array_merge($usergroup, $displaygroup);
|
}
if(!is_array($titlescache))
| }
if(!is_array($titlescache))
|
Zeile 210 | Zeile 214 |
---|
if(is_array($titlescache)) { krsort($titlescache);
|
if(is_array($titlescache)) { krsort($titlescache);
|
}
| }
|
unset($usertitle, $cached_titles); }
| unset($usertitle, $cached_titles); }
|
Zeile 330 | Zeile 334 |
---|
eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";"); }
|
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)
| if($mybb->settings['enablepms'] == 1 && (($post['receivepms'] != 0 && $usergroup['canusepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))
|
{ eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";"); }
| { eval("\$post['button_pm'] = \"".$templates->get("postbit_pm")."\";"); }
|
Zeile 484 | Zeile 488 |
---|
else { $post['usertitle'] = $lang->guest;
|
else { $post['usertitle'] = $lang->guest;
|
}
| }
|
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
| $post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
|
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")."\";"); }
|
Zeile 565 | Zeile 571 |
---|
if($mybb->user['uid'] == $post['uid'] && $thread['closed'] == 0) { if($forumpermissions['candeletethreads'] == 1 && $postcounter == 1)
|
if($mybb->user['uid'] == $post['uid'] && $thread['closed'] == 0) { if($forumpermissions['candeletethreads'] == 1 && $postcounter == 1)
|
{
| {
|
$can_delete_thread = 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 576 | Zeile 582 |
---|
$postbit_qdelete = $postbit_qrestore = ''; if($mybb->user['uid'] != 0)
|
$postbit_qdelete = $postbit_qrestore = ''; if($mybb->user['uid'] != 0)
|
{
| {
|
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;
|
Zeile 588 | Zeile 594 |
---|
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";"); } else if((is_moderator($fid, "candeletethreads") || is_moderator($fid, "cansoftdeletethreads") || $can_delete_thread == 1) && $postcounter == 1)
|
eval("\$post['button_quickdelete'] = \"".$templates->get("postbit_quickdelete")."\";"); } else if((is_moderator($fid, "candeletethreads") || is_moderator($fid, "cansoftdeletethreads") || $can_delete_thread == 1) && $postcounter == 1)
|
{
| {
|
$postbit_qdelete = $lang->postbit_qdelete_thread; $display = ''; if($post['visible'] == -1)
| $postbit_qdelete = $lang->postbit_qdelete_thread; $display = ''; if($post['visible'] == -1)
|
Zeile 620 | Zeile 626 |
---|
} $postbit_qrestore = $lang->postbit_qrestore_thread; eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");
|
} $postbit_qrestore = $lang->postbit_qrestore_thread; eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";");
|
} }
| } }
|
if(!isset($ismod)) { $ismod = is_moderator($fid);
| if(!isset($ismod)) { $ismod = is_moderator($fid);
|
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 668 | Zeile 674 |
---|
}
if($mybb->user['uid'] != "0")
|
}
if($mybb->user['uid'] != "0")
|
{
| {
|
eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";");
|
eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";");
|
} }
| } }
|
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")."\";");
|
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")."\";");
|
} }
| } }
|
$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 691 | Zeile 697 |
---|
$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")
|
{
| {
|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";"); } else if($show_ips == "hide" && (is_moderator($fid, "canviewips") || $mybb->usergroup['issupermod'])) { $action = 'getip';
|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";"); } 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")."\";"); } }
|
| }
$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) { $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 759 | Zeile 792 |
---|
}
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
|
}
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
|
{
| {
|
$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");
| }
$icon_cache = $cache->read("posticons");
|
if(isset($post['icon']) && $post['icon'] > 0 && $icon_cache[$post['icon']]) {
| if(isset($post['icon']) && $post['icon'] > 0 && $icon_cache[$post['icon']]) {
|
Zeile 781 | Zeile 814 |
---|
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']); eval("\$post['icon'] = \"".$templates->get("postbit_icon")."\";");
|
$icon['path'] = str_replace("{theme}", $theme['imgdir'], $icon['path']); $icon['name'] = htmlspecialchars_uni($icon['name']); eval("\$post['icon'] = \"".$templates->get("postbit_icon")."\";");
|
} else
| } else
|
{ $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 795 | Zeile 828 |
---|
break; case 2: // Private message $post = $plugins->run_hooks("postbit_pm", $post);
|
break; case 2: // Private message $post = $plugins->run_hooks("postbit_pm", $post);
|
break;
| break;
|
case 3: // Announcement $post = $plugins->run_hooks("postbit_announcement", $post); break;
| case 3: // Announcement $post = $plugins->run_hooks("postbit_announcement", $post); break;
|
Zeile 813 | 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")."\";");
|
Zeile 825 | Zeile 866 |
---|
break; }
|
break; }
|
if($mybb->settings['postlayout'] == "classic")
| if($forumpermissions['canviewdeletionnotice'] == 1 && $post['visible'] == -1 && $post_type == 0 && !is_moderator($fid, "canviewdeleted"))
|
{
|
{
|
eval("\$postbit = \"".$templates->get("postbit_classic")."\";");
| 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;
|
Zeile 856 | 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 881 | 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) {
|