Modul Illustration und Flash
Modul Illustration und Flash
Hallo!
Erstmal muss ich sagen, das Contenido ein echt tolles System ist. Unglaublich. Danke sehr.
Nun, ich habe für mich eine Mini-Seite in Contenido gebastelt. Alles gut hingehauen, nun möchte ich aber im Modul "Illustration" einen Flash-Film einbauen. Bekomm es aber einfach nicht gebacken.
Ich hab schon die Datei-Endung swf hinzugefügt, trotzdem spielt er das Flash nicht ab.
Hier Input:
[code]?><?php
/***********************************************
* CONTENIDO MODUL - INPUT
*
* 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]";
if ($cms_dirname == '' || $cms_dirname == '0') {
$cms_dirname = 'bilder/';
}
#Get paths
$sql = "SELECT
htmlpath, frontendpath
FROM
".$cfg["tab"]["clients"]."
WHERE
idclient = ".$client." ";
$db->query($sql);
if ($db->next_record()) {
$htmlpath = $db->f('htmlpath');
$frontendpath = $db->f('frontendpath');
}
#Choose image folder
echo '<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="text_medium" style="padding:5px">'.mi18n("Das Bild soll folgende Größe haben: 168 x 450 px").'</td></tr>
<tr><td class="text_medium" style="padding:5px">'.mi18n("Bildverzeichnis wählen").': </td></tr>
<tr><td class="text_medium" style="padding:5px">';
echo '<select name="CMS_VAR[1]" style="width:200px">';
#Get upload directories
$sql = "SELECT DISTINCT
dirname
FROM
".$cfg["tab"]["upl"]."
WHERE
idclient='$client' AND
filetype IN ('jpeg','jpg','gif','png','swf')
ORDER BY
dirname";
$db->query($sql);
$selected = false;
while ($db->next_record()) {
$dirname = $db->f('dirname');
if ($cms_dirname != $dirname) {
echo '<option value="'.$dirname.'"> '.$dirname.'</option>';
} else {
$selected = true;
echo '<option value="'.$dirname.'" selected="selected"> '.$dirname.'</option>';
}
}
if (!$selected) {
echo '<option value="0" selected="selected">'.i18n("Bitte wählen").'</option>';
} else {
echo '<option value="0">'.i18n("Bitte wählen").'</option>';
}
#Choose image file
echo '</select> <input type="image" src="images/submit.gif">
<tr><td class="text_medium" style="padding:5px">'.mi18n("Bild wählen").': </td></tr>
<tr><td class="text_medium" style="padding:5px">';
echo '<select name="CMS_VAR[2]" style="width:200px">';
echo '<option value="0" selected="selected">'.i18n("Bitte wählen").'</option>';
if ($cms_dirname != '0') {
#Get uploaded files
$sql = "SELECT
filename
FROM
".$cfg["tab"]["upl"]."
WHERE
idclient = '$client' AND
filetype IN ('jpeg','jpg','gif','png','swf') AND
dirname = '$cms_dirname'
ORDER BY
filename";
$db->query($sql);
while ($db->next_record()) {
$img_name = $db->f('filename');
if ($cms_filename != $img_name) {
echo '<option value="'.$img_name.'"> '.$img_name.'</option>';
} else {
echo '<option selected="selected" value="'.$img_name.'"> '.$img_name.'</option>';
}
}
}
echo '</select> <input type="image" src="images/submit.gif">';
#Preview image
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_split = preg_split("/\./", $cms_filename);
$count = count($img_split);
$type = $img_split[$count -1];
echo '<tr><td colspan="2" style="padding:5px">
<img src="'.$img_path.'">
</td></tr> ';
}
echo '</td></tr>';
echo '</table>';
?><?php[/code]
Hier der Output:
[code]<?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 settings
$img_width = 168;
$img_height = 450;
$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 '<img src="'.$image.'" width="'.$width.'" height="'.$height.'" alt="'.mi18n("Philkan").'" title="'.mi18n("Philkan").'"/>';
?>[/code]
Wäre toll wenn mir jemand einen Lösungsansatz sagen könnte. Danke!
Erstmal muss ich sagen, das Contenido ein echt tolles System ist. Unglaublich. Danke sehr.
Nun, ich habe für mich eine Mini-Seite in Contenido gebastelt. Alles gut hingehauen, nun möchte ich aber im Modul "Illustration" einen Flash-Film einbauen. Bekomm es aber einfach nicht gebacken.
Ich hab schon die Datei-Endung swf hinzugefügt, trotzdem spielt er das Flash nicht ab.
Hier Input:
[code]?><?php
/***********************************************
* CONTENIDO MODUL - INPUT
*
* 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]";
if ($cms_dirname == '' || $cms_dirname == '0') {
$cms_dirname = 'bilder/';
}
#Get paths
$sql = "SELECT
htmlpath, frontendpath
FROM
".$cfg["tab"]["clients"]."
WHERE
idclient = ".$client." ";
$db->query($sql);
if ($db->next_record()) {
$htmlpath = $db->f('htmlpath');
$frontendpath = $db->f('frontendpath');
}
#Choose image folder
echo '<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="text_medium" style="padding:5px">'.mi18n("Das Bild soll folgende Größe haben: 168 x 450 px").'</td></tr>
<tr><td class="text_medium" style="padding:5px">'.mi18n("Bildverzeichnis wählen").': </td></tr>
<tr><td class="text_medium" style="padding:5px">';
echo '<select name="CMS_VAR[1]" style="width:200px">';
#Get upload directories
$sql = "SELECT DISTINCT
dirname
FROM
".$cfg["tab"]["upl"]."
WHERE
idclient='$client' AND
filetype IN ('jpeg','jpg','gif','png','swf')
ORDER BY
dirname";
$db->query($sql);
$selected = false;
while ($db->next_record()) {
$dirname = $db->f('dirname');
if ($cms_dirname != $dirname) {
echo '<option value="'.$dirname.'"> '.$dirname.'</option>';
} else {
$selected = true;
echo '<option value="'.$dirname.'" selected="selected"> '.$dirname.'</option>';
}
}
if (!$selected) {
echo '<option value="0" selected="selected">'.i18n("Bitte wählen").'</option>';
} else {
echo '<option value="0">'.i18n("Bitte wählen").'</option>';
}
#Choose image file
echo '</select> <input type="image" src="images/submit.gif">
<tr><td class="text_medium" style="padding:5px">'.mi18n("Bild wählen").': </td></tr>
<tr><td class="text_medium" style="padding:5px">';
echo '<select name="CMS_VAR[2]" style="width:200px">';
echo '<option value="0" selected="selected">'.i18n("Bitte wählen").'</option>';
if ($cms_dirname != '0') {
#Get uploaded files
$sql = "SELECT
filename
FROM
".$cfg["tab"]["upl"]."
WHERE
idclient = '$client' AND
filetype IN ('jpeg','jpg','gif','png','swf') AND
dirname = '$cms_dirname'
ORDER BY
filename";
$db->query($sql);
while ($db->next_record()) {
$img_name = $db->f('filename');
if ($cms_filename != $img_name) {
echo '<option value="'.$img_name.'"> '.$img_name.'</option>';
} else {
echo '<option selected="selected" value="'.$img_name.'"> '.$img_name.'</option>';
}
}
}
echo '</select> <input type="image" src="images/submit.gif">';
#Preview image
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_split = preg_split("/\./", $cms_filename);
$count = count($img_split);
$type = $img_split[$count -1];
echo '<tr><td colspan="2" style="padding:5px">
<img src="'.$img_path.'">
</td></tr> ';
}
echo '</td></tr>';
echo '</table>';
?><?php[/code]
Hier der Output:
[code]<?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 settings
$img_width = 168;
$img_height = 450;
$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 '<img src="'.$image.'" width="'.$width.'" height="'.$height.'" alt="'.mi18n("Philkan").'" title="'.mi18n("Philkan").'"/>';
?>[/code]
Wäre toll wenn mir jemand einen Lösungsansatz sagen könnte. Danke!
Hallo,
da habe ich folgendes für dich:
Modul Flash mit ID-Übergabe Oberverzeichnis
Input leer
Output:
Pfade musst du natürlich anpassen.
Mit der ID-Übergabe steuere ich den eingebundenen Flashfilm.
Zu sehen unter: http://www.centiv.de
Gruß
Thomas
da habe ich folgendes für dich:
Modul Flash mit ID-Übergabe Oberverzeichnis
Input leer
Output:
Code: Alles auswählen
<?php
cInclude('includes', 'functions.api.category.php');
$ober = capi_cat_getlevelnode($idcat, 2);
echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="475" height="249" title="header">
<param name="movie" value="upload/flash/header2.swf?los=1&idcat='.$ober.'" />
<param name="wmode" value="transparent">
<param name="quality" value="best" />
<embed src="upload/flash/header2.swf?los=1&idcat='.$ober.'" wmode="transparent" quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="475" height="249"></embed>
</object>';
?>
Mit der ID-Übergabe steuere ich den eingebundenen Flashfilm.
Zu sehen unter: http://www.centiv.de
Gruß
Thomas
Es gibt in Contenido auch einen Extra Inhaltstypen für Flash.
Ein neues Modul erstellen mit dem Output:
Modul statt der Illustration in das Template. Fertig.
Zu deinem ursprünglichen Ansatz kann ich nur sagen, dass man Flash nicht über ein <img /> Tag einbinden kann.
Was silicone da schreibt ist natürlich auch nett, wenn Du die ID in Flash verwenden willst, ist aber unflexibel, wenn man verschiedene Flash-Dateien hat.
Ein neues Modul erstellen mit dem Output:
Code: Alles auswählen
CMS_SWF[1]
Zu deinem ursprünglichen Ansatz kann ich nur sagen, dass man Flash nicht über ein <img /> Tag einbinden kann.
Was silicone da schreibt ist natürlich auch nett, wenn Du die ID in Flash verwenden willst, ist aber unflexibel, wenn man verschiedene Flash-Dateien hat.
-
- Beiträge: 87
- Registriert: Fr 20. Aug 2004, 17:36
- Wohnort: Stelle
- Kontaktdaten:
-
- Beiträge: 87
- Registriert: Fr 20. Aug 2004, 17:36
- Wohnort: Stelle
- Kontaktdaten:
Fehler von mir...
Alles zurück, ich tu doof sein:-)
Wenn noch kein Flashfilm im System vorhanden ist, kann es auch keinen finden. Also Modul geht nur man sollte schon vorher ein .sfw uploaden.
Autsch.
Wenn noch kein Flashfilm im System vorhanden ist, kann es auch keinen finden. Also Modul geht nur man sollte schon vorher ein .sfw uploaden.
Autsch.
... warum eigentlich nicht?