Blof 0.1.0

Here is a simple and complete example, let's call it demo.php:


<?php
require 'blof.php';
blof_set('passwd''mypass');
blof_init();
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>My blog</title>
    <link rel="stylesheet" href="blof.css" />
  </head>
  <body>
    <?php blof_main(); ?>
  </body>
</html>

Explanations for every item:

Here is a default stylesheet (referred as blof.css in the previous example):

div.blof_thread     { margin-top: 1em; margin-bottom: 2em; }
div.blof_thread
  div.blof_title    { font-size: 1.25em; font-weight: bold; border-bottom: solid black 1px; }
div.blof_thread
  div.blof_header   { }
div.blof_comment    { margin-bottom: 0.5em; padding: 0.25em; background-color: #e0e0e0; border: solid black 1px; }
div.blof_commentalt { margin-bottom: 0.5em; padding: 0.25em; background-color: #d0d0d0; border: solid black 1px; }
div.blof_comment
  div.blof_header,
div.blof_commentalt
  div.blof_header   { font-weight: bold; }
div.blof_body   { text-align: justify; margin-top: 1em; }
div.blof_body p { margin: 0.5em; }
div.blof_action { text-align: center; }
div.blof_footer { text-align: center; margin-top: 2em; border-top: dotted gray 1px; }
div.blof_error  { background-color: #f0b0b0; }
span.blof_from  { font-style: italic; }
span.blof_date  { }
span.blof_u     { text-decoration: underline; }
span.blof_i     { font-style: italic; }
span.blof_b     { font-weight: bold; }
pre.blof_code   { margin: 1em; background-color: #d0d0d0; }

Blof can be customised with blof_set('param', 'value') where param is: