commit 00561c5d8f5dc0fdb38f24b024656d44eaa35820
parent ab125f3575dee2c4b06fd29b1733d8b93ec7c5b1
Author: dankert <devnull@localhost>
Date: Tue, 2 Jun 2009 22:57:09 +0200
Makro für Youtube-Videos
Diffstat:
1 file changed, 60 insertions(+), 0 deletions(-)
diff --git a/dynamicClasses/Youtube.class.php b/dynamicClasses/Youtube.class.php
@@ -0,0 +1,59 @@
+<?php
+// ---------------------------------------------------------------------------
+// $Id$
+// ---------------------------------------------------------------------------
+// OpenRat Content Management System
+// Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de
+//
+// This program 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.
+//
+// This program 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.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// ---------------------------------------------------------------------------
+
+
+
+/**
+ * Bindet ein Youtube-Video ein.
+ *
+ * @author Jan Dankert
+ */
+class Youtube extends Dynamic
+{
+ /**
+ * Bitte immer alle Parameter in dieses Array schreiben, dies ist fuer den Web-Developer hilfreich.
+ * @type String
+ */
+ var $parameters = Array(
+ 'id'=>'Video-Id'
+ );
+
+ /**
+ * Bitte immer eine Beschreibung benutzen, dies ist fuer den Web-Developer hilfreich.
+ * @type String
+ */
+ var $description = 'Includes a youtube video.';
+
+ var $id = "0";
+ var $width = 320;
+ var $height = 265;
+
+ /**
+ */
+ function execute()
+ {
+ $this->output('<object width="'.$this->width.'" height="'.$this->height.'"><param name="movie" value="http://www.youtube.com/v/'.$this->id.'&hl=de&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'.$this->id.'&hl=de&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'.$this->width.'" height="'.$this->height.'"></embed></object>');
+ }
+
+}
+
+?>+
\ No newline at end of file