From 0eb5ddf9beede4062eaa32972e7e1a7fa1694346 Mon Sep 17 00:00:00 2001
From: Patrick Seeger <pseeger@ccwn.org>
Date: Tue, 25 Jun 2013 15:48:15 +0200
Subject: Verbesserungen upload

---
 .settings/org.eclipse.core.resources.prefs       | 6 +++---
 protected/extensions/SimpleImage/SimpleImage.php | 9 +++++++--
 protected/views/verein/_form.php                 | 4 ++++
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
index f79c35c..43df975 100644
--- a/.settings/org.eclipse.core.resources.prefs
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,3 @@
-#Fri Apr 13 11:27:54 CEST 2012
-eclipse.preferences.version=1
-encoding//protected/views/verein/view.php=UTF-8
+eclipse.preferences.version=1
+encoding//protected/views/verein/_form.php=UTF-8
+encoding//protected/views/verein/view.php=UTF-8
diff --git a/protected/extensions/SimpleImage/SimpleImage.php b/protected/extensions/SimpleImage/SimpleImage.php
index 54c4ef8..9f97a57 100644
--- a/protected/extensions/SimpleImage/SimpleImage.php
+++ b/protected/extensions/SimpleImage/SimpleImage.php
@@ -149,11 +149,16 @@ class SimpleImage {
     }
     
     function blend($width, $height) {
-   		$this->resizeToWidth($width);
+    	if($width < $this->getWidth()) {
+   			$this->resizeToWidth($width);
+    	}
+    	if($height > $this->getHeight()) {
+    		$height = $this->getHeight();
+    	}
     	$new_image = imagecreatetruecolor($width, $height);
     	imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $width, $height);
     	imagealphablending($new_image,true);
-    	imagefilledrectangle($new_image, 0, 0,  $width, $height, imagecolorallocatealpha($new_image, 255, 255, 255, 30));
+    	imagefilledrectangle($new_image, 0, 0,  $width, $height, imagecolorallocatealpha($new_image, 255, 255, 255, 25));
     	$this->image = $new_image;
     	
     }
diff --git a/protected/views/verein/_form.php b/protected/views/verein/_form.php
index 6de5d5c..c51b922 100644
--- a/protected/views/verein/_form.php
+++ b/protected/views/verein/_form.php
@@ -105,6 +105,10 @@
 		<?php echo $form->error($model,'standort_id'); ?>
 	</div>
 	<div class="row">
+		<p>Dieses Bild wird auf der Vereinsübersicht und in der Suche als Hintergrund genutzt. 
+		Dabei sollte es länglich sein und eine Breite von 850 Pixeln haben.
+		Das Bild wird von oben her genutzt und mit einem halbtransparenten Weißton überlagert.
+		</p>
 		<?php echo $form->labelEx($model,'hintergrund'); ?>
 		<?php echo CHtml::image($model->hintergrund,'height="80"'); ?><br/>
 		<?php echo $form->fileField($model,'uploadedHintergrund', array('size'=>60)); ?>
-- 
cgit v1.0-28-g1787

