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(!$post['displaygroup']) { $post['displaygroup'] = $post['usergroup'];
|
}
|
}
|
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 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 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 699 | Zeile 709 |
---|
if($show_ips == "show") { eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";");
|
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';
|
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 738 | Zeile 752 |
---|
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) {
| if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0) {
|
Zeile 763 | Zeile 777 |
---|
if($mybb->settings['enableattachments'] != 0) { get_post_attachments($id, $post);
|
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
| 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
|
Zeile 801 | Zeile 815 |
---|
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 842 |
---|
$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 852 |
---|
$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 1006 | Zeile 1028 |
---|
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);
|
}
| }
|