FAQ

cvs: pres2 / display.php

Jim winstead
Nov 5, 2003 at 3:43 pm
jimw Wed Nov 5 10:43:01 2003 EDT

Modified files:
/pres2 display.php
Log:
handle required_extension attribute on examples, so the results will be skipped
when an extension required to generate the results is not available


Index: pres2/display.php
diff -u pres2/display.php:1.5 pres2/display.php:1.6
--- pres2/display.php:1.5 Sat Nov 1 18:52:24 2003
+++ pres2/display.php Wed Nov 5 10:43:01 2003
@@ -343,7 +343,7 @@

echo "</div></div>\n";
}
- if($example->result && (empty($example->condition) || (!empty($example->condition) && isset(${$example->condition})))) {
+ if($example->result && (empty($example->condition) || isset(${$example->condition})) && (empty($example->required_extension) || extension_loaded($example->required_extension))) {
if(!$example->hide) echo '<div style="font-size: '.(4*(float)$example->fontsize/3)."em;\">Output</div>\n";
$_html_sz = (float) $example->rfontsize;
if(!$_html_sz) $_html_sz = 0.1;
@@ -803,7 +803,7 @@
$example->highlight($this->slideDir);
echo "</td></tr></table>\n";
}
- if($example->result && (empty($example->condition) || (!empty($example->condition) && isset(${$example->condition})))) {
+ if($example->result && (empty($example->condition) || isset(${$example->condition})) && (empty($example->required_extension) || extension_loaded($example->required_extension))) {
if(!$example->hide) {
echo "<h2>Output</h2>\n";
}
@@ -1448,7 +1448,7 @@

}
$this->pdf_cy = pdf_get_value($this->pdf, "texty");
- if($example->result && $example->type!='iframe' && (empty($example->condition) || (!empty($example->condition) && isset(${$example->condition})))) {
+ if($example->result && $example->type != 'iframe' && (empty($example->condition) || isset(${$example->condition})) && (empty($example->required_extension) || extension_loaded($example->required_extension))) {
if(!$example->hide) {
$this->pdf_cy = pdf_get_value($this->pdf, "texty");
pdf_set_text_pos($this->pdf,$this->pdf_cx+20,$this->pdf_cy); // Force to left-margin
@@ -1791,4 +1791,4 @@
}
}

-?>
\ No newline at end of file
+?>
reply

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›