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']);
|
$post['userusername'] = htmlspecialchars_uni($post['userusername']);
| $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 142 | Zeile 142 |
---|
$postcounter = $mybb->settings['postsperpage']*($page-1); } else
|
$postcounter = $mybb->settings['postsperpage']*($page-1); } else
|
{
| {
|
$postcounter = 0; } $post_extra_style = "border-top-width: 0;";
| $postcounter = 0; } $post_extra_style = "border-top-width: 0;";
|
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 {
|
else {
|
$usergroup = $groupscache[1];
| $usergroup = usergroup_permissions(1); }
// Fetch display group data. $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
if(!$post['displaygroup']) { $post['displaygroup'] = $post['usergroup']; }
$displaygroup = usergroup_displaygroup($post['displaygroup']); if(is_array($displaygroup)) { $usergroup = array_merge($usergroup, $displaygroup);
|
}
if(!is_array($titlescache))
| }
if(!is_array($titlescache))
|
Zeile 227 | Zeile 237 |
---|
$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']); $usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']); eval("\$post['groupimage'] = \"".$templates->get("postbit_groupimage")."\";");
|
$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']); $usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']); eval("\$post['groupimage'] = \"".$templates->get("postbit_groupimage")."\";");
|
if($mybb->settings['postlayout'] == "classic")
| if($mybb->settings['postlayout'] == "classic")
|
{ $post['groupimage'] .= "<br />"; }
| { $post['groupimage'] .= "<br />"; }
|
Zeile 266 | Zeile 276 |
---|
$post['starimage'] = $titleinfo['starimage']; break; }
|
$post['starimage'] = $titleinfo['starimage']; break; }
|
} }
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
| } }
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
|
if($usergroup['stars']) { $post['stars'] = $usergroup['stars'];
| if($usergroup['stars']) { $post['stars'] = $usergroup['stars'];
|
Zeile 330 | Zeile 340 |
---|
eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";"); }
|
eval("\$post['button_find'] = \"".$templates->get("postbit_find")."\";"); }
|
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))
| if($mybb->settings['enablepms'] == 1 && $post['uid'] != $mybb->user['uid'] && (($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 339 | Zeile 349 |
---|
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_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'])
|
{
| {
|
$post['pid'] = 0; }
| $post['pid'] = 0; }
|
Zeile 356 | Zeile 366 |
---|
$post['button_www'] = ""; }
|
$post['button_www'] = ""; }
|
if($post['hideemail'] != 1 && $mybb->usergroup['cansendemail'] == 1)
| if($post['hideemail'] != 1 && $post['uid'] != $mybb->user['uid'] && $mybb->usergroup['cansendemail'] == 1)
|
{ eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";"); }
| { eval("\$post['button_email'] = \"".$templates->get("postbit_email")."\";"); }
|
Zeile 450 | Zeile 460 |
---|
);
if($customfield['type'] == "textarea")
|
);
if($customfield['type'] == "textarea")
|
{
| {
|
$field_parser_options['me_username'] = $post['username']; } else
| $field_parser_options['me_username'] = $post['username']; } else
|
Zeile 472 | Zeile 482 |
---|
}
eval("\$post['user_details'] = \"".$templates->get("postbit_author_user")."\";");
|
}
eval("\$post['user_details'] = \"".$templates->get("postbit_author_user")."\";");
|
}
| }
|
else { // Message was posted by a guest or an unknown user $post['profilelink'] = format_name($post['username'], 1);
| else { // Message was posted by a guest or an unknown user $post['profilelink'] = format_name($post['username'], 1);
|
Zeile 482 | Zeile 492 |
---|
$post['usertitle'] = $usergroup['usertitle']; } else
|
$post['usertitle'] = $usergroup['usertitle']; } else
|
{
| {
|
$post['usertitle'] = $lang->guest; }
| $post['usertitle'] = $lang->guest; }
|
Zeile 503 | Zeile 513 |
---|
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 547 |
---|
{ $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 568 |
---|
$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 631 | Zeile 643 |
---|
// 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 667 | Zeile 679 |
---|
eval("\$post['button_multiquote'] = \"".$templates->get("postbit_multiquote")."\";"); }
|
eval("\$post['button_multiquote'] = \"".$templates->get("postbit_multiquote")."\";"); }
|
if($mybb->user['uid'] != "0")
| $skip_report = my_unserialize($post['reporters']); if(is_array($skip_report)) { $skip_report[] = 0; } else { $skip_report = array(0); }
$reportable = user_permissions($post['uid']); if(!in_array($mybb->user['uid'], $skip_report) && !empty($reportable['canbereported']))
|
{ eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";"); }
| { eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";"); }
|
Zeile 701 | Zeile 724 |
---|
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 731 | Zeile 758 |
---|
}
eval("\$post['poststatus'] = \"".$templates->get("postbit_status")."\";");
|
}
eval("\$post['poststatus'] = \"".$templates->get("postbit_status")."\";");
|
}
| }
|
if(isset($post['smilieoff']) && $post['smilieoff'] == 1)
|
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;
|
$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['showvideos'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0) {
| if($mybb->user['showvideos'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0) {
|
Zeile 762 | Zeile 789 |
---|
{ 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']) && !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']))
|
Zeile 782 | Zeile 809 |
---|
}
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; }
|
Zeile 824 | Zeile 851 |
---|
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(!isset($ignored_users)) { $ignored_users = array();
|
Zeile 836 | Zeile 863 |
---|
$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"))
|
// 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")."\";");
|
$deleted_message = $lang->sprintf($lang->postbit_deleted_post_user, $post['username']); eval("\$deleted_bit = \"".$templates->get("postbit_deleted")."\";");
|
| $post_visibility = "display: none;"; }
// Is the user (not moderator) logged in and have unapproved posts? if($mybb->user['uid'] && $post['visible'] == 0 && $post['uid'] == $mybb->user['uid'] && !is_moderator($fid, "canviewunapprove")) { $ignored_message = $lang->sprintf($lang->postbit_post_under_moderation, $post['username']); eval("\$ignore_bit = \"".$templates->get("postbit_ignored")."\";");
|
$post_visibility = "display: none;"; }
| $post_visibility = "display: none;"; }
|
Zeile 865 | Zeile 900 |
---|
if($mybb->settings['postlayout'] == "classic") { eval("\$postbit = \"".$templates->get("postbit_classic")."\";");
|
if($mybb->settings['postlayout'] == "classic") { eval("\$postbit = \"".$templates->get("postbit_classic")."\";");
|
}
| }
|
else { eval("\$postbit = \"".$templates->get("postbit")."\";");
| else { eval("\$postbit = \"".$templates->get("postbit")."\";");
|
Zeile 892 | Zeile 927 |
---|
$tcount = 0; $post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = ''; if(!isset($forumpermissions))
|
$tcount = 0; $post['attachmentlist'] = $post['thumblist'] = $post['imagelist'] = ''; if(!isset($forumpermissions))
|
{
| {
|
$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 955 |
---|
{ $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) {
|
Zeile 934 | Zeile 969 |
---|
elseif((($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == 1) || $mybb->settings['attachthumbnails'] == "no") && $isimage) { eval("\$attbit = \"".$templates->get("postbit_attachments_images_image")."\";");
|
elseif((($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == 1) || $mybb->settings['attachthumbnails'] == "no") && $isimage) { eval("\$attbit = \"".$templates->get("postbit_attachments_images_image")."\";");
|
} else
| } else
|
{ eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";"); }
| { eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";"); }
|
Zeile 976 | Zeile 1011 |
---|
if($validationcount == 1) { $postbit_unapproved_attachments = $lang->postbit_unapproved_attachment;
|
if($validationcount == 1) { $postbit_unapproved_attachments = $lang->postbit_unapproved_attachment;
|
}
| }
|
else { $postbit_unapproved_attachments = $lang->sprintf($lang->postbit_unapproved_attachments, $validationcount); } eval("\$post['attachmentlist'] .= \"".$templates->get("postbit_attachments_attachment_unapproved")."\";");
|
else { $postbit_unapproved_attachments = $lang->sprintf($lang->postbit_unapproved_attachments, $validationcount); } eval("\$post['attachmentlist'] .= \"".$templates->get("postbit_attachments_attachment_unapproved")."\";");
|
}
| }
|
if($post['thumblist']) { eval("\$post['attachedthumbs'] = \"".$templates->get("postbit_attachments_thumbnails")."\";");
| if($post['thumblist']) { eval("\$post['attachedthumbs'] = \"".$templates->get("postbit_attachments_thumbnails")."\";");
|
Zeile 990 | Zeile 1025 |
---|
else { $post['attachedthumbs'] = '';
|
else { $post['attachedthumbs'] = '';
|
}
| }
|
if($post['imagelist'])
|
if($post['imagelist'])
|
{
| {
|
eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";");
|
eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";");
|
}
| }
|
else { $post['attachedimages'] = '';
| else { $post['attachedimages'] = '';
|
Zeile 1004 | Zeile 1039 |
---|
eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";"); } }
|
eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";"); } }
|
| }
/** * Returns bytes count from human readable string * Used to parse ini_get human-readable values to int * * @param string $val Human-readable value */ function return_bytes($val) { $val = trim($val); if ($val == "") { return 0; }
$last = strtolower($val[strlen($val)-1]); switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; }
return intval($val);
|
}
| }
|