cvs: pear /Text_Wiki/Text/Wiki/Render/Xhtml Code.php
| From: | bertrand GUGGER | Date: | Sat, 16 Jul 2005 09:06:56 +0000 |
| Subject: | cvs: pear /Text_Wiki/Text/Wiki/Render/Xhtml Code.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33075@lists.php.net to get a copy of this message | ||
toggg Sat Jul 16 05:06:56 2005 EDT
Modified files:
/pear/Text_Wiki/Text/Wiki/Render/Xhtml Code.php
Log:
Request #4634 Code block title/filename, uses conf css_filename
http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php?r1=1.7&r2=1.8&ty=u
Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php
diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php:1.7
pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php:1.8
--- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php:1.7 Sun Jan 30 14:05:15 2005
+++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php Sat Jul 16 05:06:52 2005
@@ -6,7 +6,8 @@
'css' => null, // class for <pre>
'css_code' => null, // class for generic <code>
'css_php' => null, // class for PHP <code>
- 'css_html' => null // class for HTML <code>
+ 'css_html' => null, // class for HTML <code>
+ 'css_filename' => null // class for optional filename <div>
);
/**
@@ -32,6 +33,9 @@
$css_code = $this->formatConf(' class="%s"', 'css_code');
$css_php = $this->formatConf(' class="%s"', 'css_php');
$css_html = $this->formatConf(' class="%s"', 'css_html');
+ $css_filename = $this->formatConf(' class="%s"',
'css_filename');
+print_r($options);
+print_r($css_filename);
if ($type == 'php') {
@@ -96,7 +100,12 @@
$text = "<pre$css><code$css_code>$text</code></pre>";
}
+ if ($css_filename && isset($attr['filename'])) {
+ $text = '<div$css_filename>' .
+ $attr['filename'] . '</div>' . $text;
+ }
+
return "\n$text\n\n";
}
}
-?>
\ No newline at end of file
+?>