|
General approach :
As a rule, bz's way of coding is to separate totally the code from the presentation
: in a word, in a perfect world, there should not be any php mixed with html.
However, bz does not intend to be strict at all, it is possible to mix html,
php, and bz's keywords without any problem. The main idea is : "use it
the way you think is the more convenient to you".
The only strict requirement bz has is that the html that it is given as input
is well-formed XHTML (see http://www.w3.org/TR/xhtml1/ for more details) . It basically means
that tags are written in lowercase, that name-attribute pairs are written as
name="attribute" (with the quotes), and that every opened tag is closed and those
which should not be closed are markes with a final "/" (for instance
<BR> should be written as <br /> ). It is possible to disable the
case-check option or the xhtml ckeck (not recommended) in the configuration file though, and in case you have a lot
of 'mere' html you want to port to xhtml, take a look at the tool called 'tidy'
from Dave Raggett at (http://www.w3.org/People/Raggett/tidy ).
bZ basically consists in a X-HTML parser, a php file containing a few function,
and a compiler that changes bZ's keywords into html or php code. For convenience,
bZ uses pear's abstract database layer, so that it can be used with any database
server.
bZ's keywords are rather simple, there should not be lots of errors generated by their use.
In case php generates an error on the compiled php file, take a look at it and bZ's generated code is
commented so that it is possible to know which line of the source file generated it. For easier debugging and
developpement, all php functions should be placed in separate files so that the line numbres are not modified by bZ.
Note for wysiwyg editors users : in such softwares (Dreamweaver for instance),
double quotes ["] are usually replaced by ["]. bZ makes no difference
between the two, write bZ code without paying attention. |