s9y >= 2.0 "default" smarty templates

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

s9y >= 2.0 "default" smarty templates

Post by Don Chambers »

So.... probably mentioned in the months I was in hibernation, but is 2k11 the new "default" folder for smarty templates? If I do a theme, and a particular tpl is not defined in my theme, is the file loaded from 2k11 or still from 'default' or 'bulletproof'? If I want to make subtle (or major) alterations to a specific tpl, do I start with one from 2k11, default, or something else? I don't want to take 10 steps backward by using the wrong prototype.

@YL - is 2k11 a good source to prototype tpl's, or are those files too custom?
=Don=
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by onli »

2k11 is the new default theme, templates will be taken from there first. You could change the template engine to change that, though that should never be necessary for a new theme.

I built photo based on 2k11. It is not at all too custom imo. To the contrary: since there is no other html5 base, it's the only option.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by yellowled »

Don Chambers wrote:is 2k11 a good source to prototype tpl's, or are those files too custom?
As always, it really depends on what you intend to do.

2k11 is a reponsive HTML5 theme, but it is not mobile-first. It probably has some code not any theme needs, but was built as a potential default theme from the beginning. It does not have many theme options to avoid feature creep like in BP. Other than that, I can't really say if it's a good base to start from or not – that really depends on how you works and what you want to do with it.

I would not compare it to “starter themes” like WP has them. (You know, those barebones themes which usually have all the template files, but not much theme-specific CSS or JS.)

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by Don Chambers »

Ok, so if I do a theme that has only index.tpl, and style.css, all other smarty template files will be rendered from 2k11?

How do I change the template engine? Let's say, for giggles, I wanted the "parent" theme to be bulletproof... I assume there is something either in config.inc.php or info.txt?

Further suppose that I have a template, with a template engine other than 2k11, and it is missing a particular smarty template as well. Does it then fall back to 2k11?
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by Don Chambers »

Nevermind - this is exactly what happens, which is a problem for this guy, which I will respond to there.
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by yellowled »

Don Chambers wrote:Ok, so if I do a theme that has only index.tpl, and style.css, all other smarty template files will be rendered from 2k11?
This is really more of a question for Garvin, Ian or Malte, but I think so.
Don Chambers wrote:How do I change the template engine? Let's say, for giggles, I wanted the "parent" theme to be bulletproof... I assume there is something either in config.inc.php or info.txt?
Dude, this is really old news, how long have you been under the radar?! :wink:

http://board.s9y.org/viewtopic.php?p=10419760#p10419760
Don Chambers wrote:Further suppose that I have a template, with a template engine other than 2k11, and it is missing a particular smarty template as well. Does it then fall back to 2k11?
I think in that case, it would still fall back to default, unless said engine theme (we chose to call them “themes” from now on, not templates, by the way) has that file. That means:

* first, check if the theme does have the tpl file
* if not, check if the engine theme(s) have the tpl file
* if all fails, get the tpl file from default

Not positive on this, though. I have never really played with engine themes, I prefer to start from scratch each time. :mrgreen:

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by Don Chambers »

Oh... THAT template engine stuff. Completely forgot about it! :oops:
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by yellowled »

Something I wanted to add about using 2k11 as a starter theme, though … although it now is the standard theme in new s9y installations, it's still called 2k11.

Meaning it's been developed for about 3 and a half years, which means most of the code is that old. Concerning the tpl files, that should not really matter much (although I'm sure some Smarty 3 improvements could be made). But in terms of CSS and JS, this is not really the latest and greatest. It is “solid” and customizable through the user.css generator, which is why is very popular. (It's probably also very popular because it is one of the very few responsive HTML5 themes for s9y.)

3 and a half years doesn't sound all that much, but for frontend development, that's dog years. There is a lot of stuff in it that I would not use if I were to rewrite it into a 2k15 now (sadly, I don't have much time for that at the moment). I would write mobile-first CSS. I would not use the select-type mobile menu. I would not include the iOS Orientationchange fix (it's no longer necessary these days) or Respond.js (same). I would drop IE7 support altogether, maybe even IE8 support, use rem instead of em for most units … boy, I would have a lot to do if I had the time for it. :wink:

What I'm trying to say is: just because this is the most modern theme available for s9y, it is not necessarily the most modern theme, period. Taking 2k11 as a starter theme for new ones might be quick and easy, but it might not be the wisest idea to just take it and change some things. There is lots of room for improvement.

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: s9y >= 2.0 "default" smarty templates

Post by Don Chambers »

Its still a good theme... lots to learn from it. I'm working on a new theme now, just to teach myself some of the latest stuff.
=Don=
Post Reply