PDA

View Full Version : FREEBS Templates usage


Greg
04-13-2005, 01:50 PM
There are seven customizable templates in FREEBS. They are used and parsed as follows...

$keyword, $assoc_id, and $dev_token are available in all templates.

header.html
used in index.php and book.php
This template starts all the output. It should be configured to recieve a table of data where the code in it ends.
Variables available you may want to use: $keyword
(or any variable in config.php, but most are private)

bookindex.html
used in index.php
This template is a box for the main index page.
Variables available you may want to use: $keyword and $books_avail
(or any variable in config.php, but most are private)

booklist.html
used in index.php
This template is a box for the book list index by letter page.
Variables available you may want to use: $keyword, $books_avail
(or any variable in config.php, but most are private)

comments.html
used in book.php
This template is part of the main box for the book page.
Variables available you may want to use: $keyword, $crate, $comment, $summary
(or any variable in config.php, but most are private)

similars.html
used in book.php
This template is part of the main box for the book page.
Variables available you may want to use: $keyword, $similars
(or any variable in config.php, but most are private)

book.html
used in book.php
This template is the main box for the book page.
Variables available you may want to use: $keyword,
LIVE INFO: $ourp, $lisp, $avail, $as_of_time
Cached INFO: $data, $url, $name, $author, $rdate, $maker, $image, $media, $rating
(or any variable in config.php, but most are private)

footer.html
used in index.php and book.php
This template end all the output. It should be configured to the end of recieving a table of data where the code in it begins.
Variables available you may want to use: $keyword
(or any variable in config.php, but most are private)

Greg
04-13-2005, 07:21 PM
I will try to explain how the templates are called.

In both index.php and book.php the header.html is parsed. If there is an error then the error message is put in the output.Then the footer.html is parsed and the whole thing displayed.

If index.php is displaying the alphbetical list, it uses the bookindex.html template. First the header is parsed, then the bookindex.html and then the footer.

If index.php is displaying a letter index, it uses booklist.html. First the header is parsed and then the booklist.html and then finally the footer.

book.php uses book.html, comments.html and similars.html. Similars and comments are parsed and then finally all of it into book.html. Of course header and footer before and after respectivly.

Comments are first You get the rating image tags the summarys and the comments seperated by html breaks in $comments in the comments.html template.

Similars are next. You get a list of titles in an html list as anchor tags in $similars.

Then book.html is parsed. It has $all_comments and $all_similars in it to recieve the preiously parsed comments and similars templates plus the variables for all the other book info.

All php output is XHTML compatable, however the default templates are HTML Transitional 4.01.