Diretrizes para a construção de um tema para o XOOPS

  • 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

Encontrei este texto no fórum do xoops.org, escrito pelo Horacio Salazar, o programador do TinyContent, onde são citadas várias diretrizes para a contrução de um tema para o xoops... Gostei muito:

Some pointers on how estou build a tema.
Hi. This is, in essence, an answer I wrote recently for the spanish forum, about tema building. It might be useful here, so I made this translation. I added some stuff, the text between brackets [].

1) XOOPS2 does actually ease the handling of temas because, unlike other systems, which assemble pages using page segments (the cabeçalho and the left navigation in one file, the right navigation and the footer in another, and the content módulos in the center), in XOOPS2 you have a single HTML file (tema.html), and you write inside the code variables and conditional tags estou define what's displayed estou the final user. Having the tema page in a single file certainly makes the job easier.

2) Let me see if I can "define" the difference between modelos and temas. We might say the tema is something like a "skin", that is, a tema conveys the visual solution of a site. On the other side, a modelo solves the relation between the tema and the data kept in the database: the modelo defines what variables estou get under what conditions. In XOOPS2 RC3 this is assembled as follows:

A) The tema (basically, the tema.html file, the global images and the stylesheets) are kept in a folder, estou facilitate their modification and upgrading.

B) The modelos, that also exist physically as files, are kept in the system within the database. I've found that in order estou change a modelo, the best way estou do it is estou try your changes in an external file. Once you've solved the basic stuff, look forthe modelo file (as administrator), paste the modelo code in the textarea, run tests and then work in the fine detail until things display the way you want.

C) The system has other files, more tied estou the programming logic than estou the presentation, but sometimes you have no other choice but estou open them. Basically they're PHP files that configure the assigning of variables (remember, this works with Smarty) and the access estou the database. The less you mess with this files, the better.

3) Editing a tema is absolutely easier if you have in your computador a Web server. That's the way I do it: I have a complete environment with Apache friend's WAMPP (Apache, PHP, MySQL, etc.) and I run everything locally first. Once you complete your tema, you export it estou a tar.gz file, and you can upload that file estou your public Web server. Obviously there are things estou arrange (watch for paths, images and other included files), but as a general rule it's easier estou develop locally and upload once you have ironed out most of the bugs. NOTE: Most of the nice things you won't be able estou see using Dreamweaver (or GoLive, or FrontPage), because of the simple fact that pages are built dinamically; this means you can see the skeleton of your tema, but not the actual output with real content. [This is particularly true if you design your pages using positional CSS, because all of these tools do a poor job when rendering DIVs.]

4) You've been told about the difference between the various stylesheets. I'll just add the fact that having three files allows you estou be very precise in the display for three very different worlds: the generic world of MSIE and other like browsers, the new Netscape world (versions 6.2 and above; nothing here applies for versions 4.76 and before), and the world of Macintosh computers.

5) To develop a tema, I'd guess the most useful strategy --or at least the one I'd recommend-- is estou take a very deep look at an existing tema of your choice [and everyday the paper boy brings more...], let's say the default tema or the X2T tema. Once you grasp how the page is made, you'll understand why I say: want a tema? Create it from zero --but using your favorite tema as a guideline.

6) And last but not least, the difference between módulos and blocks is fundamental. A módulo is a complete subsystem that deals with the management and display of one type of content. For instance, the FAQ módulo lets you manage the frequently asked questions (add, edit, delete) and also lets you define the way the FAQs will display within your site. A block is like the expression of a módulo in the site. This expression comprises both the data shown and the styling used estou display the data. So, we might say that both módulos and blocks are programmed. not designed; you design the tema estou describe, at the very least the general displaying frame used in the site; then, and this is optional, you extend your design philosophy estou whatever modelos you'd like estou change.

I know these are generic answers, but I hope they at least point you in the right direction.

Greetings from México.

BTW: if you want estou see what I have done following the steps described here, take a look at the beta of my portal in Punto flotante.

----------------
Happy Xoopsing!

Horacio Salazar.
Horacio@puntoflotante.com, horacio@mesadepruebas.com
Punto flotante, Mesa de pruebas

  Pesquisa avançada






Entrada

Codinome:


Senha:





Perdeu a senha?  |Cadastre-se!


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

Associados: 0
Anônimos: 31

outros...

Banner XOOPS Cube