Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: functions_post.php 2165 2006-08-30 06:24:52Z chris $
| * $Id: functions_post.php 3531 2007-12-02 01:21:43Z chris $
|
*/
/**
| */
/**
|
Zeile 79 | Zeile 79 |
---|
$parser_options['allow_mycode'] = $forum['allowmycode']; $parser_options['allow_smilies'] = $forum['allowsmilies']; $parser_options['allow_imgcode'] = $forum['allowimgcode'];
|
$parser_options['allow_mycode'] = $forum['allowmycode']; $parser_options['allow_smilies'] = $forum['allowsmilies']; $parser_options['allow_imgcode'] = $forum['allowimgcode'];
|
| if(!$post['username']) { $post['username'] = $lang->guest; }
|
if($post['userusername']) { $parser_options['me_username'] = $post['userusername'];
| if($post['userusername']) { $parser_options['me_username'] = $post['userusername'];
|
Zeile 288 | Zeile 292 |
---|
if($usergroup['usertitle']) { $post['usertitle'] = $usergroup['usertitle'];
|
if($usergroup['usertitle']) { $post['usertitle'] = $usergroup['usertitle'];
|
} else
| } else
|
{ $post['usertitle'] = $lang->guest; }
| { $post['usertitle'] = $lang->guest; }
|
Zeile 314 | Zeile 318 |
---|
$post['button_report'] = ''; if(!$post_type) {
|
$post['button_report'] = ''; if(!$post_type) {
|
if($post['edituid'] != "" && $post['edittime'] != "" && $post['editusername'] != "")
| // Figure out if we need to show an "edited by" message if($post['edituid'] != 0 && $post['edittime'] != 0 && $post['editusername'] != "" && ($mybb->settings['showeditedby'] != "no" && $usergroup['cancp'] == "no" || $mybb->settings['showeditbyadmin'] != "no" && $usergroup['cancp'] == "yes"))
|
{ $post['editdate'] = my_date($mybb->settings['dateformat'], $post['edittime']); $post['edittime'] = my_date($mybb->settings['timeformat'], $post['edittime']);
| { $post['editdate'] = my_date($mybb->settings['dateformat'], $post['edittime']); $post['edittime'] = my_date($mybb->settings['timeformat'], $post['edittime']);
|
Zeile 395 | Zeile 400 |
---|
} } else
|
} } else
|
{
| {
|
$post['iplogged'] = ""; }
| $post['iplogged'] = ""; }
|
Zeile 430 | Zeile 435 |
---|
if($post['icon'] > 0 && $icon_cache[$post['icon']]) { $icon = $icon_cache[$post['icon']];
|
if($post['icon'] > 0 && $icon_cache[$post['icon']]) { $icon = $icon_cache[$post['icon']];
|
$post['icon'] = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\"> ";
| $post['icon'] = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" /> ";
|
} else {
| } else {
|
Zeile 469 | Zeile 474 |
---|
global $attachcache, $mybb, $theme, $templates, $forumpermissions, $lang;
$validationcount = 0;
|
global $attachcache, $mybb, $theme, $templates, $forumpermissions, $lang;
$validationcount = 0;
|
| $tcount = 0;
|
if(is_array($attachcache[$id])) { // This post has 1 or more attachments foreach($attachcache[$id] as $aid => $attachment) { if($attachment['visible']) { // There is an attachment thats visible!
|
if(is_array($attachcache[$id])) { // This post has 1 or more attachments foreach($attachcache[$id] as $aid => $attachment) { if($attachment['visible']) { // There is an attachment thats visible!
|
$attachment['name'] = htmlspecialchars_uni($attachment['name']);
| $attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
|
$attachment['filesize'] = get_friendly_size($attachment['filesize']); $ext = get_extension($attachment['filename']); if($ext == "jpeg" || $ext == "gif" || $ext == "bmp" || $ext == "png" || $ext == "jpg")
| $attachment['filesize'] = get_friendly_size($attachment['filesize']); $ext = get_extension($attachment['filename']); if($ext == "jpeg" || $ext == "gif" || $ext == "bmp" || $ext == "png" || $ext == "jpg")
|
Zeile 490 | Zeile 496 |
---|
// 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) {
|
if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != "") { // We have a thumbnail to show (and its not the "SMALL" enough image
| // Show as thumbnail IF image is big && thumbnail exists && setting=='yes' // Show as full size image IF setting=='no' || (image is small && permissions allow) // Show as download for all other cases if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != "" && $mybb->settings['attachthumbnails'] == 'yes') {
|
eval("\$attbit = \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";");
|
eval("\$attbit = \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";");
|
} elseif($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == "yes")
| } elseif((($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == "yes") || $mybb->settings['attachthumbnails'] == 'no') && $isimage)
|
{
|
{
|
// Image is small enough to show - no thumbnail
| |
eval("\$attbit = \"".$templates->get("postbit_attachments_images_image")."\";");
|
eval("\$attbit = \"".$templates->get("postbit_attachments_images_image")."\";");
|
}
| }
|
else
|
else
|
{ // Show standard link to attachment
| {
|
eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";"); } $post['message'] = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $post['message']); } else {
|
eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";"); } $post['message'] = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $post['message']); } else {
|
if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != "") { // We have a thumbnail to show
| // Show as thumbnail IF image is big && thumbnail exists && setting=='thumb' // Show as full size image IF setting=='fullsize' || (image is small && permissions allow) // Show as download for all other cases if($attachment['thumbnail'] != "SMALL" && $attachment['thumbnail'] != "" && $mybb->settings['attachthumbnails'] == 'yes') {
|
eval("\$post['thumblist'] .= \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";"); if($tcount == 5) {
| eval("\$post['thumblist'] .= \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";"); if($tcount == 5) {
|
Zeile 518 | Zeile 528 |
---|
} $tcount++; }
|
} $tcount++; }
|
elseif($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == "yes")
| elseif((($attachment['thumbnail'] == "SMALL" && $forumpermissions['candlattachments'] == "yes") || $mybb->settings['attachthumbnails'] == 'no') && $isimage)
|
{
|
{
|
// Image is small enough to show - no thumbnail
| |
eval("\$post['imagelist'] .= \"".$templates->get("postbit_attachments_images_image")."\";"); } else
| eval("\$post['imagelist'] .= \"".$templates->get("postbit_attachments_images_image")."\";"); } else
|