Location: PHPKode > scripts > Breadcrumbs > breadcrumbs-2-4-4/README.txt
File: $Id: class.breadcrumb.inc.php, 2005/01/08 05:15 PST
-----------------------------------------------------------------------
Purpose of file: Show the directories and their links in path form
                 Home > Firstdir > Seconddir > Etc > filename.php
Information: If you use this script please contact me with a url or
             product information plus the product :) and please keep
             all header information intact. Cheers!
Pay-Pal info: hide@address.com
-----------------------------------------------------------------------
@access public
@author Richard Baskett <hide@address.com>
@category directory structure
@copyright Copyright © 2008, Baskettcase Web Development
@example example.php
@link http://www.baskettcase.com/classes/breadcrumb/
@package breadcrumb
@version 2.4.4

SIMPLE EXAMPLE: (copy between the == lines and paste to your file
  between your php tags)
=======================================================================
<?php
 include_once('class.breadcrumb.inc.php');
 $breadcrumb = new breadcrumb;
 echo "<p>".$breadcrumb->show_breadcrumb()."</p>";
?>
=======================================================================

COMPLEX EXAMPLE: (copy between the == lines and paste to your file)
=======================================================================
<?php
 include_once('class.breadcrumb.inc.php');
 $breadcrumb = new breadcrumb;
 $breadcrumb->homepage='homepage'; // sets the home directory name
 $breadcrumb->dirformat='ucfirst'; // Show the directory in this style
 $breadcrumb->symbol=' || '; // set the separator between directories 
 $breadcrumb->showfile=TRUE; // shows the file name in the path
 $breadcrumb->special='elmer'; // special directory formatting
 $breadcrumb->changeName=array('dirname1'=>'Directory Name 1',
                               'dirname2'=>'Directory Name 2',
                               'dirname3'=>'Directory Name 3',
                               'dirname4'=>'Directory Name 4');
 $breadcrumb->changeFileName=array($_SERVER['PHP_SELF']=>'Example Page',
                                   '/index.htm'=>'Contact Us');
 $breadcrumb->fileExists=array('index.htm','index.php','default.htm');
 $breadcrumb->cssClass='crumb'; // css class to use
 $breadcrumb->target='_top'; // frame target
 $breadcrumb->linkFile=TRUE; // Link the file to itself
 $breadcrumb->_toSpace=TRUE; // converts underscores to spaces
 echo "<p>".$breadcrumb->show_breadcrumb()."</p>";
?>
=======================================================================

DEFINITIONS: (Not setting any of these variables will result in the
              DEFAULT settings)
              
-----------------------------------------------------------------------
GLOBAL OPTIONS
-----------------------------------------------------------------------
(symbol) set the separator between directories (DEFAULT = ' > ')
-----------------------------------------------------------------------
(special) special directory formatting
   elmer = elmer fudd translation
   hacker = hacker speach translation
   pig = pig latin translation
   reverse = Reverses the text so it is backwards
   none = no special formatting (DEFAULT)
-----------------------------------------------------------------------
(cssClass) Use a css class to define the look of your breadcrumb.
  (DEFAULT = No css style
-----------------------------------------------------------------------
(_toSpace) Converts underscores '_' to a space in directory names.
  (DEFAULT = Keep underscores, no conversion
-----------------------------------------------------------------------
(target) set the frameset target value (DEFAULT '_self')
-----------------------------------------------------------------------

DIRECTORY OPTIONS
-----------------------------------------------------------------------
(homepage) sets the name of the home directory, leave empty if you do
   not want the home directory to show (DEFAULT = 'home')
-----------------------------------------------------------------------
(rootIndexLink) Sets the root index page link for those who have a
	splash page and do not want the home breadcrumb to take them to the
	splashpage. (DEFAULT = '/')
-----------------------------------------------------------------------
(unlinkCurrentDir) Remove the link to the current directory 
  (DEFAULT = FALSE)
-----------------------------------------------------------------------
(dirformat) can be of type:
   ucwords = uppers case words (use with _toSpace)
   titlecase = upper case words except small words (the, is, with, etc)
   ucfirst = upper case first letter
   uppercase = all uppercase
   lowercase = all lowercase
   none = show directories as they are named in path structure (DEFAULT)
-----------------------------------------------------------------------
(imagedir) use images instead of text to display your breadcrumbs. One
	can specify specific attributes of the images.  Path, type, border,
	id, name, alt, hspace, vspace, align, height, and width.
  (DEFAULT - 'path' = '', you need to specify the path for this
  	function to work, 'type' = 'gif', 'border' = '0', 'id' = directory
  	name, 'name' = directory name, 'alt' = directory name, unless used
  	in conjuction with the changeName function, then it will use the
  	changed name, 'hspace' = 0, 'vspace' = 0, 'align' = '', height = ''
  	width = '')
  IMPORTANT: You need to name your images the same as the actual
  	directory names.
-----------------------------------------------------------------------
(changeName) Directory mapping/alias.  Alias your actual directory name
  to one of your choosing. For example if your actual directory
  structure is /temp/educ/science/bio/ you can map each directory name
  to /Temporary/Education/Science/Biology and display it as such.
  (DEFAULT = No aliasing, display the actual directory name)
-----------------------------------------------------------------------
(removeDirs) remove directories from the breadcrumb. So for example if
   your breadcrumb looked like this:
   home > classes > help > status > test.php
   Using this function you can hide/remove the directory to show this:
   home > classes > help > text.php
-----------------------------------------------------------------------

FILE OPTIONS
-----------------------------------------------------------------------
(showfile) shows the file name in the path (DEFAULT = TRUE)
-----------------------------------------------------------------------
(fileExists) Link this directory only if one of the filenames exists
  Set your webservers default webpages that it checks for  when a 
  webpage has not been specified in the url.  So for example many 
  webservers look for a page called index.htm, index.html, index.php,
  default.htm, default.html, default.php.  Or you can use this variable 
  to just look for files you specify and link the directory if they
  exist.
  (DEFAULT = Link directories regardless of whether or not the
  directory has an index or default file)
-----------------------------------------------------------------------
(hideFileExt) hides the file extension (DEFAULT = FALSE)
-----------------------------------------------------------------------
(changeFileName) Filename mapping/alias.  Alias your file name to one 
  of your choosing. For example if your filename is example.php you can
  show it as 'Example Page'
  (DEFAULT = No aliasing
-----------------------------------------------------------------------
(linkFile) Links the file to itself (DEFAULT = FALSE)
-----------------------------------------------------------------------
Return current item: Breadcrumbs