User Tools

Site Tools


podoc:front_page

Front Page Introduction

The purpose of the front page is to provide a customizable platform allowing the system administrator to create a unique appearance for each Photo Organizer installation. Currently the Front Page consists only of a single page that is the default page of the software, but the eventual goal is to extend this mechanism and turn it into a complete customer-modifiable interface.

Front Page Structure

The front page is composed of three main elements:

  1. PHP PROLOG - mandatory PHP code that creates the PHP environment.
  2. USER CODE - your HTML code with embedded Photo Organizer PHP tags.
  3. PHP EPILOG - mandatory PHP code that releases the PHP environment.

The PHP PROLOG

The PHP PROLOG should be the first tag of your template. This creates the environment for the PHP primitives that are described in the following paragraph. It has the following static structure:

<?php
include_once "include/vars.php";
include_once "include/config.php";
include_once "include/site.php";
include_once "$theme/theme.php";
$database = site_prolog();
?>

The PHP PRIMITIVES

<?php
site_logo($align);
?>

This tag displays the logo of your Photo Organizer installation. The logo is customizable, by default it is the PO logo as defined in the theme that comes with the software.

Parameters:

  • $align - sets the alignement of the logo; valid values are: “left”, “center” or “right”

PO Navigator

<?php
site_navigator_stand_alone($database, $tab);
?>

This tag displays the Photo Organizer navigation bar.

Parameters:

  • $database - The database connection that was established in the PHP PROLOG.
  • $tab - The active tab; valid values are:
IndexMeaning
5My Folders
8My Datebook
6My Profile
7My Settings
10My Tools
9Admin
1Users
2Search
3Login/Logout
4Help

PO Navigator Status Bar

<?php
site_navigator_status($left_string, $right_string);
?>

This tag displays the Photo Organizer navigator status that is typically located directly below the navigator bar.

Parameters:

  • $left_string - string displayed on the left side of the status bar.
  • $right_string - string displayed on the right side of the status bar

Display Single Photo

<?php
site_display_photo($database, $photo_id, $framed, $version);
?>

This tag displays a single photo linked to the its photo preview. As the Front Page may be accessed by non-registered users, make sure that the photos you display on the Front Page are publicly available.

Parameters:

  • $database - The database connection that was established in the PHP PROLOG.
  • $photo_id - The photo identifier.
  • $framed - Valid values are: “true” - to display a frame around the photo, “false” - to display the bare photo only, without any additional decoration.
  • $version - Optional, references the version id of the photo you wish to display. Useful only when the photo has multiple associated versions.

Display Random Photo

<?php
site_display_random_photos( $database, $type, $identifier, $count, $framed);
?>

This tag displays random photos of a given folder, album or user arranged in a specified geometry.

Parameters:

  • $database - The database connection that was established in the PHP PROLOG.
  • $type - Valid values are: “album” - to display photos belonging to an album, “folder” - to display photos belonging to a folder, “user” - to display photos belonging to a user.
  • $identifier - The folder, album or user identifier.
  • $count - Number of images, must be greater than 0.
  • $framed - Valid values are: “true” - to display a frame around the photo, “false” - to display the bare photo only, without any additional decoration.

Display User Name

<?php
site_display_user_name( $database, $user_identifier, $link);
?>

This tag displays the name of a user.

Parameters:

  • $database - The database connection that was established in the PHP PROLOG.
  • $user_identifier - User identifier.
  • $link - Valid values are: “true” - to link the user's account, “false” - to display the user name as simple text.

PO General Search Entry

<?php
site_search_entry( $align, $size);
?>

This tag displays a general search entry that returns the search results in the Search View.

Parameters:

  • $align - Sets the alignment of the search entry; valid values are: “left”, “center” or “right”
  • $size - The number of characters in the search entry.

PO Credit

<?php
site_credit();
?>

This tag displays the Photo Organizer credits and the software version.

The PHP EPILOG

The PHP EPILOG should be the last tag of your template. Its purpose is to close all connections that were set up by the PHP PROLOG. This has the following static structure:

<?php 
site_epilog($database);
?>

See Also

podoc/front_page.txt · Last modified: 2007/08/03 19:57 by pizza