Zeile 23 | Zeile 23 |
---|
global $plugins, $parser, $cache, $ignored_users, $hascustomtitle;
$hascustomtitle = 0;
|
global $plugins, $parser, $cache, $ignored_users, $hascustomtitle;
$hascustomtitle = 0;
|
| // These will be unset when a guest is previewing a post that they're posting *as* a guest. // In that case, set them to empty values to avert PHP 8 warnings re unset variables ahead. if(!isset($post['userusername'])) { $post['userusername'] = ''; } if(!isset($post['uid'])) { $post['uid'] = 0; } if(!isset($post['usergroup'])) { $post['usergroup'] = 0; }
|
// Set default values for any fields not provided here foreach(array('pid', 'aid', 'pmid', 'posturl', 'button_multiquote', 'subject_extra', 'attachments', 'button_rep', 'button_warn', 'button_purgespammer', 'button_pm', 'button_reply_pm', 'button_replyall_pm', 'button_forward_pm', 'button_delete_pm', 'replink', 'warninglevel') as $post_field)
| // Set default values for any fields not provided here foreach(array('pid', 'aid', 'pmid', 'posturl', 'button_multiquote', 'subject_extra', 'attachments', 'button_rep', 'button_warn', 'button_purgespammer', 'button_pm', 'button_reply_pm', 'button_replyall_pm', 'button_forward_pm', 'button_delete_pm', 'replink', 'warninglevel') as $post_field)
|
Zeile 38 | Zeile 55 |
---|
{ require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
{ require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
}
| }
|
if(!function_exists("purgespammer_show"))
|
if(!function_exists("purgespammer_show"))
|
{
| {
|
require_once MYBB_ROOT."inc/functions_user.php";
|
require_once MYBB_ROOT."inc/functions_user.php";
|
}
| }
|
$unapproved_shade = ''; if(isset($post['visible']) && $post['visible'] == 0 && $post_type == 0)
|
$unapproved_shade = ''; if(isset($post['visible']) && $post['visible'] == 0 && $post_type == 0)
|
{
| {
|
$altbg = $unapproved_shade = 'unapproved_post';
|
$altbg = $unapproved_shade = 'unapproved_post';
|
}
| }
|
elseif(isset($post['visible']) && $post['visible'] == -1 && $post_type == 0) { $altbg = $unapproved_shade = 'unapproved_post deleted_post'; } elseif($altbg == 'trow1')
|
elseif(isset($post['visible']) && $post['visible'] == -1 && $post_type == 0) { $altbg = $unapproved_shade = 'unapproved_post deleted_post'; } elseif($altbg == 'trow1')
|
{
| {
|
$altbg = 'trow2';
|
$altbg = 'trow2';
|
}
| }
|
else
|
else
|
{
| {
|
$altbg = 'trow1'; } $post['fid'] = $fid;
| $altbg = 'trow1'; } $post['fid'] = $fid;
|
Zeile 67 | Zeile 84 |
---|
{ case 1: // Message preview global $forum;
|
{ case 1: // Message preview global $forum;
|
$parser_options['allow_html'] = $forum['allowhtml']; $parser_options['allow_mycode'] = $forum['allowmycode']; $parser_options['allow_smilies'] = $forum['allowsmilies']; $parser_options['allow_imgcode'] = $forum['allowimgcode']; $parser_options['allow_videocode'] = $forum['allowvideocode']; $parser_options['me_username'] = $post['username']; $parser_options['filter_badwords'] = 1;
| $parser_options['allow_html'] = $forum['allowhtml']; $parser_options['allow_mycode'] = $forum['allowmycode']; $parser_options['allow_smilies'] = $forum['allowsmilies']; $parser_options['allow_imgcode'] = $forum['allowimgcode']; $parser_options['allow_videocode'] = $forum['allowvideocode']; $parser_options['me_username'] = $post['username']; $parser_options['filter_badwords'] = 1;
|
$id = 0; break; case 2: // Private message
| $id = 0; break; case 2: // Private message
|
Zeile 87 | Zeile 104 |
---|
$parser_options['me_username'] = $post['username']; $parser_options['filter_badwords'] = 1; $id = $pmid;
|
$parser_options['me_username'] = $post['username']; $parser_options['filter_badwords'] = 1; $id = $pmid;
|
break;
| break;
|
case 3: // Announcement global $announcementarray, $message; $parser_options['allow_html'] = $mybb->settings['announcementshtml'] && $announcementarray['allowhtml'];
| case 3: // Announcement global $announcementarray, $message; $parser_options['allow_html'] = $mybb->settings['announcementshtml'] && $announcementarray['allowhtml'];
|
Zeile 119 | Zeile 136 |
---|
}
if($post['userusername'])
|
}
if($post['userusername'])
|
{
| {
|
$parser_options['me_username'] = $post['userusername']; } else
| $parser_options['me_username'] = $post['userusername']; } else
|
Zeile 144 | Zeile 161 |
---|
else { $postcounter = 0;
|
else { $postcounter = 0;
|
} $post_extra_style = "border-top-width: 0;"; } elseif($mybb->input['mode'] == "threaded") { $post_extra_style = "border-top-width: 0;"; } else
| } $post_extra_style = "border-top-width: 0;"; } elseif($mybb->get_input('mode') == "threaded") { $post_extra_style = "border-top-width: 0;"; } 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']);
// Dont want any little 'nasties' in the subject $post['subject'] = $parser->parse_badwords($post['subject']);
|
// 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) {
| // Pm's have been htmlspecialchars_uni()'ed already. if($post_type != 2) {
|
Zeile 195 | Zeile 212 |
---|
// Fetch display group data. $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
|
// Fetch display group data. $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
|
if(!$post['displaygroup'])
| if(empty($post['displaygroup']))
|
{ $post['displaygroup'] = $post['usergroup'];
|
{ $post['displaygroup'] = $post['usergroup'];
|
| }
// Set to hardcoded Guest usergroup ID (1) for guest author or deleted user. if(empty($post['usergroup'])) { $post['usergroup'] = 1; } if(empty($post['displaygroup'])) { $post['displaygroup'] = 1;
|
}
$displaygroup = usergroup_displaygroup($post['displaygroup']);
| }
$displaygroup = usergroup_displaygroup($post['displaygroup']);
|
Zeile 215 | Zeile 242 |
---|
{ $titlescache[$usertitle['posts']] = $usertitle; }
|
{ $titlescache[$usertitle['posts']] = $usertitle; }
|
}
| }
|
if(is_array($titlescache)) {
| if(is_array($titlescache)) {
|
Zeile 243 | Zeile 270 |
---|
$post['groupimage'] .= "<br />"; } }
|
$post['groupimage'] .= "<br />"; } }
|
| $post['profilelink_plain'] = $post['username_formatted'] = '';
|
if($post['userusername']) {
| if($post['userusername']) {
|
Zeile 275 | Zeile 304 |
---|
$post['stars'] = $titleinfo['stars']; $post['starimage'] = $titleinfo['starimage']; break;
|
$post['stars'] = $titleinfo['stars']; $post['starimage'] = $titleinfo['starimage']; break;
|
} } }
| } } }
|
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
if($usergroup['stars'])
| $post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
if($usergroup['stars'])
|
Zeile 291 | Zeile 320 |
---|
$post['starimage'] = $usergroup['starimage']; }
|
$post['starimage'] = $usergroup['starimage']; }
|
if($post['starimage'] && $post['stars'])
| $post['userstars'] = ''; if($post['starimage'] && isset($post['stars']))
|
{ // Only display stars if we have an image to use... $post['starimage'] = str_replace("{theme}", $theme['imgdir'], $post['starimage']);
|
{ // Only display stars if we have an image to use... $post['starimage'] = str_replace("{theme}", $theme['imgdir'], $post['starimage']);
|
$post['userstars'] = '';
| |
for($i = 0; $i < $post['stars']; ++$i) { eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";");
| for($i = 0; $i < $post['stars']; ++$i) { eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";");
|
Zeile 348 | Zeile 377 |
---|
$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)) {
|
$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(empty($post['pid']))
|
{ $post['pid'] = 0; }
| { $post['pid'] = 0; }
|
Zeile 416 | Zeile 445 |
---|
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')."\";");
|
| }
if(!isset($profile_fields)) { $profile_fields = array();
// Fetch profile fields to display $pfcache = $cache->read('profilefields'); if(is_array($pfcache)) { foreach($pfcache as $profilefield) { if($profilefield['postbit'] != 1) { continue; } $profile_fields[$profilefield['fid']] = $profilefield; } }
|
}
// Display profile fields on posts - only if field is filled in
|
}
// Display profile fields on posts - only if field is filled in
|
if(is_array($profile_fields))
| $post['profilefield'] = ''; if(!empty($profile_fields))
|
{ foreach($profile_fields as $field) {
| { foreach($profile_fields as $field) {
|
Zeile 435 | Zeile 486 |
---|
if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox")) {
|
if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox")) {
|
| $post['fieldvalue_option'] = '';
|
foreach($useropts as $val) { if($val != '')
| foreach($useropts as $val) { if($val != '')
|
Zeile 459 | Zeile 512 |
---|
"filter_badwords" => 1 );
|
"filter_badwords" => 1 );
|
if($customfield['type'] == "textarea")
| if($field['type'] == "textarea")
|
{ $field_parser_options['me_username'] = $post['username']; }
| { $field_parser_options['me_username'] = $post['username']; }
|
Zeile 468 | Zeile 521 |
---|
$field_parser_options['nl2br'] = 0; }
|
$field_parser_options['nl2br'] = 0; }
|
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
| if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
|
{ $field_parser_options['allow_imgcode'] = 0; }
| { $field_parser_options['allow_imgcode'] = 0; }
|
Zeile 479 | Zeile 532 |
---|
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 497 | Zeile 550 |
---|
}
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
|
}
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
|
| $post['userstars'] = ''; $post['useravatar'] = '';
|
$usergroup['title'] = $lang->na;
| $usergroup['title'] = $lang->na;
|
Zeile 537 | Zeile 592 |
---|
if($replyall == true) { eval("\$post['button_replyall_pm'] = \"".$templates->get("postbit_replyall_pm")."\";");
|
if($replyall == true) { eval("\$post['button_replyall_pm'] = \"".$templates->get("postbit_replyall_pm")."\";");
|
}
| }
|
}
$post['editedmsg'] = '';
| }
$post['editedmsg'] = '';
|
Zeile 549 | Zeile 604 |
---|
}
// Figure out if we need to show an "edited by" message
|
}
// 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)))
| if($post['edituid'] != 0 && $post['edittime'] != 0 && $post['editusername'] != "" && ($mybb->settings['showeditedby'] != 0 && $usergroup['cancp'] == 0 && !is_moderator($post['fid'], "", $post['uid']) || ($mybb->settings['showeditedbyadmin'] != 0 && ($usergroup['cancp'] == 1 || is_moderator($post['fid'], "", $post['uid'])))))
|
{ $post['editdate'] = my_date('relative', $post['edittime']); $post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate']);
| { $post['editdate'] = my_date('relative', $post['edittime']); $post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate']);
|
Zeile 669 | Zeile 724 |
---|
eval("\$post['posturl'] = \"".$templates->get("postbit_posturl")."\";"); global $forum, $thread;
|
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))
| if($forum['open'] != 0 && ($thread['closed'] != 1 || is_moderator($forum['fid'], "canpostclosedthreads")) && ($thread['uid'] == $mybb->user['uid'] || empty($forumpermissions['canonlyreplyownthreads'])))
|
{ eval("\$post['button_quote'] = \"".$templates->get("postbit_quote")."\";"); }
|
{ 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($forumpermissions['canpostreplys'] != 0 && ($thread['uid'] == $mybb->user['uid'] || empty($forumpermissions['canonlyreplyownthreads'])) && ($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(isset($post['reporters'])) { $skip_report = my_unserialize($post['reporters']); if(is_array($skip_report)) { $skip_report[] = 0; } else { $skip_report = array(0); } } else { $skip_report = array(0);
|
}
$reportable = user_permissions($post['uid']);
|
}
$reportable = user_permissions($post['uid']);
|
if($mybb->user['uid'] != "0" && !empty($reportable['canbereported']))
| 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 696 | Zeile 768 |
---|
$post['iplogged'] = ''; $show_ips = $mybb->settings['logip'];
|
$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 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) { if($show_ips != "no" && !empty($post['ipaddress'])) {
|
$show_ips = $mybb->settings['showpmip']; } if(!$post_type || $post_type == 2) { if($show_ips != "no" && !empty($post['ipaddress'])) {
|
| $ipaddress = my_inet_ntop($db->unescape_binary($post['ipaddress']));
|
if($show_ips == "show") { eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";");
| if($show_ips == "show") { eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";");
|
Zeile 724 | Zeile 797 |
---|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";"); }
|
eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";"); }
|
}
| }
|
}
$post['poststatus'] = ''; if(!$post_type && $post['visible'] != 1) {
|
}
$post['poststatus'] = ''; if(!$post_type && $post['visible'] != 1) {
|
| $status_type = '';
|
if(is_moderator($fid, "canviewdeleted") && $postcounter != 1 && $post['visible'] == -1) { $status_type = $lang->postbit_post_deleted;
| if(is_moderator($fid, "canviewdeleted") && $postcounter != 1 && $post['visible'] == -1) { $status_type = $lang->postbit_post_deleted;
|
Zeile 755 | Zeile 829 |
---|
$parser_options['allow_smilies'] = 0; }
|
$parser_options['allow_smilies'] = 0; }
|
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
| if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
|
{ $parser_options['allow_imgcode'] = 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['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)
|
{ $parser_options['allow_videocode'] = 0; }
| { $parser_options['allow_videocode'] = 0; }
|
Zeile 796 | Zeile 870 |
---|
if($usergroup['signofollow']) { $sig_parser['nofollow_on'] = 1;
|
if($usergroup['signofollow']) { $sig_parser['nofollow_on'] = 1;
|
}
if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
| }
if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
|
{ $sig_parser['allow_imgcode'] = 0; }
| { $sig_parser['allow_imgcode'] = 0; }
|
Zeile 881 | Zeile 955 |
---|
break; }
|
break; }
|
if($forumpermissions['canviewdeletionnotice'] == 1 && $post['visible'] == -1 && $post_type == 0 && !is_moderator($fid, "canviewdeleted"))
| if($post_type == 0 && $forumpermissions['canviewdeletionnotice'] == 1 && $post['visible'] == -1 && !is_moderator($fid, "canviewdeleted"))
|
{ eval("\$postbit = \"".$templates->get("postbit_deleted_member")."\";"); }
| { eval("\$postbit = \"".$templates->get("postbit_deleted_member")."\";"); }
|
Zeile 943 | Zeile 1017 |
---|
if(!$attachment['dateuploaded']) {
|
if(!$attachment['dateuploaded']) {
|
$attachment['dateuploaded'] = $attachment['dateline'];
| $attachment['dateuploaded'] = $post['dateline'];
|
} $attachdate = my_date('normal', $attachment['dateuploaded']); // Support for [attachment=id] code
| } $attachdate = my_date('normal', $attachment['dateuploaded']); // Support for [attachment=id] code
|
Zeile 976 | Zeile 1050 |
---|
eval("\$post['thumblist'] .= \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";"); if($tcount == 5) {
|
eval("\$post['thumblist'] .= \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";"); if($tcount == 5) {
|
$thumblist .= "<br />";
| $post['thumblist'] .= "<br />";
|
$tcount = 0; } ++$tcount; } elseif((($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == 1) || $mybb->settings['attachthumbnails'] == "no") && $isimage) {
|
$tcount = 0; } ++$tcount; } elseif((($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == 1) || $mybb->settings['attachthumbnails'] == "no") && $isimage) {
|
eval("\$post['imagelist'] .= \"".$templates->get("postbit_attachments_images_image")."\";");
| if ($forumpermissions['candlattachments']) { eval("\$post['imagelist'] .= \"".$templates->get("postbit_attachments_images_image")."\";"); } else { eval("\$post['thumblist'] .= \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";"); if($tcount == 5) { $post['thumblist'] .= "<br />"; $tcount = 0; } ++$tcount; }
|
} else { eval("\$post['attachmentlist'] .= \"".$templates->get("postbit_attachments_attachment")."\";"); } }
|
} else { eval("\$post['attachmentlist'] .= \"".$templates->get("postbit_attachments_attachment")."\";"); } }
|
} else {
| } else {
|
$validationcount++; } }
| $validationcount++; } }
|
Zeile 1001 | Zeile 1088 |
---|
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);
| else { $postbit_unapproved_attachments = $lang->sprintf($lang->postbit_unapproved_attachments, $validationcount);
|
Zeile 1019 | Zeile 1106 |
---|
if($post['imagelist']) { eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";");
|
if($post['imagelist']) { eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";");
|
}
| }
|
else
|
else
|
{
| {
|
$post['attachedimages'] = '';
|
$post['attachedimages'] = '';
|
}
| }
|
if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist']) { eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";");
|
if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist']) { eval("\$post['attachments'] = \"".$templates->get("postbit_attachments")."\";");
|
} }
| } }
|
}
/**
| }
/**
|
Zeile 1045 | Zeile 1132 |
---|
}
$last = strtolower($val[strlen($val)-1]);
|
}
$last = strtolower($val[strlen($val)-1]);
|
| $val = intval($val);
|
switch($last)
|
switch($last)
|
{
| {
|
case 'g':
|
case 'g':
|
$val *= 1024;
| $val *= 1024;
|
case 'm':
|
case 'm':
|
$val *= 1024;
| $val *= 1024;
|
case 'k': $val *= 1024;
|
case 'k': $val *= 1024;
|
}
| }
return $val; }
/** * Detects whether an attachment removal/approval/unapproval * submit button was pressed (without triggering an AJAX request) * and sets inputs accordingly (as for an AJAX request). */ function detect_attachmentact() { global $mybb;
|
|
|
return intval($val);
| foreach($mybb->input as $key => $val) { if(strpos($key, 'rem_') === 0) { $mybb->input['attachmentaid'] = (int)substr($key, 4); $mybb->input['attachmentact'] = 'remove'; break; } elseif(strpos($key, 'approveattach_') === 0) { $mybb->input['attachmentaid'] = (int)substr($key, 14); $mybb->input['attachmentact'] = 'approve'; break; } elseif(strpos($key, 'unapproveattach_') === 0) { $mybb->input['attachmentaid'] = (int)substr($key, 16); $mybb->input['attachmentact'] = 'unapprove'; break; } }
|
}
| }
|