From: Leandro Lucarella Date: Sun, 6 Jul 2003 05:42:43 +0000 (+0000) Subject: Improved example. X-Git-Tag: 0.11^0 X-Git-Url: https://git.llucax.com/software/bife/base.git/commitdiff_plain/778ce089e6282126a7003291ec93e3557ad6df2d Improved example. --- diff --git a/examples/index.php b/examples/index.php index 5a7e24a..656561b 100644 --- a/examples/index.php +++ b/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/examples/index.xbf b/examples/index.xbf new file mode 100644 index 0000000..9b25516 --- /dev/null +++ b/examples/index.xbf @@ -0,0 +1,11 @@ + + + BIFE is working! +

Translate Fallback is working too!

+

This is a very bad use for BIFE, because I'm writing HTML :-P

+ A little of 'real' use +

Here's a link to another BIFE file

+
+ View BIFE (xbf) source | + View PHP source +
diff --git a/examples/link.xbf b/examples/link.xbf new file mode 100644 index 0000000..41cef67 --- /dev/null +++ b/examples/link.xbf @@ -0,0 +1,8 @@ + + + BIFE Links are working too! +

Go back.

+
+ View BIFE (xbf) source | + View PHP source +