From: Leandro Lucarella Date: Sun, 6 Jul 2003 05:57:47 +0000 (+0000) Subject: Improved example. X-Git-Tag: svn_import~14 X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/commitdiff_plain/df89d1ee3f74df39a9bc336527a4e5eb07272be1 Improved example. --- 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