1
wizanda
Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 11:43

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21




Tpl = less header made by Smarty for templates.
Html = implied header, made for web-pages.

Can anyone give a logical explanation, why XOOPS is using the wrong template files?

2
JCDunnart
Re: Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 11:55

  • JCDunnart

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/7/1 5


I think you need to read the Smarty manual.

Smarty uses compiled templates, which are native PHP. The template extension is irrelevant. And the obvious reason which I can think of for using .html is so designers can use normal html editors to design templates. Using the .html extension tells the editor which syntax to use for code highlighting.

3
wizanda
Re: Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 12:00

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Weaverslave saves html and tpl with the same extension, no difference, other then loading and caching on the server = less disk movement, faster, and less overhead on lots of templates used in a page rather then html; which with each additional block or item slows our sites down even more.
=

4
JCDunnart
Re: Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 12:21

  • JCDunnart

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/7/1 5


Why ask a question when you don't read the answer?

I'll try again.

Smarty does not serve .html pages. Templates are compiled into PHP and it is only php scripts which are requested and the output served to the client.

Again, I recommend you read the Smarty manual. You'll find all the answers there

5
wizanda
Re: Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 12:55

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Excuse me, please don’t be rude or assume I did read your answer and in reading lots of smarty Doc's lately is why i started to change over and use .tpl for templates.
These are then what produce our cache files used, as those are written by our servers to the cache folder and not template_c folder.
As template_c is for compiled PHP, which is then cached with the template files that are used and so then depending which sort of extensions, depends on the amount of resources used to write those cache files, to the cache folder.

Not template_c unless of course, we don’t have any cache on, and in which case what you are saying is correct.
Yet when mylinks and mydownloads on my own site contains lots of pages, that don’t change these are cached, as well as being compiled first to begin with.

So in making these templates .tpl and not .html, reduces writing, loading and overhead of pages displayed. As each html file thinks it needs a header and .tpl doesn’t. Proof is in the pudding and wouldn’t be asking if didn’t already know this works.

This also applies especially to any pages showing and having to include, comments.tpl, notifications.tpl, tagbar.tpl etc

So when that also has to include blocks.tpl, we have a much faster site and noticeably, and is where allot of our overhead is coming from.

6
gestroud
Re: Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 15:18

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


Wizanda raises a good point.

I've been testing out a lot of new and innovative CMS packages in the past few months. Very few of them (as well as their themes, plugins, extensions, and/or modules) use html files. The majority seem to use .tpl files these days. Some don't use them at all. Everything is set up in a config.php file or other .php files. They appear to run quite a bit faster than xoops, but I don't knowi if .tpl vs. .html vs. .php is the reason.

gestroud

7
BlueStocking
Re: Why does Xoops use .html, when it should be .tpl?

Why does XOOPS use .html, when it should be .tpl? ...wizanda

Wizanda,
I would guess it is a hold over from when the Google search engine gave preference to anything html.

Even today, Google tends to do that.
A index.html will be read first over an index.htm, and last is the consideration of index.php

The information contained in an html header carries more Google weight than information from a tpl header. And programmers like myself are more comfortable with the familiar html format.

A few years ago Google ignored long address lines and search engine position was more important than site speed.
Especially on static pages. I had over 2000 static pages displaying video tapes and used live person to communicate directly with my customers as they visited the page. They could see me... and made on the spot purchases. (paypal)

I learned back then, what was required and what was decremental search engine wise. My site was not the prettiest but it was number one in Google search. So much so you could click on the Google 'I feel lucky' link and get me for video tapes.

Needless to say, I am all out of tapes...

And an html addict, trying to break the habit but not really knowing why...

BS
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

8
wizanda
Re: Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 18:28

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Thxz that would make sense if it was the actual html page displayed to Google, or even the theme was displayed at the end result…….
Yet me theme is .js and me blocks are .tpl and functions and ranks the same, as the output is contained in the .PHP…..just seems allot more though now, as getting even more hits as the site can cope with more and after testing yesterday on the CBB low ranking thread, found parts as high as G-PR 1…..
So is there any chance we all might do this….

9
vaughan
Re: Why does Xoops use .html, when it should be .tpl?
  • 2007/4/20 18:56

  • vaughan

  • Friend of XOOPS

  • Posts: 680

  • Since: 2005/11/26


i always thought a template .tpl was just that.. a template in order to display content in the same manner each time to a specific layout, so in my opinion a template is just a template that specifies where & how the content is displayed. it is the backbone of the document being served not the content itself. or am i wrong?


definition: template:

1. a pattern, mold, or the like, usually consisting of a thin plate of wood or metal, serving as a gauge or guide in mechanical work.
2. anything that determines or serves as a pattern; a model: You can use my notes as a template for employee evaluations.
3. Building Trades. a horizontal piece, as of timber or stone, in a wall, to receive and distribute the pressure of a girder, beam, or the like.
4. Shipbuilding. either of two wedges in each of the temporary blocks forming the support for the keel of a ship while building.
5. Aerial Photogrammetry. any object having lines, slots, or straightedges to represent lines radiating from the center of a photograph, used for graphic triangulation.
6. Genetics. a strand of DNA or RNA that serves as a pattern for the synthesis of a complementary strand of nucleic acid or protein.
7. Computers. a. a small sheet or strip of cardboard, plastic, or the like, that fits over a portion of the keyboard and provides ready reference to the keystroke commands of a particular software program.
b. an electronic file with a predesigned, customized format and structure, as for a fax, letter, or expense report, ready to be filled in.

10
BlueStocking
Re: Why does Xoops use .html, when it should be .tpl?

Today,
I wanted hard hunting to be the criteria to be found.

Results 1 - 10 of about 10,500,000 for hard hunting. (0.18 seconds

Note the cache shows google picked up on the php version.
hard hunting

I didn't want to have to say in arkansas or put quotes or any of that jazz... simply when someone put hard hunting in the search box they were to get my son in laws information.
The criteria was the one he requested.

Bentonvideovisions still comes through very nicely even though I haven't had tapes in a couple of years.

This is just moving the google where I need him to be at this point in time.

I have a index.htm and an index.php on the site .. put in http://bentonvideovisions.com/index.php and you get the php version... different theme.

Sidenote: Why my sil wants to call it hard hunting is more than I can understand but so be it.... he is quadriplegic and hunting is hard for him....

What does this have to do with html or tpl headers...
It shows me that whatever XOOPS is doing, for me it is doing it right. I expected my search engine appeal to fall drastically with the length of time I have not been very actively promoting the site, having nothing of value to offer. And being able to show what I wanted or need to on a one page format.

BS
http://hardhunting.com/index.htm
http://hardhunting.com/index.php

Search engine hint for those who might be interested... ditch the graphics on the header and replace it with large size content related text.
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

Login

Who's Online

342 user(s) are online (272 user(s) are browsing Support Forums)


Members: 0


Guests: 342


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits