cvs: pres2 / display.php
| From: | Rasmus Lerdorf | Date: | Sun, 16 Apr 2006 23:31:13 +0000 |
| Subject: | cvs: pres2 / display.php | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1273@lists.php.net to get a copy of this message | ||
rasmus Sun Apr 16 23:31:13 2006 UTC
Modified files:
/pres2 display.php
Log:
:-:foo:-: support to get at presentation level variables from slides.
For example, :-:location:-: would be replaced with the location of the
talk from the presentation xml file. Other useful ones might be title,
event, date and speaker. In my case I needed it to that my map example
slides always uses the location where I am currently speaking as the
default location.
http://cvs.php.net/viewcvs.cgi/pres2/display.php?r1=1.33&r2=1.34&diff_format=u
Index: pres2/display.php
diff -u pres2/display.php:1.33 pres2/display.php:1.34
--- pres2/display.php:1.33 Tue Feb 7 14:09:29 2006
+++ pres2/display.php Sun Apr 16 23:31:13 2006
@@ -370,7 +370,8 @@
// variables so we don't get run over
function _example(&$example) {
global $pres;
-
+ $example->text =
preg_replace('/:-:(.*?):-:/e','$this->pres->\\1',$example->text);
+
$_html_effect = '';
if($example->effect) $_html_effect =
"effect=\"$example->effect\"";
// Bring posted variables into the function-local namespace