Zeile 194 | Zeile 194 |
---|
// 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']) { $post['displaygroup'] = $post['usergroup']; }
|
$displaygroup = usergroup_displaygroup($post['displaygroup']); if(is_array($displaygroup)) {
| $displaygroup = usergroup_displaygroup($post['displaygroup']); if(is_array($displaygroup)) {
|
Zeile 334 | 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 360 | 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 398 | Zeile 404 |
---|
{ eval("\$post['button_warn'] = \"".$templates->get("postbit_warn")."\";"); $warning_link = "warnings.php?uid={$post['uid']}";
|
{ eval("\$post['button_warn'] = \"".$templates->get("postbit_warn")."\";"); $warning_link = "warnings.php?uid={$post['uid']}";
|
} else {
| } else {
|
$post['button_warn'] = ''; $warning_link = "usercp.php"; }
| $post['button_warn'] = ''; $warning_link = "usercp.php"; }
|
Zeile 673 | 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 809 | Zeile 826 |
---|
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 836 | Zeile 853 |
---|
$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 846 | 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 1014 | 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);
|
}
| }
|