Seite 1 von 1

Illustration mit standard Link

Verfasst: So 19. Feb 2006, 23:04
von frogli
hallo leute

gibt es eine schnelle möglichkeit das Illustrationsmodul zu ändert so das es ein hyperlink auch standardmässig eingestellt hat?

danke.

frogli

Verfasst: Di 21. Feb 2006, 00:17
von aw029
was willst du den genau machen ?

Das Bild verlinken oder ein anderes JPG als Standardbild auswählen ?

Verfasst: Di 21. Feb 2006, 15:05
von rezeptionist

Code: Alles auswählen

<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname   :     Illustration
* Author(s)   :     Andreas Lindner, 4fb
* Copyright   :     Contenido - four for business, Andreas Lindner
* Created     :     12.08.2005
************************************************/

#Selected img directory
$cms_dirname = "CMS_VALUE[1]";
#Selected img
$cms_filename = "CMS_VALUE[2]";
#Default Link
$yourlink = "www.rezeptionist.de";



#Default settings
$img_width = 170;
$img_height = 80;
$defaultImage = 'bilder/illu.jpg';

$htmlpath = $cfgClient[$client]['path']['htmlpath'];
$frontendpath = $cfgClient[$client]['path']['frontend'];

$img_path = $htmlpath.$cfgClient[$client]['upload'].$defaultImage;
$img_path_fs = $frontendpath.$cfgClient[$client]['upload'].$defaultImage;

#Check configured images
if ($cms_dirname != '0' AND $cms_filename != '0' AND strlen($cms_dirname) > 0 AND strlen($cms_filename) > 0) {
	$img_path = $htmlpath.$cfgClient[$client]['upload'].$cms_dirname.$cms_filename;
	$img_path_fs = $frontendpath.$cfgClient[$client]['upload'].$cms_dirname.$cms_filename;

	$img_split = preg_split("/\./", $cms_filename);
	$count = count($img_split);
	$type = $img_split[$count -1];

	if (!file_exists($img_path_fs)) {
		$img_path = $htmlpath.$cfgClient[$client]['upload'].$defaultImage;
		$img_path_fs = $frontendpath.$cfgClient[$client]['upload'].$defaultImage;
	}
}

#Scale image
$image = capiImgScale($img_path_fs, $img_width, $img_height, false, false, 10, false);

#Get dimensions of scaled image
list ($width, $height, $type, $attr) = getimagesize($image);

#Output image tag
echo '<a href="'.$yourlink.'" ><img src="'.$image.'" width="'.$width.'" height="'.$height.'" alt="'.mi18n("Illustration").'" title="'.mi18n("Illustration").'"/></a>';
?>
könnte so aussehen, wobei man auch noch den lionk über das Backend steuern könnte.

Verfasst: Fr 29. Sep 2006, 15:07
von Deddy
Hallo!

Genau sowas habe ich gesucht, nur dass ich eben den Link über das Backend steuern kann. Ich hab da leider keinen Plan wie ich das anstelle.
Hätte dazu vielleicht jemand eine Lösung? :)

Gruß Deddy

Verfasst: Fr 29. Sep 2006, 16:37
von HerrB
Handbuch lesen, Beispiel-Module ansehen und rausbekommen, wie das mit dem CMS_VAR/CMS_VALUE so funktioniert.

Es sei erwähnt, dass diese Lösung Template-abhängig ist, d.h. man kann einen Link nur für Kategorien festlegen oder Artikel, die selbst über ein Template verfügen.

Das Modul Illustration ist nicht für Illustrationen/Links geeignet, die auf jeder Seite anders sein sollen (dazu verwendet man Bild-Module).

Gruß
HerrB