diff options
author | Ermal Luçi <eri@pfsense.org> | 2013-07-25 23:55:37 -0700 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2013-07-25 23:55:37 -0700 |
commit | 6226d837d98ee2e40a4096e224c85b6b986c1ec0 (patch) | |
tree | 04143699a462e98f7e166bc25f4caa2753a130b8 | |
parent | 620a0292bdab0bfce1a2771a48ad4c74d0ea75d5 (diff) | |
parent | 28d3ac147100b3de776a5d3e97f1168599f94439 (diff) | |
download | pfsense-6226d837d98ee2e40a4096e224c85b6b986c1ec0.zip pfsense-6226d837d98ee2e40a4096e224c85b6b986c1ec0.tar.gz |
Merge pull request #732 from CharlieMarshall/pictureFix
Improve picture widget size/proportion and stop border overlapping widget size
-rw-r--r-- | usr/local/www/widgets/widgets/picture.widget.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr/local/www/widgets/widgets/picture.widget.php b/usr/local/www/widgets/widgets/picture.widget.php index 144202c..cb71b50 100644 --- a/usr/local/www/widgets/widgets/picture.widget.php +++ b/usr/local/www/widgets/widgets/picture.widget.php @@ -35,7 +35,7 @@ require_once("functions.inc"); if($_GET['getpic']=="true") { $pic_type_s = explode(".", $config['widgets']['picturewidget_filename']); $pic_type = $pic_type_s[1]; - if($config['widgets']['picturewidget']) + if($config['widgets']['picturewidget']) $data = base64_decode($config['widgets']['picturewidget']); header("Content-Disposition: inline; filename=\"{$config['widgets']['picturewidget_filename']}\""); header("Content-Type: image/{$pic_type}"); @@ -47,7 +47,7 @@ if($_GET['getpic']=="true") { if($_POST) { if (is_uploaded_file($_FILES['pictfile']['tmp_name'])) { /* read the file contents */ - $fd_pic = fopen($_FILES['pictfile']['tmp_name'], "rb"); + $fd_pic = fopen($_FILES['pictfile']['tmp_name'], "rb"); while ( ($buf=fread( $fd_pic, 8192 )) != '' ) { // Here, $buf is guaranted to contain data $data .= $buf; @@ -74,16 +74,15 @@ if($_POST) { <div id="picture-settings" class="widgetconfigdiv" style="display:none;"> <form action="/widgets/widgets/picture.widget.php" method="post" name="iforma" enctype="multipart/form-data"> <input name="pictfile" type="file" class="formbtn" id="pictfile" size="20" /> - <input id="submita" name="submita" type="submit" class="formbtn" value="Upload" /><br/> - <b>NOTE:</b> Best image size is 350x350 or smaller. + <input id="submita" name="submita" type="submit" class="formbtn" value="Upload" /> </form> </div> <div id="picture-widgets" style="padding: 5px"> <a href='/widgets/widgets/picture.widget.php?getpic=true' target='_blank'> - <img border="0" width="350" height="350" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" /> + <img border="0" width="100%" height="100%" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" /> </a> -</div> +</div> <!-- needed to show the settings widget icon --> <script type="text/javascript"> |