Location: PHPKode > projects > Atom PhotoBlog > atomPhotoBlog.php
<?  
/*
   Atom PhotoBlog - PHP5 based photo-blogger
   Copyright (C) 2007 by Sascha Tayefeh
   http://www.tayefeh.de

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

/*! \brief Sample template main-page.

	This is the main-page of AtomPhotoBlog that serves as a starting-point
	for your own creativity. Please, carefully read the comments, so you
	can understand what they do and what you need to adapt in order to
	design this blog to your needs.
*/

require_once './apbData/vars.php'; // All custom vars are stored here.
require_once './apbClasses/AtomPhotoBlog.class.php'; // The only class you need to stream as user.
// Create an instance of AtomPhotoBlog::
$blog = new AtomPhotoBlog($apbPara); // There MUST NOT be any html-code before this line!!!
?>
<!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>
<?  
      /*
	 Prints all header elements. This is a container method, that calls following methods:

	 AtomPhotoBlog::printJavaScriptLink("./js/apb.js"); // Print a link to a java-script
	 AtomPhotoBlog::printTitle(); // Print header-<title> derived from blog-title
	 AtomPhotoBlog::printEncoding(); // Charset encoding
	 AtomPhotoBlog::printCss(); // The css-stylesheet (no argument, yet)
	 AtomPhotoBlog::printFeedsHeader();  // Atom/Rss feed-tag for the header. ALWAYS use this!

	 For fine-tuning, you can call this methods seperatly, since all of them are public.
      */
      $blog->printHeaderElements();
?>

	 <!-- Please, replace these keywords by your own favs -->
	 <meta name="keywords" content="PhotoBlog, Atom PhotoBlog, Script, PHP, PHP5,
	 PhotoBlogger, Fotoblog, Atom, RSS, Atom 1.0, Rss 2.0, Feed" />

	 <!-- Please, replace this description with your own description -->
	 <meta name="description" content="Atom PhotoBlog - The object-oriented, 
	 very fast PhotoBlogger Script." />
	 </head>

	 <body>

	 <!-- The main workarea. This is supposed to be replaced by a div of your own -->
	 <div id="workbench"> 

	 <!-- All non-image objects (=> all objects but the index/archive and the largeImage)
	 should be placed here.	-->
	 <div id="apbContainerUtils" class="apb container utils">

<?
   /*
      Before calling the AtomPhotoBlog::printMenu(ASSOC_ARRAY), which creates a <div> and an <ul>
      for all menu items, we want to fill an assoc array with additionalm menu-items.
      Just use the key for the items' name, and the value for their link. Give the
      array as the only argument to the method AtomPhotoBlog::printMenu(ASSOC_ARRAY);
   */
   $menu=array(
      "Atom 1.0" => "./blog/atom.xml",
      "Rss 2.0" => "./blog/rss.xml"
   );
   $blog->printMenu($menu);
?>
   </div> <!-- end container UTILS> -->

   <div id="apbContainerImage" class="apb container image">
<?
      /*
	 This is the hardest working method of the class AtomPhotoBlog. It coordinates
	 all requests from/by the script/user/browser analysing GET/POST/SESSION-variables
	 and subsequently navigating to the single modules of the script (e.g. index, large image,
	 login, logout, comment, settings-form, upload-form etc...)
	 Always put this somewhere in the body.
      */

   $blog->printBodyDiv();
?>

   </div><!-- end container Image> -->

<? 
	/* 
	  Print the taglist. The only bool argument, if TRUE, makes this method connect
	  and disconnect to the mysql-server. This is necessary, if you have not established
	  a mysql-connection before, e.g. in a case like this, where the method is called
	  from outside the object of AtomPhotoBlog. So, as a user, you MUST set this argument
	  to TRUE, since its default value is FALSE.
	*/
      $blog->printTags(TRUE);

	/* 
	   Print some links to CSS/HTML/ATOM/RSS-Validators.
	*/
      $blog->printValidator();
?>

</div> <!-- end div workbench -->
</body>
</html>
Return current item: Atom PhotoBlog