hier ein Modul für alle die Videos in Ihre Webseite einbauen wollen die im
platzsparenden DivX Format vorliegen.
DivX Webplayer für Contenido 4.8.x und 4.6.24
Die Ausgabe erfolgt XHTML 1.0 Stict Valide
Demo und Modul gibts mit XML und Readme hier zum Download.
http://www.nebelweb.de/de/contenido-module/
Einzige Voraussetzung ist der installierte DivX Webplayer.
Einfach das Modul importieren, in der Konfiguration das Video & Thumbnail auswählenModulbeschreibung:Modul Input:Code: Alles auswählen
Mit diesem Modul lassen sich .divx Videos XHTML 1.0 Strict valide (!) in die Website einbinden. Als Basis haben mir das Modul Flash Video Player von Phillip Baumgaertner (www.ittool.de) und der DivX-Webplayer (www.divx.com/divx/webplayer/)gedient. Autor: Sebastian Nebel (www.nebelweb.de) Version: 1.1.1 Erstellt: 30.09.2007 Letzte Änderung: 03.11.2008
Modul Output:Code: Alles auswählen
?><?php #Selected img directory $cms_dirname = "CMS_VALUE[1]"; #Selected img $cms_filename = "CMS_VALUE[2]"; if ($cms_dirname == '' || $cms_dirname == '0') { $cms_dirname = 'videos/'; } #Selected thumb directory $cms_dirname_thumb = "CMS_VALUE[3]"; #Selected img $cms_filename_thumb = "CMS_VALUE[4]"; if ($cms_dirname_thumb == '' || $cms_dirname_thumb == '0') { $cms_dirname_thumb = 'videos/thumbs/'; } #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 Video folder echo '<table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="text_medium" style="padding:5px">'.mi18n("Videoverzeichnis wählen").': </td> <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 ('divx') 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>'; } echo '</select> <input type="image" src="images/submit.gif"></td></tr>'; #Choose Video file echo '<tr><td class="text_medium" style="padding:5px">'.mi18n("Video wählen").': </td> <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 ('divx') 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"></td></tr>'; #Choose Thumb folder echo '<tr> <td class="text_medium" style="padding:5px">'.mi18n("Thumbnailverzeichnis wählen").': </td> <td class="text_medium" style="padding:5px">'; echo '<select name="CMS_VAR[3]" style="width:200px">'; #Get upload directories $sql = "SELECT DISTINCT dirname FROM ".$cfg["tab"]["upl"]." WHERE idclient='$client' AND filetype IN ('jpg') ORDER BY dirname"; $db->query($sql); $selected = false; while ($db->next_record()) { $dirname_thumb = $db->f('dirname'); if ($cms_dirname_thumb != $dirname_thumb) { echo '<option value="'.$dirname_thumb.'"> '.$dirname_thumb.'</option>'; } else { $selected = true; echo '<option value="'.$dirname_thumb.'" selected="selected"> '.$dirname_thumb.'</option>'; } } if (!$selected) { echo '<option value="0" selected="selected">'.mi18n("-- Kein Thumbnail --").'</option>'; } else { echo '<option value="0">'.mi18n("-- Kein Thumbnail --").'</option>'; } echo '</select> <input type="image" src="images/submit.gif"></td></tr>'; #Choose Thumb file echo '<tr><td class="text_medium" style="padding:5px">'.mi18n("Thumbnail wählen").': </td> <td class="text_medium" style="padding:5px">'; echo '<select name="CMS_VAR[4]" style="width:200px">'; echo '<option value="0" selected="selected">'.mi18n("-- Kein Thumbnail --").'</option>'; if ($cms_dirname_thumb != '0') { #Get uploaded files $sql = "SELECT filename FROM ".$cfg["tab"]["upl"]." WHERE idclient = '$client' AND filetype IN ('jpg') AND dirname = '$cms_dirname_thumb' ORDER BY filename"; $db->query($sql); while ($db->next_record()) { $img_name_thumb = $db->f('filename'); if ($cms_filename_thumb != $img_name_thumb) { echo '<option value="'.$img_name_thumb.'"> '.$img_name_thumb.'</option>'; } else { echo '<option selected="selected" value="'.$img_name_thumb.'"> '.$img_name_thumb.'</option>'; } } } echo '</select> <input type="image" src="images/submit.gif"></td></tr>'; if ($cms_dirname != '0') { echo '<tr> <td class="text_medium" style="padding:5px">'.mi18n("Breite").'</td> <td class="text_medium" style="padding:5px"><input type="text" name="CMS_VAR[5]" value="CMS_VALUE[5]"></td> </tr><tr> <td class="text_medium" style="padding:5px">'.mi18n("Höhe").'</td> <td class="text_medium" style="padding:5px"><input type="text" name="CMS_VAR[6]" value="CMS_VALUE[6]"></td> </tr>'; } ?> <!-- Kontrolleiste --> <tr> <td style="padding:5px"> <acronym title="<?php echo "Aussehen der Wiedergabebuttons";?>"><?php echo "Kontolleiste";?></acronym> </td> <td> <?php $a1 = ''; $a2 = ''; switch (strtolower("CMS_VALUE[7]")) { case "null" : $a1 = ' checked'; break; case "zero" : $a2 = ' checked'; break; case "small" : $a3 = ' checked'; break; case "large" : $a4 = ' checked'; break; case "full" : $a5 = ' checked'; break; default : $a3 = ' checked'; } ?> <input type="radio" name="CMS_VAR[7]" value="null"<?php echo $a1;?>> <?php echo mi18n("keine");?> <input type="radio" name="CMS_VAR[7]" value="zero"<?php echo $a2;?>> <?php echo mi18n("überlagert mit Verschwinden");?> <input type="radio" name="CMS_VAR[7]" value="small"<?php echo $a3;?>> <?php echo mi18n("klein");?> <input type="radio" name="CMS_VAR[7]" value="large"<?php echo $a4;?>> <?php echo mi18n("groß");?> <input type="radio" name="CMS_VAR[7]" value="full"<?php echo $a5;?>> <?php echo mi18n("alle");?> </td> </tr> <!-- Autostart --> <tr> <td style="padding:5px"> <acronym title="<?php echo "Video startet sofort nach dem Laden der Seite";?>"><?php echo "Autostart";?></acronym> </td> <td> <?php $b1 = ''; $b2 = ''; switch (strtolower("CMS_VALUE[8]")) { case "true" : $b1 = ' checked'; break; case "false" : $b2 = ' checked'; break; default : $b2 = ' checked'; } ?> <input type="radio" name="CMS_VAR[8]" value="false"<?php echo $b2;?>> <?php echo mi18n("nein");?> <input type="radio" name="CMS_VAR[8]" value="true"<?php echo $b1;?>> <?php echo mi18n("ja");?> </td> </tr> <!-- Puffern --> <tr> <td style="padding:5px"> <acronym title="<?php echo "Modus des Zwischenspeicherns vor dem Abspielen";?>"><?php echo "Puffern";?></acronym> </td> <td> <?php $b1 = ''; $b2 = ''; switch (strtolower("CMS_VALUE[9]")) { case "null" : $c1 = ' checked'; break; case "progressive" : $c2 = ' checked'; break; case "full" : $c3 = ' checked'; break; default : $c2 = ' checked'; } ?> <input type="radio" name="CMS_VAR[9]" value="full"<?php echo $c1;?>> <?php echo mi18n("gar nicht");?> <input type="radio" name="CMS_VAR[9]" value="progressive"<?php echo $c2;?>> <?php echo mi18n("fortlaufend");?> <input type="radio" name="CMS_VAR[9]" value="full"<?php echo $c3;?>> <?php echo mi18n("komplett");?> </td> </tr> <!-- Wiederholen --> <tr> <td style="padding:5px"> <acronym title="<?php echo mi18n("Spielt die Mediadatei im Endlosmodus ab");?>"><?php echo mi18n("Wiederholen");?></acronym> </td> <td> <?php $d1 = ''; $d2 = ''; switch (strtolower("CMS_VALUE[10]")) { case "true" : $d1 = ' checked'; break; case "false" : $d2 = ' checked'; break; default : $d2 = ' checked'; } ?> <input type="radio" name="CMS_VAR[10]" value="false"<?php echo $d2;?>> <?php echo mi18n("nein");?> <input type="radio" name="CMS_VAR[10]" value="true"<?php echo $d1;?>> <?php echo mi18n("ja");?> </td> </tr> <!-- Kontextmenue erlauben --> <tr> <td style="padding:5px"> <acronym title="<?php echo mi18n("Erlaubt den Kontextmenü via Rechtsklick");?>"><?php echo mi18n("Kontextmenü erlauben");?></acronym> </td> <td> <?php $e1 = ''; $e2 = ''; switch (strtolower("CMS_VALUE[11]")) { case "true" : $e1 = ' checked'; break; case "false" : $e2 = ' checked'; break; default : $e1 = ' checked'; } ?> <input type="radio" name="CMS_VAR[11]" value="false"<?php echo $e2;?>> <?php echo mi18n("nein");?> <input type="radio" name="CMS_VAR[11]" value="true"<?php echo $e1;?>> <?php echo mi18n("ja");?> </td> </tr> </table> <?php
Code: Alles auswählen
<?php $cms_dirname = "CMS_VALUE[1]"; $cms_filename = "CMS_VALUE[2]"; $cms_dirname_thumb = "CMS_VALUE[3]"; $cms_filename_thumb = "CMS_VALUE[4]"; $weight = "CMS_VALUE[5]"; $height = "CMS_VALUE[6]"; if ($cms_filename != '0') { $video = "http://www.nebelweb.de/cms/upload/".$cms_dirname.$cms_filename; $thumb = "http://www.nebelweb.de/cms/upload/".$cms_dirname_thumb.$cms_filename_thumb; $output = '<!--[if IE]> <div > <object type="video/divx" classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" codebase="http://download.divx.com/player/DivXBrowserPlugin.cab" width="'.$weight.'" height="'.$height.'" > <param name="src" value="'.$video.'" /> <param name="previewImage" value="'.$thumb.'" /> <param name="minVersion" value="1.0.0" /> <param name="mode" value="CMS_VALUE[7]" /> <param name="autoplay" value="CMS_VALUE[8]" /> <param name="bufferingMode" value="CMS_VALUE[9]" /> <param name="showpostplaybackad" value="false" /> <param name="wmode" value="transparent" /> <param name="loop" value="CMS_VALUE[10]" /> <param name="allowContextMenu" value="CMS_VALUE[11]" /> <param name="pluginspage" value="http://go.divx.com/plugin/download/" /> <p>Das Video wird mit dem kostenlosen DivX Webplayer abgespielt.<br /><a href="http://www.divx.com/divx/webplayer/"><img src="http://labs.divx.com/files/dwp-d-s.gif" alt="Download DivX Webplayer"/></a></p> </object> </div> <![endif]--> <!--[if !IE]><--> <div > <object type="video/divx" data="'.$video.'" codebase="http://download.divx.com/player/DivXBrowserPlugin.cab" width="'.$weight.'" height="'.$height.'"> <param name="src" value="'.$video.'" /> <param name="previewImage" value="'.$thumb.'" /> <param name="minVersion" value="1.0.0" /> <param name="mode" value="CMS_VALUE[7]" /> <param name="autoplay" value="CMS_VALUE[8]" /> <param name="bufferingMode" value="CMS_VALUE[9]" /> <param name="showpostplaybackad" value="false" /> <param name="wmode" value="transparent" /> <param name="loop" value="CMS_VALUE[10]" /> <param name="allowContextMenu" value="CMS_VALUE[11]" /> <param name="pluginspage" value="http://go.divx.com/plugin/download/" /> <p>Das Video wird mit dem kostenlosen DivX Webplayer abgespielt.<br /><a href="http://www.divx.com/divx/webplayer/"><img src="http://labs.divx.com/files/dwp-d-s.gif" alt="Download DivX Webplayer"/></a></p> </object> </div> <!--><![endif]-->'; #Output Video tag echo '<div class="movVideo">'.$output.'</div>'; } ?>
und die Videogröße eintragen - fertig. Wenn gewünscht noch die Variablen ändern.
Viel Spass. Positive und negative Kritik (am liebsten konstruktiv) sind
gerne gesehen.
(P.S.: Angeblich bekommt man von DivX eine kostenlose Serialnummer für DivX Pro, wenn man ein DivX-Video auf der eigenen Webseite einbaut und sich bei DivX meldet. Bisher habe ich aber leider immer! noch keine erhalten.) *EDIT* (Nov. 2008) Die Aktion gibt es nicht mehr. Ich habe nie eine Nummer erhalten
----
Powered by DivX®. DivX is a registered trademark of DivX, Inc.