The Matrix theme.inc
If you want to focus on changing the layout and style in your theme, but are pretty much satisfied with the content you find in an existing theme, then you shouldn't have to do too much with the PHP code in theme.inc. But if you want to further modify the content that your theme displays, you'll likely need to modify the code. The explanations here make the assumption that you don't know too much about PHP or programming in general. However, knowledge of a small amount of PHP will definitely enhance your understanding of what's going on.
<?php
/** * @version $Revision$ $Date$ * @package Gallery * @author Bharat Mediratta <bharat@menalto.com> */ /** * This implements the standard gallery theme * * @package GalleryTheme * @subpackage Theme */
class MatrixTheme extends GalleryTheme {
/** * Constructor */ function MatrixTheme() { global $gallery;
The rest of the function simply sets up the theme. When you're creating your own theme, you'd insert the name of your theme into the appropriate places, and modify the settings to suit your needs.
$this->setId('matrix'); $this->setName($gallery->i18n('Matrix')); $this->setDescription($gallery->i18n('Standard Gallery2 look and feel)); $this->setVersion('1.0.0'); $this->setRequiredCoreApi(array(7, 0)); $this->setRequiredThemeApi(array(2, 1)); $this->setStandardSettings( array('rows' => 3, 'columns' => 3, 'showImageOwner' => 0, 'showAlbumOwner' => 1, 'albumFrame' => , 'itemFrame' => , 'photoFrame' => , 'colorpack' => , 'showMicroThumbs' => 0, 'sidebarBlocks' => serialize(array( array('search.SearchBlock', array('showAdvancedLink' => true)), array('core.ItemLinks', array('useDropdown' => false)), array('core.PeerList', array()), array('imageblock.ImageBlock', array()))), 'albumBlocks' => serialize(array( array('comment.ViewComments', array()))), 'photoBlocks' => serialize(array( array('exif.ExifInfo', array()), array('comment.ViewComments', array()))))); }