svn: /web/pres2/trunk/ display.php objects.php wepay_api.inc
| From: | Rasmus Lerdorf | Date: | Sat, 13 Nov 2010 07:46:20 +0000 |
| Subject: | svn: /web/pres2/trunk/ display.php objects.php wepay_api.inc | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1689@lists.php.net to get a copy of this message | ||
rasmus Sat, 13 Nov 2010 07:46:20 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305308
Log:
A bit if pres2 hacking
Changed paths:
U web/pres2/trunk/display.php
U web/pres2/trunk/objects.php
A web/pres2/trunk/wepay_api.inc
Modified: web/pres2/trunk/display.php
===================================================================
--- web/pres2/trunk/display.php 2010-11-13 04:06:25 UTC (rev 305307)
+++ web/pres2/trunk/display.php 2010-11-13 07:46:20 UTC (rev 305308)
@@ -541,9 +541,21 @@
} else {
if($example->type=='marked') {
$text = preg_replace("/^\|/m","",$example->text);
- eval('?>'.$text);
+ if($example->pre) echo "<pre>";
+ $code = '';
+ if($example->pre_code) $code = "<?php
".$example->pre_code."?>";
+ $code .= $text;
+ if($example->post_code) $code .= "<?php
".$example->post_code."?>";
+ eval('?>'.$code);
+ if($example->pre) echo "</pre>";
} else {
- eval('?>'.$example->text);
+ if($example->pre) echo "<pre>";
+ $code = '';
+ if($example->pre_code) $code = "<?php
".$example->pre_code."?>";
+ $code .= $example->text;
+ if($example->post_code) $code .= "<?php
".$example->post_code."?>";
+ eval('?>'.$code);
+ if($example->pre) echo "</pre>";
}
}
}
@@ -580,7 +592,9 @@
if (isset($list->class)) {
echo "<ul class='{$list->class}'>";
} else {
- echo '<ul class="pres">';
+ if(!empty($list->lineheight)) $style = "line-height:
".$list->lineheight.';';
+ if(!empty($list->marginleft)) $style .= "margin-left:
".$list->marginleft.';';
+ echo '<ul class="pres"
style="'.$style.'">';
}
while(list($k,$bul)=each($list->bullets)) { $bul->display(); }
echo '</ul>';
@@ -601,6 +615,8 @@
$style .= "margin-left: ".$ml."em;";
}
+ if(!empty($bullet->lineheight)) $style .= "line-height:
".$bullet->lineheight.';';
+
if(!empty($bullet->start)) {
if(is_numeric($bullet->start)) {
$this->objs[$this->coid]->num = (int)$bullet->start;
@@ -1358,7 +1374,7 @@
$old_cy = $this->pdf_cy;
pdf_set_font($this->pdf, $this->pdf_font , -12, 'winansi');
- foreach($this->page_index as $pn=>$ti) {
+ if(is_array($this->page_index)) foreach($this->page_index as $pn=>$ti) {
if($ti=='titlepage') continue;
$ti.=' ';
while(pdf_stringwidth($this->pdf,$ti,$fnt,-12)<($this->pdf_x-$this->pdf_cx*2.5-140))
$ti.='.';
Modified: web/pres2/trunk/objects.php
===================================================================
--- web/pres2/trunk/objects.php 2010-11-13 04:06:25 UTC (rev 305307)
+++ web/pres2/trunk/objects.php 2010-11-13 07:46:20 UTC (rev 305308)
@@ -387,7 +387,8 @@
print
echo "{$text}" | perl2html -cs;
break;
case 'c':
- $text = str_replace('"', '\\"', $this->text);
+ $text = str_replace('"', '\'', $this->text);
+ $text = str_replace('\\n', '', $text);
print echo "{$text}" | c2html -cs;
break;
case 'xml':
Added: web/pres2/trunk/wepay_api.inc
===================================================================
--- web/pres2/trunk/wepay_api.inc (rev 0)
+++ web/pres2/trunk/wepay_api.inc 2010-11-13 07:46:20 UTC (rev 305308)
@@ -0,0 +1 @@
+link /var/www/pres2/presentations/slides/wepay/wepay_api.inc
\ No newline at end of file
Property changes on: web/pres2/trunk/wepay_api.inc
___________________________________________________________________
Added: svn:special
+ *