In G3, during processing, many data items are available.
For item and user, you have access to everything that's in its database
For instance, to see the complete current list of available variables
in an item object you can do:
mysql -uroot -e "describe items" g3dev
Here is a list of available data in the current (25 Nov, 2008) G3 development build:
Common variables on album and photo pages:
- $item: a photo or album
- type: currently only "album" or "photo")
- name: the name of the photo file or album dir
- left, right: (internal) used for MPTT tree management
- parent: the parent item, eg: $theme->item()->parent()->title
- level: (internal) how far down in the tree this item is
- width, height: dims of original image, null for albums
- thumbnail_width, thumbnail_height: dims of thumbnail
- resize_width, resize_height: dims of resize
- owner: a user, eg: $theme->item()->owner()->id
- $children: an array of photos and albums to display
- $parents: an array of the parents of this item, in order
- $theme: the theme class
- url($path): return url to a file, relative to current theme
- item(): return current item
- display($file): find and include "$file.php"
- pager(): print out a pagination bar (eg first/prev/next/last)
<insertion points>: listed in my other email
- name: login name eg "joe"
- display_name: full name eg "Joe Smith"
- password: hashed password
- Album page:
- $page_size: number of elements to show on the page