custom PHP in template

stefansjs

Joined: 2009-07-01
Posts: 1
Posted: Wed, 2009-07-01 17:47

My question is not so much of a problem, but a request for explanation that I can't find elsewhere. I'm trying to include a php function (specifically the banner and navigation) into my gallery. I've found how to change my theme.tpl to include any html I'd like, but I'd like to put some php code that I use for the rest of my website.
thank you

Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.4-2ubuntu5.6 apache2handler
Webserver = Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch
Database = mysqli 5.0.51a-3ubuntu5.4, lock.system=flock
Toolkits = ArchiveUpload, Ffmpeg, Getid3, ImageMagick, LinkItemToolkit, Thumbnail, Dcraw, NetPBM, Gd, SquareThumb
Acceleration = none, none
Operating system = Linux stefansmedia 2.6.24-24-generic #1 SMP Wed Apr 15 15:11:35 UTC 2009 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060309 Ubuntu/8.04 (hardy) Firefox/3.0.11
Rows in GalleryAccessMap table = 18
Rows in GalleryAccessSubscriberMap table = 41
Rows in GalleryUser table = 17
Rows in GalleryItem table = 38
Rows in GalleryAlbumItem table = 10
Rows in GalleryCacheMap table = 0

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9283
Posted: Wed, 2009-07-01 17:51

This should work:

{php}
PHP CODE HERE
{/php}

http://www.smarty.net/manual/en/language.function.php.php
http://smarty.net/

:)

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments