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: 196,022
  • Total Topics: 21,332
  • Online today: 899
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 588
  • Total: 588

Block templates

Started by Xarcell, May 04, 2006, 02:56:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xarcell

I wonder if it would be a good idea to have an option where you can select basic block templates per block created. Would this me more drag on SMF/TP?

I was just thinking how it has been considered adding blocks to articles, and maybe even displaying certain blocks on certain pages.

It would be nice to able to select a template per block. We could start out with something basic. Eventually, theme designers can add different block templates to their themes. How hot is that?

-Xarcell, brainstorming

bloc

Not a bad idea..I see css can really be the turning point here though. If we put up block code snippets with individual classes defined in them - or simply using a pre-set range of block specific classes, the theme designers could simply define the styles in their themes if they choose - or the users of course. Like for example the recent topics block code snippet..instead of using tborder/borcolor/windowbg I could make it with rt_tborder, rt_windowbg etc.

The trouble is if a theme do not define the classes, it would show them without styles...

On the other hand, this really calls for a standard way of defining block code snippets  - I have already sniffed at setting those up in xml format. So a snippet could be like:

<title>Recent topics</title>
<version>1.0</version>
<code>
..the php code....
</code>
<blocktype>php</blocktype>

TP could then fetch this xml file, store it, and compare version to "update" if necessary. Sort of "mini" package manager, but only for block codes.

G6Cad


Xarcell

Couldn't we add a default style for blocks to style.css? ven manually this could be done easily.

I love the xml idea. It would really help keep things clean i think. I don't have much experince in this area, so I leave it up to you.

Whatever you think is best.

bloc

I have already added in styles for the sitemap block in default theme's style.css. I see why not we could have it going further - with styles for a block and each bar(left/center/right/front) for example. Trouble is that they have to be defined in every theme that TP use. For my own themes its no problem, but for others it will require some work, since then TPortalBlocks will call these custom classes instead of the ones that also SMF use.

This website is proudly hosted on Crocweb Cloud Website Hosting.