Source for file example.php

Documentation is available at example.php

  1. <?php    
  2.  
  3. /**
  4.  * @package MinimalWeblog
  5.  * @version 1.0,1
  6.  */
  7.  
  8. /**
  9.  * Include weblog functionality
  10.  *
  11.  * I recommend moving the MinimalWeblog package out of the webroot
  12.  * (rule of thumb: only files which are directly requested by a browser
  13.  * should be in the webroot).
  14.  */
  15. require('MinimalWeblog.php');
  16. $weblog new MinimalWeblog();
  17.  
  18. ?>
  19. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  20.         "http://www.w3.org/TR/html4/strict.dtd">
  21. <html lang="en">
  22. <head>
  23. <title>MinimalWeblog example</title>
  24. <meta name="generator" content="BBEdit 8.6">
  25. <style type="text/css">
  26.     #right
  27.     {
  28.         float: right;
  29.         width: 29%;
  30.     }
  31.     
  32.     #left
  33.     {
  34.         float: left;
  35.         width: 70%;
  36.         border: 1px dotted red;
  37.     }
  38.     
  39.     img.topic
  40.     {
  41.         border: none;
  42.         margin-right: 10px;
  43.     }
  44.     
  45.     h1
  46.     {
  47.         text-align: center;
  48.         font-size: 125%;
  49.     }
  50.     
  51.     h2 { font-size: 110%; }
  52. </style> 
  53. </head>
  54. <body>
  55. <h1>MinimalWeblog example</h1>
  56. <div id="left"> 
  57. <?php echo $weblog->insert()?>
  58. </div>
  59. <div id="right"> 
  60.   <p>Static page content</p>
  61.   <p><a href="<?php echo $_SERVER['PHP_SELF''?wl_mode=login' ?>">Login</a> to this MinimalWeblog installation.</p>
  62.   <p>You probably don't want a login link like the above on a public page (I just type "?wl_mode=login" after the address to get to the login screen.)</p>
  63. </div>
  64. </body>
  65. </html>

Documentation generated on Sun, 17 Jun 2007 19:20:36 +0200 by phpDocumentor 1.3.2