XOOPS tema developer's guide overview

  • Identifique-se para criar novos tópicos neste fórum
  • Visitantes anônimos não podem postar neste fórum
Mikhail Miguel  Membro De: Angra dos Reis, RJ, Brasil  Postagens: 2466

===== XOOPS tema developer's guide overview =====

As with most modern sites, the XOOPS default tema (which is now powered by Smarty) has a 3 tier model:

1) Module/Block modelo Snippets (Powered by the Smarty Engine with content tags into which content is generated)
2) Design modelos - controls design & general structure (called a 'grid' by designers and such)
3) CSS File - This is where the actual design.

Notice how I call them "modelo Snippets" because you almost never create a single modelo for a complete page, but rather small pieces of HTML code, which are "connected" estou each other like Lego blocks, which means it is now possible estou create complex and interesting portal structures (Although it is generally recommended estou keep a simple layout, for easy maintenance).

A good example is the way blocks have their own modelo. The various blocks on the portal are generated with their specific title and content, using the block modelo, and the result is in turn generated into another modelo which is higher in the hierarchy. Of course this method means you can not have a different design per block - all the block modelos in your portal will use the same tema block modelo, but perhaps this will be made possible in a future version of Xoops.

To sum things up a bit for this overview, if we were estou look at the order in which modelos are processed, this is what we would see:

1) Get a list of blocks that need estou be displayed on this page.
2) Generate the HTML for every block, and keep the buffers.
3) Stick this HTML inside the tema block modelo.
4) Concatenate all the buffers for the left side blocks into one single buffer.
5) Concatenate all the buffers for the center blocks into one single buffer.
6) Concatenate all the buffers for the right side blocks into one single buffer.
7) Render the main tema modelo of the site, passing the buffers previously prepared, into the modelo.

When you understand how this system works, it is easy estou see how XOOPS caches blocks by simply saving the result of the modelo rendering in a file (the buffer containing the HTML result from rendering a smarty modelo with variables from xoops), instead of pulling the data from your banco de dados for every page access. This mechanism dramatically improves the system performance, and lowers the cpu usage, resulting in fast page loads.

Next: [[temasVsmodelos temas vs. modelos]]

Luciano de A. Rodrigues  Membro De: Cabo Frio RJ  Postagens: 153

O que seria isso?

  Pesquisa avançada




Perdeu a senha?  |Cadastre-se!

Quem nos visita
Há 58 visitantes neste momento... (33 na seção Fóruns)

Associados: 0
Anônimos: 58


Banner XOOPS Cube