PS Anybody remember that SNL commercial "Adobe the little red car that's made out of clay?"
.tpl file extensions
Moderator: General Moderators
.tpl file extensions
What gives with giving template files .tpl extensions? Why can't developers use a normal accepted web extension for html? You know -- ".html." Template classes will take, .html, .htm, or .txt file extensions? Adobe Photoshop has claimed the ".tpl" extension. They overwrite the headers on everyfile on the hard drive that has .tpl. It's horribly annoying because my webserver won't recognize the headers and so won't display the html correctly if at all. So? Why ".tpl" ---- Does anybody else get annoyed when developers get 'creative' with their file extensions?
PS Anybody remember that SNL commercial "Adobe the little red car that's made out of clay?"
PS Anybody remember that SNL commercial "Adobe the little red car that's made out of clay?"
I'm confused.
You mention that the webserver cannot display the html if it's in the *.tpl file? So far *.tpl isn't widely used for anything else than Smarty (or other similiar template systems).
It shouldn't be parsed by the webserver as is, but rather processed by the template system(s) before showing it. Hence the name, template.
Or did I completely misunderstand you? =)
You mention that the webserver cannot display the html if it's in the *.tpl file? So far *.tpl isn't widely used for anything else than Smarty (or other similiar template systems).
It shouldn't be parsed by the webserver as is, but rather processed by the template system(s) before showing it. Hence the name, template.
Or did I completely misunderstand you? =)
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
extensions are purely arbitrary, since it's the data contained inside that tells us what the file really is.. unfortunately, file identity is lost of a lot of applications. I guess that's a bonus of the Mac file system. At any rate, .tpl just tries to signify to php and potentially other programmers that a template is probably inside the file. It can be HTML, or plain text.. or anything else the developer of the tools decided on. You can rename them all to .tpl.php or whatever you want.. it's arbitrary. The tool just needs to know what to look for.
http://filext.com/detaillist.php?extdetail=TPL
If you look there, you'll notice that .tpl is used by a lot of applications.
http://filext.com/detaillist.php?extdetail=TPL
If you look there, you'll notice that .tpl is used by a lot of applications.
.tpls
I think you might be hitting on what I'm experiencing Feyd. Photoshop stores it's doutone styles in a ".tpl" files. On my mac I think the headers or something might be getting messed up because once any file with the .tpl extension hits my file system It gets corrupted or something. It won't display properly on my server. Thus the rant.feyd wrote:extensions are purely arbitrary, since it's the data contained inside that tells us what the file really is.. unfortunately, file identity is lost of a lot of applications. I guess that's a bonus of the Mac file system.
But I still think it's loads better when people stick to well known and established file extensions. Who knows what ".tpl" is outside of the PHP community? And what is a template file but HTML with bracked variables? Throw it in a "template" directory and make em ".html"
I've not had this file extension problem on windows or linux.
Anybody else have this problem on a Mac system?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
haven't been using a Mac for long huh? 
sorry.. ResEdit:
http://www.google.com/search?hl=en&c2co ... dit+%2Bmac
sorry.. ResEdit:
http://www.google.com/search?hl=en&c2co ... dit+%2Bmac
Re: .tpls
Simple: They are *NOT* html.neophyte wrote: But I still think it's loads better when people stick to well known and established file extensions. Who knows what ".tpl" is outside of the PHP community? And what is a template file but HTML with bracked variables? Throw it in a "template" directory and make em ".html"
They arent valid html, they arent meant to be viewed directly, and putting .html on their extension will cause some webservers to offer them up AS legitimate html - which they arent.
Can a template BE valid html? Sure. But templates by definition (containing bracketed variables, possibly logic structures, and even php code), are not html.
So lets restate the question:
Q: Why would you want templates to be called something they arent?
A: Because of a unique bug you are experiencing in MacOS.
Doesnt sound like a template extension naming issue, from where I sit.
Re: .tpls
True, so why not use ".txt"?Roja wrote:Simple: They are *NOT* html.
So someone browsing through a templates directory might see garbled html on their screen?Roja wrote:They arent valid html, they arent meant to be viewed directly, and putting .html on their extension will cause some webservers to offer them up AS legitimate html - which they arent.
True. Templates are definitely not vaild html. Although they do contain some html tagsRoja wrote:Can a template BE valid html? Sure. But templates by definition (containing bracketed variables, possibly logic structures, and even php code), are not html.
Ohhhhhh Mac hater.Roja wrote:So lets restate the question:
Q: Why would you want templates to be called something they arent?
A: Because of a unique bug you are experiencing in MacOS.
Doesnt sound like a template extension naming issue, from where I sit.
I have to admit this is a pretty annoying problem for a mac user. This isn't entirely about macs.
Extensions do matter, try using php without a ".php" extension.
Someone, somewhere decided ".tpl" should be used for template files.
I'm just wondering why? Why use .tpl? It's just a text file. It's not "valid" html, and with out the template class to convert it into "valid" html it's just text.
Everyone has used .tpl as an extension for template files. I have. The Smarty docs suggest people should use it.
Isn't always better to stick with well established naming conventions?
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA