cvs: pres2 / display.php objects.php
| From: | Jesus M. Castagnetto | Date: | Sun, 08 Feb 2004 21:24:26 +0000 |
| Subject: | cvs: pres2 / display.php objects.php | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-963@lists.php.net to get a copy of this message | ||
jmcastagnetto Sun Feb 8 16:24:26 2004 EDT
Modified files:
/pres2 display.php objects.php
Log:
- Added 'talign' attribute to 'image' tag, similar to the one for
'blurb'
- Reused code for generating PDF of example tags including external file
http://cvs.php.net/diff.php/pres2/display.php?r1=1.12&r2=1.13&ty=u
Index: pres2/display.php
diff -u pres2/display.php:1.12 pres2/display.php:1.13
--- pres2/display.php:1.12 Thu Jan 22 17:02:00 2004
+++ pres2/display.php Sun Feb 8 16:24:26 2004
@@ -285,8 +285,8 @@
function _image(&$image) {
$effect = '';
- if($image->effect) $effect = "effect=\"$image->effect\"";
- if(isset($image->title)) echo
'<h1>'.markup_text($image->title)."</h1>\n";
+ if($image->effect) $effect = "effect=\"$#image->effect\"";
+ if(isset($image->title)) echo "<h1
align=\"{$image->talign}\">".markup_text($image->title)."</h1>\n";
if ($image->width) {
$size = "width=\"{$image->width}\"
height=\"{$image->height}\"";
} else {
@@ -776,7 +776,7 @@
}
function _image(&$image) {
- if(isset($image->title)) echo
'<h1>'.markup_text($image->title)."</h1>\n";
+ if(isset($image->title)) echo "<h1
align=\"{$image->talign}\">".markup_text($image->title)."</h1>\n";
if ($image->width) {
$size = "width=\"{$image->width}\"
height=\"{$image->height}\"";
} else {
@@ -1532,6 +1532,14 @@
// Need something to turn html into pdf here?
// Perhaps just output buffering and stripslashes
// include $_html_filename;
+ // -- copying code from below as a temp solution --
+ ob_start();
+ eval('?>'.file_get_contents($_html_filename));
+ $data = strip_tags(ob_get_contents());
+ ob_end_clean();
+ if(strlen($data) && $data[strlen($data)-1] != "\n") $data
.= "\n";
+ $this->my_pdf_paginated_code($this->pdf, $data, $this->pdf_x,
$this->pdf_y, $this->pdf_cy, 60, $this->pdf_cx+30, $this->pdf_cx,
$this->pdf_example_font, -10);
+ pdf_continue_text($this->pdf,"");
break;
}
} else {
http://cvs.php.net/diff.php/pres2/objects.php?r1=1.153&r2=1.154&ty=u
Index: pres2/objects.php
diff -u pres2/objects.php:1.153 pres2/objects.php:1.154
--- pres2/objects.php:1.153 Thu Jan 22 17:02:00 2004
+++ pres2/objects.php Sun Feb 8 16:24:26 2004
@@ -207,6 +207,7 @@
function _image() {
$this->filename = '';
$this->align = 'left';
+ $this->talign = 'left';
$this->marginleft = "auto";
$this->marginright = "auto";
$this->effect = '';