-Theme support is very rudimentary, basically you create functions for each of the parts of the template, and put them in a file named the same as the theme. The functions that you need to declare are as follows:
- bpgallery_ThemeName_head()
- what's it for?:
- This sets up the header for the page, generally
- everything until the first picture. So, the title bar
- and any menus you would like to use
- available variables:
- $TITLE - the title for the index page
- bpgallery_ThemeName_tail()
- what's it for?:
- Closes the page, is the last thing to be printed.
- available variables:
- None
- bpgallery_ThemeName_description()
- what's it for?:
- if there's a description set up (i.e. a description.txt
- file) then this is what it'll be wrapped in. It comes
- just after the _head.
- available variables:
- $DESCRIPTION - the content of description.txt
- bpgallery_ThemeName_stylesheet()
- what's if for?:
- It generates the stylesheet for the page.
- available variables:
- $WIDTH - the width of the images
- $MAXHEIGHT - the maximum height of the image
- bpgallery_ThemeName_thumbsline()
- what's it for?:
- Whatever is in here is generated per thumbnail.
- available variables:
- $filename - the name of the file
- $caption - the caption as got from captions.txt
+Theme support is very rudimentary, basically you create functions for each of
+the parts of the template, and put them in a file named the same as the theme.
+The functions that you need to declare are as follows:
+
+ Available in all templates:
+ ${BASEURL}
+ Base directory (will generate ../ when making pages in a
+ subdirectory for getting to the generated stylesheet or to the
+ index page)
+
+ bpgallery_ThemeName_head()
+ what's it for?:
+ This sets up the header for the page, generally
+ everything until the first picture. So, the title bar
+ and any menus you would like to use
+ available variables:
+ $TITLE - the title for the index page
+ bpgallery_ThemeName_tail()
+ what's it for?:
+ Closes the page, is the last thing to be printed.
+ available variables:
+ None
+ bpgallery_ThemeName_description()
+ what's it for?:
+ if there's a description set up (i.e. a description.txt
+ file) then this is what it'll be wrapped in. It comes
+ just after the _head.
+ available variables:
+ $DESCRIPTION - the content of description.txt
+ bpgallery_ThemeName_stylesheet()
+ what's if for?:
+ It generates the stylesheet for the page.
+ available variables:
+ $WIDTH - the width of the images
+ $MAXWIDTH - the maximum width of the images
+ $MAXHEIGHT - the maximum height of the images
+ bpgallery_ThemeName_thumbsline()
+ what's it for?:
+ Whatever is in here is generated per thumbnail.
+ available variables:
+ $link - the page/image to link to
+ $filename - the name of the file
+ $caption - the caption as got from captions.txt
+ bpgallery_ThemeName_page()
+ what's it for?:
+ It generates the pages for fullsize image pages
+ available variables:
+ $filename - the name of the image
+ $previouspage - the URL for the previous page
+ $currentpage - the url for the current page
+ $nextpage - the url for the next page
+ $caption - the image caption