diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2007-06-11 12:39:51 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2007-06-11 12:39:51 +0000 |
commit | 0d074672fa8209c85af75ef7d7cdfbaf8e16cbab (patch) | |
tree | c8628246d3131dbf338fe9702edcb73712432dcc /phpBB/includes/acp | |
parent | 13a02f6cc5bcdb0654642135b2981633ac3996b5 (diff) | |
download | forums-0d074672fa8209c85af75ef7d7cdfbaf8e16cbab.tar forums-0d074672fa8209c85af75ef7d7cdfbaf8e16cbab.tar.gz forums-0d074672fa8209c85af75ef7d7cdfbaf8e16cbab.tar.bz2 forums-0d074672fa8209c85af75ef7d7cdfbaf8e16cbab.tar.xz forums-0d074672fa8209c85af75ef7d7cdfbaf8e16cbab.zip |
Introducing the ability to manually set the dimensions of an image in the imageset editor.
A little spelling.
Introduces new language variable(s).
#11925
#11675
git-svn-id: file:///svn/phpbb/trunk@7750 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index cc3a54ad04..5f3aa024fc 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -1209,7 +1209,8 @@ parse_css_file = {PARSE_CSS_FILE} $imgpath = request_var('imgpath', ''); $imgsize = request_var('imgsize', false); $imgwidth = request_var('imgwidth', 0); - + $imgheight = request_var('imgheight', 0); + $imgname = preg_replace('#[^a-z0-9\-+_]#i', '', $imgname); $imgpath = str_replace('..', '.', $imgpath); @@ -1269,7 +1270,8 @@ parse_css_file = {PARSE_CSS_FILE} { // If imgwidth and imgheight are non-zero grab the actual size // from the image itself ... we ignore width settings for the poll center image - $imgwidth = $imgheight = 0; + $imgwidth = request_var('imgwidth', 0); + $imgheight = request_var('imgheight', 0); $imglang = ''; if ($imgpath && !file_exists("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath")) @@ -1279,10 +1281,16 @@ parse_css_file = {PARSE_CSS_FILE} if ($imgsize && $imgpath) { - list($imgwidth, $imgheight) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"); + if (!$imgwidth || !$imgheight) + { + list($imgwidth_file, $imgheight_file) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"); + $imgwidth = ($imgwidth) ? $imgwidth : $imgwidth_file; + $imgheight = ($imgheight) ? $imgheight : $imgheight_file; + } $imgwidth = ($imgname != 'poll_center') ? (int) $imgwidth : 0; $imgheight = (int) $imgheight; - } + } + if (strpos($imgpath, '/') !== false) { @@ -1442,7 +1450,8 @@ parse_css_file = {PARSE_CSS_FILE} 'L_TITLE' => $user->lang[$this->page_title], 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'], 'IMAGE_OPTIONS' => $img_options, - 'IMAGE_SIZE' => $imgsize_bool, + 'IMAGE_SIZE' => $image_width, + 'IMAGE_HEIGHT' => $image_height, 'IMAGE_REQUEST' => $image_request, 'U_ACTION' => $this->u_action . "&action=edit&id=$imageset_id", 'U_BACK' => $this->u_action, |