hier ein Modul für alle die Videos in Ihre Webseite einbauen wollen die im
platzsparenden DivX Format vorliegen.
Modul DivX Video Player
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 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 (http://www.divx.com/divx/windows/webplayer/) gedient. Autor: Sebastian Nebel (www.nebelweb.de) Version: 1.0 Erstellt: 30.09.2006 Letzte Änderung: 20.10.2007
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/'; } #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>'; 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[3]" value="CMS_VALUE[3]"></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[4]" value="CMS_VALUE[4]"></td> </tr>'; } echo '</table>'; ?><?php
Code: Alles auswählen
<?php $cms_dirname = "CMS_VALUE[1]"; $cms_filename = "CMS_VALUE[2]"; $widht = "CMS_VALUE[3]"; $height = "CMS_VALUE[4]"; if ($cms_filename != '0') { $video = "upload/".$cms_dirname.$cms_filename; /*$video = substr($video, 0, strlen($video) - 4);*/ $output = '<object classid="clsid:67DABFBF-D0AB-41fa-9C46- CC0F21721616" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab" width="'.$widht.'" height="'.$height.'"> <param name="custommode" value="Stage6" /> <param name="mode" value="zero" /> <param name="autoPlay" value="false" /> <param name="src" value="'.$video.'" /> <!--[if !IE]>--> <object type="video/divx" data="'.$video.'" width="'.$widht.'" height="'.$height.'"> <param name="autoplay" value="false" /> <param name="controller" value="true" /> </object> <!--<![endif]--> </object>'; #Output Video tag echo '<div class="movVideo">'.$output.'</div>'; } ?>
und die Videogröße eintragen - fertig.
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 noch keine erhalten.