From df89d1ee3f74df39a9bc336527a4e5eb07272be1 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 6 Jul 2003 05:57:47 +0000 Subject: [PATCH] Improved example. --- album/examples/index.php | 31 +++++++++++++++++++++++++------ album/examples/index.xbf | 4 +++- album/examples/photo.xbf | 3 +++ 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/album/examples/index.php b/album/examples/index.php index dcc619f..e40a965 100644 --- a/album/examples/index.php +++ b/album/examples/index.php @@ -1,5 +1,5 @@ -'; + echo htmlentities(join('', file($file))); + } else { + // We want to see the php file source. + highlight_file($_SERVER['SCRIPT_FILENAME']); + } + exit; +} +// }}} -$parser =& new BIFE_Parser('BIFE_Translate'); -$page =& $parser->parseFile($file); +// If we are not looking at the source, we use BIFE to show the page {{{ +$template =& new HTML_Template_HIT('templates'); +$parser =& new BIFE_Parser('BIFE_Translate'); +$page =& $parser->parseFile($file); $parser->__destruct(); echo $page->render($template); +// }}} ?> diff --git a/album/examples/index.xbf b/album/examples/index.xbf index 7524642..99fe909 100644 --- a/album/examples/index.xbf +++ b/album/examples/index.xbf @@ -3,5 +3,7 @@ Datos!

Photo album

-
+
+ View BIFE (xbf) source | + View PHP source diff --git a/album/examples/photo.xbf b/album/examples/photo.xbf index ba7f57c..46ee547 100644 --- a/album/examples/photo.xbf +++ b/album/examples/photo.xbf @@ -1,4 +1,7 @@ +
+ View BIFE (xbf) source | + View PHP source
-- 2.43.0