Galerie Content

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Buster
Posts: 50
Joined: Sat 9. Oct 2004, 12:16

Galerie Content

Post by Buster »

hallo,

ich würde gern die bildergalerie nutzen, allerdings bit es da ein problem mit der gleichzeitigen anzeige von quer- und hochformat bildern. es sieht einfach unsauber aus wenn das erste bild kleiner ist als das zweite und so weiter ...

nun habe ich mir überlegt, um es optisch etwas aufgeräumter aussehen zu lassen, mache ich doch um jedes bild einen rahmen mit hintergrundfarbe und sagen wir mal fester grösse von 140x140 ... nun meine frage, wie bekomme ich den hinter jedes bild ?
ich weiss zwar in welcher datei, aber leider nicht ... wie ;)

Code: Select all

<?php
/*************************************************************************************
   Copyright notice
   
   (c) 2002-2004 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
 
   This script is part of PHPWCMS. The PHPWCMS web content management system is
   free software; you can redistribute it and/or modify it under the terms of
   the GNU General Public License as published by the Free Software Foundation;
   either version 2 of the License, or (at your option) any later version.
  
   The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
   A copy is found in the textfile GPL.txt and important notices to the license 
   from the author is found in LICENSE.txt distributed with these scripts.
  
   This script is distributed in the hope that it will be useful, but WITHOUT ANY 
   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
   This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/

//images (gallery)

$image = ($crow["acontent_image"])? explode("\n", $crow["acontent_image"]) : "" ;
									if(sizeof($image) && $image) {
										$pic = "";
										//Nochmal Prüfen auf leere Werte oder Dopplungen und Zuweisen der einzelnen Werte
										foreach($image as $key => $value) {
											if(trim($value)) {
												$ival  = explode(":", $value); //Aufsplitten des Bildwertes
												$iinfo = getimagesize(PHPWCMS_ROOT."/".$phpwcms["content_path"].$phpwcms["cimage_path"].$ival[8]); //Bildexistenz prüfen
												if($iinfo) { //Wenn korrekte Bildinformationen vorhanden
													//Werte zuweisen
													unset($image[$key]);
													$image[$key]["w"]	 = $iinfo[0];	//Breite
													$image[$key]["h"]	 = $iinfo[1];	//Höhe
													$image[$key]["pos"]  = $ipos = $ival[5];		//Bildtabellen-Position
													$image[$key]["s"]	 = $ival[6];		//Abstand zwischen Bildern
													$image[$key]["col"]	 = $ival[7];		//Anzahl Bildspalten
													$image[$key]["pic"]	 = $phpwcms["content_path"].$phpwcms["cimage_path"].$ival[8]; //Bildname für Anzeige 
													$image[$key]["cap"]	 = $ival[9];		//Bildunterschrift
													$image[$key]["wxh"]	 = $iinfo[3];	//width=XXX height=XXX
													$image[$key]["zoom"] = $ival[10];	//is zoom clickable
													if($ival[10]) {
														$zinfo = getimagesize(PHPWCMS_ROOT."/".$phpwcms["file_tmp"].$phpwcms["dir_preview"].$ival[2]);
														$image[$key]["zoomimage"]	= base64_encode($ival[2]);
														$image[$key]["zoomw"]		= $zinfo[0];
														$image[$key]["zoomh"]		= $zinfo[1];
													}
												} else {
													unset($image[$key]);
												}
											} else {
												unset($image[$key]);
											}
										}
											switch(intval($ipos)) {			
														//oben links
												case 0: $content["main"] .= imagelisttable($image, "0:5:0:0", "");
														$content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														break;
														//oben mitte									
												case 1:	$content["main"] .= imagelisttable($image, "0:5:0:0", "center"); 
														$content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														break;
														//oben rechts
												case 2:	$content["main"] .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr><td align=\"right\">";
														$content["main"] .= imagelisttable($image, "10:10:10:10", "", $template_default["article"]["image"]);
														$content["main"] .= "</td></tr>\n</table>\n";
														$content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														break;
														//unten links
												case 3: $content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														$content["main"] .= ($crow["acontent_text"]) ? "<br />".$crow["acontent_text"] : "";
														$content["main"] .= imagelisttable($image, "5:0:0:0", "");
														break;
														//unten mitte
												case 4: $content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														$content["main"] .= ($crow["acontent_text"]) ? "<br />".$crow["acontent_text"] : "";
														$content["main"] .= imagelisttable($image, "5:0:0:0", "center");
														break;
														//unten rechts
												case 5: $content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														$content["main"] .= ($crow["acontent_text"]) ? "<br />".$crow["acontent_text"] : "";
														$content["main"] .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr><td align=\"right\">";
														$content["main"] .= imagelisttable($image, "5:0:0:0", "");
														$content["main"] .= "</td></tr>\n</table>\n";
														break;
														//im Text links
												case 6:	$content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														$content["main"] .= imagelisttable($image, "0:0:0:8", "left");
														break;
														//im Text rechts
												case 7: $content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
														$content["main"] .= imagelisttable($image, "0:0:10:0", "right");
														break;
											}
									} else {
										$content["main"] .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
									}
									
?>
änderung bei "oben mitte" würden ja schon ausreichen ...

danke für eure hilfe im voraus

buster
Post Reply