cvs: presentations / apache06.xml /slides/intro Oxytocin.jpg pres2 XML_Slide.php display.php objects.php show.php
| From: | Rasmus Lerdorf | Date: | Mon, 23 Oct 2006 06:25:28 +0000 |
| Subject: | cvs: presentations / apache06.xml /slides/intro Oxytocin.jpg pres2 XML_Slide.php display.php objects.php show.php | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1349@lists.php.net to get a copy of this message | ||
rasmus Mon Oct 23 06:25:28 2006 UTC
Added files:
/presentations/slides/intro Oxytocin.jpg
Modified files:
/pres2 XML_Slide.php display.php objects.php show.php
/presentations apache06.xml
Log:
So I managed to give half a talk in Keynote and I am back to pres2.
I did like one of my keynote slides, but I can export it as a quicktime
movie, so I have added a movie tag to pres2 to easily embed exported
Keynote slides.
http://cvs.php.net/viewvc.cgi/pres2/XML_Slide.php?r1=1.11&r2=1.12&diff_format=u
Index: pres2/XML_Slide.php
diff -u pres2/XML_Slide.php:1.11 pres2/XML_Slide.php:1.12
--- pres2/XML_Slide.php:1.11 Fri Apr 21 08:14:12 2006
+++ pres2/XML_Slide.php Mon Oct 23 06:25:28 2006
@@ -17,7 +17,7 @@
// | Authors: Rasmus Lerdorf <rasmus@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: XML_Slide.php,v 1.11 2006/04/21 08:14:12 rasmus Exp $
+// $Id: XML_Slide.php,v 1.12 2006/10/23 06:25:28 rasmus Exp $
// }}}
require_once 'XML/Parser.php';
@@ -29,7 +29,7 @@
* This class is a parser for a made up presentation slide format
*
* @author Rasmus Lerdorf <rasmus@php.net>
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
* @access public
*/
class XML_Slide extends XML_Parser
@@ -106,6 +106,7 @@
case 'SLIDE':
case 'BLURB':
case 'IMAGE':
+ case 'MOVIE':
case 'LIST':
case 'BREAK':
case 'EXAMPLE':
http://cvs.php.net/viewvc.cgi/pres2/display.php?r1=1.37&r2=1.38&diff_format=u
Index: pres2/display.php
diff -u pres2/display.php:1.37 pres2/display.php:1.38
--- pres2/display.php:1.37 Sat Apr 22 10:31:37 2006
+++ pres2/display.php Mon Oct 23 06:25:28 2006
@@ -746,8 +746,8 @@
}
function _link(&$link) {
- if(empty($link->text)) $link->text =
preg_replace('/:-:(.*?):-:/e','$this->pres->\\1',$link->href);
- if(!empty($link->leader)) $leader =
preg_replace('/:-:(.*?):-:/e','$this->pres->\\1',$link->leader);
+ if(empty($link->text)) $link->text =
preg_replace('/:-:(.*?):-:/e','isset($this->pres->\\1)?$this->pres->\\1:""',$link->href);
+ if(!empty($link->leader)) $leader =
preg_replace('/:-:(.*?):-:/e','isset($this->pres->\\1)?$this->pres->\\1:""',$link->leader);
else $leader='';
if (empty($link->target)) $link->target = '_self';
if(!empty($link->text)) {
@@ -775,6 +775,25 @@
}
}
+ function _movie(&$movie) {
+ echo <<<EOB
+<div align="{$movie->align}" style="margin-left: <?php echo
{$movie->marginleft}; margin-right: {$movie->marginright};">
+<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
width="{$movie->width}" height="{$movie->height}" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
+<param name="src" value="{$this->slideDir}{$movie->filename}" >
+<param name="autoplay" value="{$movie->autoplay}">
+<param name="controller" value="false">
+<!--[if !IE]> -->
+<object data="weemovie.mov" type="video/quicktime"
width="{$movie->width}" height="{$movie->height}">
+<param name="src" value="{$this->slideDir}{$movie->filename}" >
+<param name="autoplay" value="{$movie->autoplay}">
+<param name="controller" value="false">
+</object>
+<!-- <![endif]-->
+</object>
+</div>
+EOB;
+ }
+
function _footer(&$footer) {
global $pres;
@@ -1281,8 +1300,9 @@
while(list($this->slideNum,$slide) = each($presentation->slides)) {
// testing hack
$slideDir =
dirname($this->presentationDir.'/'.$presentation->slides[$this->slideNum]->filename).'/';
- $r =& new
XML_Slide($this->presentationDir.'/'.$presentation->slides[$this->slideNum]->filename);
- $r->setErrorHandling(PEAR_ERROR_DIE,"%s\n");
+ $fn =
$this->presentationDir.'/'.$presentation->slides[$this->slideNum]->filename;
+ $r =& new XML_Slide($fn);
+ $r->setErrorHandling(PEAR_ERROR_DIE,"%s ($fn)\n");
$r->parse();
$this->objs = $r->getObjects();
@@ -1948,6 +1968,8 @@
}
function _divide(&$divide) { /* empty */ }
+
+ function _movie(&$movie) { /* empty */ }
function _footer(&$footer) {
if($this->objs[1]->template != 'titlepage') {
http://cvs.php.net/viewvc.cgi/pres2/objects.php?r1=1.158&r2=1.159&diff_format=u
Index: pres2/objects.php
diff -u pres2/objects.php:1.158 pres2/objects.php:1.159
--- pres2/objects.php:1.158 Mon Apr 17 00:02:07 2006
+++ pres2/objects.php Mon Oct 23 06:25:28 2006
@@ -520,4 +520,19 @@
/* empty */
}
// }}}
+
+ // {{{ Movie Class
+ class _movie extends _tag {
+
+ function _movie() {
+ $this->filename = '';
+ $this->autoplay = 'true';
+ $this->width = 800;
+ $this->height = 600;
+ $this->marginleft = "auto";
+ $this->marginright = "auto";
+ }
+
+ }
+ // }}}
?>
http://cvs.php.net/viewvc.cgi/pres2/show.php?r1=1.59&r2=1.60&diff_format=u
Index: pres2/show.php
diff -u pres2/show.php:1.59 pres2/show.php:1.60
--- pres2/show.php:1.59 Wed May 17 04:14:25 2006
+++ pres2/show.php Mon Oct 23 06:25:28 2006
@@ -120,7 +120,6 @@
$r =& new
XML_Slide($presentationDir.'/'.$pres->slides[$mode->slideNum]->filename);
$r->setErrorHandling(PEAR_ERROR_DIE,"%s\n");
$r->parse();
-
// Display slide
$mode->objs = $r->getObjects();
$mode->pres =& $pres;
http://cvs.php.net/viewvc.cgi/presentations/apache06.xml?r1=1.1&r2=1.2&diff_format=u
Index: presentations/apache06.xml
diff -u presentations/apache06.xml:1.1 presentations/apache06.xml:1.2
--- presentations/apache06.xml:1.1 Wed Oct 11 02:22:50 2006
+++ presentations/apache06.xml Mon Oct 23 06:25:28 2006
@@ -12,7 +12,7 @@
<title>Getting Rich with PHP 5</title>
<event>Apachecon</event>
<location>Austin</location>
-<date>October 10, 2006</date>
+<date>October 11, 2006</date>
<url>http://talks.php.net/show/apache06</url>
<speaker>Rasmus Lerdorf</speaker>
<email>rasmus@php.net</email>