TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,815
  • Total Topics: 21,284
  • Online today: 63
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 84
  • Total: 84

Flexible templating

Started by General_Sun, July 22, 2007, 03:48:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

General_Sun

The templating right now... is a complete bitch.  ;D I'll show my website here after I'm done with it, but it's insane. I'm not an expert on this, but I imagine that using smarty or Xtemplate or some such would make things much better and much more flexible! Right now this is about as flexible as a block of cement.

;D

I'm thinking, perhaps a different template for front page and the articles? Currently I'm using the tportal template for the front page and SSI for the themes... Hardly ideal!  :o

Edit: It would also be nice if there were less tables and more css,  ;D

IchBin

That depends on the theme you use. Perhaps you could explain what is a bitch, and not just complain about it? I don't mind if people want to complain, but I'd rather you tell me what it is you're complaining about like you did with the more css comment. :) IMO, I've never seen such a powerful theming system such as SMF has. You just have to learn how to use it.

General_Sun

The coding is too much integrated with the design. One cannot easily swap around code elements without running into design issues and vice-versa. The whole thing's an echo-maze... Some functions are parsed are not parsed as php when they should be... I'm not saying it's impossible, just a lot o harder than it should be.

I'm using the default theme and that is what I'm talking about.

IchBin

Thats what I thought at first as well. But you will come to realize the power of it. You can do alot more with it once you learn it.

General_Sun

Could you give some examples? What I did with my site... and this is *probably not what you meant, but I took tportal.template, deleted EVERYTHING, and wrote my own design. :P

IchBin

While I can't give you code examples for time availability I can give you an example of what can be done. TinyPortal has required the index.template.php file to be altered in order to use the TP features in the theme. Bloc figured out a way with the theme to be able to not have to modify it now. The SMF theme system uses layers. That why when you look at the index.template.php file you see the template_main_above function and the template_main_below function. These two functions are the top and bottom layer of the page. Now when you visit a page like the boardindex, search, profile, all of these template load into the layer template_main() function which is in between the previous mentioned functions. This is a HUGE leap for TP IMO. Not having to alter the theme will make a lot of theme problems disappear. :) Anywho, that gives you basic idea of how the layers work. You can create your own layers as well. If you look at what Bloc has done in some of his more recent themes you can see how he has given you the option to have additional custom pages using this layer system.

This website is proudly hosted on Crocweb Cloud Website Hosting.