1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-28 10:20:45 +02:00

Forum: "Maximum width of uploaded image" setting is now respected. When set to 0 the size is determined by the forum/theme template.

This commit is contained in:
Cameron
2016-03-24 17:44:03 -07:00
parent 6ab9f32f07
commit 36cabf1330
3 changed files with 11 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ define("FORLAN_131", "to set max file size, allowed types etc");
define("FORLAN_132", "Emphasize Sticky Threads");
define("FORLAN_133", "Give extra emphasis to sticky threads (separate thread sections and headers)");
define("FORLAN_134", "Maximum width of uploaded image");
define("FORLAN_135", "Leave blank to disable auto resizing of images");
define("FORLAN_135", "Leave blank to let the theme template decide.");
define("FORLAN_136", "Create link to full size image");
define("FORLAN_137", "Enabling this will resize larger images and also create a link to the original full size image. If disabled, original image will be discarded");
define("FORLAN_138", "Prune these forums");

View File

@@ -11,12 +11,15 @@ if (!defined('e107_INIT')) { exit; }
class plugin_forum_view_shortcodes extends e_shortcode
{
protected $e107;
protected $defaultImgAttachSize = false;
function __construct()
{
parent::__construct();
$this->e107 = e107::getInstance();
$this->forum = new e107forum();
$this->defaultImgAttachSize = e107::pref('forum','maxwidth',false); // don't resize here if set to 0.
}
function sc_top($parm='')
@@ -105,6 +108,12 @@ class plugin_forum_view_shortcodes extends e_shortcode
$txt = '';
$attachArray = e107::unserialize($this->postInfo['post_attachments']);
if(!empty($this->defaultImgAttachSize))
{
$tp->thumbWidth($this->defaultImgAttachSize); // set the attachment size.
}
//print_a($attachArray);
foreach($attachArray as $type=>$vals)

View File

@@ -331,7 +331,7 @@ $FORUM_VIEWTOPIC_TEMPLATE['thread'] = "
<li id='post-{POSTID}' class='forum-viewtopic-post'>
<div class='hidden-xs row row-fluid btn-navbar navbar-btn'>
{SETIMAGE: w=100&h=0&crop=0}
<div class='col-xs-2 span2 left text-left'>
<div class='row'>
<div class='col-xs-12 col-md-12 forum-user-combo'>{USERCOMBO}<br />{CUSTOMTITLE}</div>