Thread: 2 Suggestions
View Single Post
Old December 24th, 2004, 12:03 PM   #12 (permalink)
KW802
Registered User
Verified Customer
 
KW802's Avatar
 
Join Date: Nov 2005
Posts: 1,400
Re: 2 Suggestions

Quote:
Originally Posted by StewardManscat
Etc etc. In other words, let us build the anchor and image tags in the template.
I'd have to vote the opposite and keeping it as it as. By constructing the URL in the PHP there is a lot more flexibility available in what you can do (PHP is just a tad more powerful than VB's conditionals ) plus then it allows you to keep your templates as compact as possible.

Example: http://www.coolscifi.com/gallery/browseimages.php?c=31

Click on any of the SWF files.... I was able to change the PHP file really easily to play the flash files inline. In the PHP I have a lot more information available to me so I was able to do some code that will automatically specify the SWF's height & width based upon the values I have in my Gallery's file types table for the "SWF" entry I created. In other words, I have configured SWF in Gallery in the ACP with a max height of 600 and a max width of 600 and if a SWF is smaller than those dimensions then it'll play full size but if it's larger than those dimensions then the height & width parameters in the resulting HTML is automatically scaled back to keep the output within my max dimension. .... without having to make any template changes.

Trying to do that same type of functionality in just the templates alone would've been a major headache and some hard-coding.
KW802 is offline   Reply With Quote