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
+?>
cvs: pres2 / display.php
| Tweet |
|
Search Discussions
Discussion Posts
Previous
Follow ups
- Jim winstead: jimw Wed Nov 5 10:49:53 2003 EDT Modified files: /pres2 display.php Log: pass in some missing params Index: pres2/display.php diff -u pres2/display.php:1.6 pres2/display.php:1.7 --- pres2/display.php:1.6 Wed Nov 5 10:43:01 2003 +++ pres2/display.php Wed Nov 5 10:49:53 2003 @@ -1076,7 +1076,7 @@ } $pos += $nl+1; if(pdf_get_value($pdf, "texty") >= ($y-$bm)) { - $this->my_pdf_page_number($pdf); + $this->my_pdf_page_number($pdf, $x, $y); $this->my_new_pdf_end_page($pdf);
- Chris Shiflett: shiflett Fri Nov 14 00:40:27 2003 EDT Modified files: /pres2 display.php Log: Adding a slash prior to slidelist.php, so that the base directory does not have to end with a slash. This is a hack so that I don't have to have a "show" script within a directory. It should not adversely affect anyone else, unless you hate having two slashes in the URL for your slidelist. Index: pres2/display.php diff -u pres2/display.php:1.7 pres2/display.php:1.8 --- pres2/display.php:1.7 Wed Nov 5 10:49:53 2003 +++
Related Discussions
Discussion Overview
| group | php-pres |
| categories | php |
| posted | Nov 1, '03 at 11:52p |
| active | Nov 14, '03 at 5:40a |
| posts | 4 |
| users | 3 |
| website | php.net |
