Zeile 147 | Zeile 147 |
---|
} $post_extra_style = "border-top-width: 0;"; }
|
} $post_extra_style = "border-top-width: 0;"; }
|
elseif($mybb->input['mode'] == "threaded")
| elseif($mybb->get_input('mode') == "threaded")
|
{ $post_extra_style = "border-top-width: 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 { $usergroup = usergroup_permissions(1); }
// Fetch display group data. $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");
if(empty($post['displaygroup'])) { $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;
|
}
|
}
|
else
| $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 274 | Zeile 294 |
---|
if($usergroup['stars']) { $post['stars'] = $usergroup['stars'];
|
if($usergroup['stars']) { $post['stars'] = $usergroup['stars'];
|
}
| }
|
if(empty($post['starimage']))
|
if(empty($post['starimage']))
|
{
| {
|
$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)
|
for($i = 0; $i < $post['stars']; ++$i)
|
{
| {
|
eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";"); }
| eval("\$post['userstars'] .= \"".$templates->get("postbit_userstar", 1, 0)."\";"); }
|
Zeile 330 | Zeile 350 |
---|
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 356 | Zeile 376 |
---|
$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 406 | Zeile 426 |
---|
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 418 | Zeile 460 |
---|
{ $post['fieldvalue'] = ''; $post['fieldname'] = htmlspecialchars_uni($field['name']);
|
{ $post['fieldvalue'] = ''; $post['fieldname'] = htmlspecialchars_uni($field['name']);
|
|
|
$thing = explode("\n", $field['type'], "2"); $type = trim($thing[0]); $useropts = explode("\n", $post[$fieldfid]);
|
$thing = explode("\n", $field['type'], "2"); $type = trim($thing[0]); $useropts = explode("\n", $post[$fieldfid]);
|
|
|
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 449 | Zeile 493 |
---|
"filter_badwords" => 1 );
|
"filter_badwords" => 1 );
|
if($customfield['type'] == "textarea")
| if($field['type'] == "textarea")
|
{ $field_parser_options['me_username'] = $post['username']; } else { $field_parser_options['nl2br'] = 0;
|
{ $field_parser_options['me_username'] = $post['username']; } else { $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 487 | Zeile 531 |
---|
}
$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 539 | Zeile 585 |
---|
}
// 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 593 | Zeile 639 |
---|
{ $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 607 | Zeile 653 |
---|
if($post['visible'] == -1) { $display = '';
|
if($post['visible'] == -1) { $display = '';
|
}
| }
|
$postbit_qrestore = $lang->postbit_qrestore_post; eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";"); }
| $postbit_qrestore = $lang->postbit_qrestore_post; eval("\$post['button_quickrestore'] = \"".$templates->get("postbit_quickrestore")."\";"); }
|
Zeile 641 | Zeile 687 |
---|
else { $inlinecheck = "";
|
else { $inlinecheck = "";
|
}
eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");
| }
eval("\$post['inlinecheck'] = \"".$templates->get("postbit_inlinecheck")."\";");
|
if($post['visible'] == 0) {
| if($post['visible'] == 0) {
|
Zeile 659 | Zeile 705 |
---|
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($mybb->user['uid'] != "0") { eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";"); }
| 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']); if(!in_array($mybb->user['uid'], $skip_report) && !empty($reportable['canbereported'])) { eval("\$post['button_report'] = \"".$templates->get("postbit_report")."\";"); }
|
} elseif($post_type == 3) // announcement {
| } elseif($post_type == 3) // announcement {
|
Zeile 681 | Zeile 745 |
---|
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'];
|
$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 703 | Zeile 768 |
---|
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 714 | Zeile 783 |
---|
$post['poststatus'] = ''; if(!$post_type && $post['visible'] != 1)
|
$post['poststatus'] = ''; if(!$post_type && $post['visible'] != 1)
|
{
| {
|
if(is_moderator($fid, "canviewdeleted") && $postcounter != 1 && $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_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;
|
$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; }
|
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;
|
eval("\$post['poststatus'] = \"".$templates->get("postbit_status")."\";"); }
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) {
| }
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; }
// If we have incoming search terms to highlight - get it done. if(!empty($mybb->input['highlight']))
|
{ $parser_options['allow_videocode'] = 0; }
// If we have incoming search terms to highlight - get it done. if(!empty($mybb->input['highlight']))
|
{
| {
|
$parser_options['highlight'] = $mybb->input['highlight']; $post['subject'] = $parser->highlight_message($post['subject'], $parser_options['highlight']);
|
$parser_options['highlight'] = $mybb->input['highlight']; $post['subject'] = $parser->highlight_message($post['subject'], $parser_options['highlight']);
|
}
$post['message'] = $parser->parse_message($post['message'], $parser_options);
| }
$post['message'] = $parser->parse_message($post['message'], $parser_options);
|
$post['attachments'] = ''; if($mybb->settings['enableattachments'] != 0) { get_post_attachments($id, $post);
|
$post['attachments'] = ''; 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 && ($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 783 | Zeile 852 |
---|
$sig_parser['nofollow_on'] = 1; }
|
$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 801 | Zeile 870 |
---|
if(isset($post['icon']) && $post['icon'] > 0 && $icon_cache[$post['icon']]) { $icon = $icon_cache[$post['icon']];
|
if(isset($post['icon']) && $post['icon'] > 0 && $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 828 | Zeile 897 |
---|
$post = $plugins->run_hooks("postbit", $post);
if(!isset($ignored_users))
|
$post = $plugins->run_hooks("postbit", $post);
if(!isset($ignored_users))
|
{
| {
|
$ignored_users = array(); if($mybb->user['uid'] > 0 && $mybb->user['ignorelist'] != "") {
| $ignored_users = array(); if($mybb->user['uid'] > 0 && $mybb->user['ignorelist'] != "") {
|
Zeile 838 | Zeile 907 |
---|
$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 858 | Zeile 935 |
---|
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 960 | Zeile 1037 |
---|
} elseif((($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == 1) || $mybb->settings['attachthumbnails'] == "no") && $isimage) {
|
} 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) { $thumblist .= "<br />"; $tcount = 0; } ++$tcount; }
|
} else {
| } else {
|
Zeile 971 | Zeile 1061 |
---|
else { $validationcount++;
|
else { $validationcount++;
|
}
| }
|
} if($validationcount > 0 && is_moderator($post['fid'], "canviewunapprove")) {
| } if($validationcount > 0 && is_moderator($post['fid'], "canviewunapprove")) {
|
Zeile 998 | Zeile 1088 |
---|
eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";"); } else
|
eval("\$post['attachedimages'] = \"".$templates->get("postbit_attachments_images")."\";"); } else
|
{
| {
|
$post['attachedimages'] = '';
|
$post['attachedimages'] = '';
|
}
| }
|
if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist'])
|
if($post['attachmentlist'] || $post['thumblist'] || $post['imagelist'])
|
{
| {
|
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]);
$val = intval($val);
switch($last) { case 'g': $val *= 1024; case 'm': $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;
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;
|
} } }
| } } }
|