11
nachenko
Re: xoopswiki.org
  • 2007/6/11 10:04

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Thanks, BlueStocking.

It's right and good at this moment. Now i'm thinking about writing another article, something like: "Smarty tricks that can save your ass": reading loop iteration number, cycles inside cycles, using php functions inside samrty, calling blocks outside theme structure, cloning mainmenu so you can have mainmenu in one place and submenus on a different one via smarty... this kind of stuff.

12
BlueStocking
Re: xoopswiki.org

That is great...
sounds like you will be busy... and it is the kind of stuff I will enjoy reading.

Meanwhile...
FYI: I see a little edit that will have to be done on the h1 code. It activates. I'll change it to hl that is an L maybe that will serve the purpose. When wiki sees a h1 it creates an edit section. To edit the whole page we go to the top edit button.

I ended up simply copy and pasting your text into the wiki source page, then I did a look at properties on the image and copied and pasted the address to the proper place.

BlueStocking
EDIT: I did the edit and this is the new code.
_______________________________


== '''How XOOPS Rendered The Page You Are Viewing''' ==


''An article by Ignacio Segura, "nachenko" (http://www.pensamientosdivergentes.net)''
''Thanks to davidl2 and wtravel for reviewing.''

'''In this article we'll explain how the URL you wrote in the address bar became the nice page you're viewing at this moment.'''

XOOPS is a content management system (CMS for short). Such those systems allow two things:
1 - Provides visitors the look and content of the website, and
2 – Gives the webmaster the tools to manage this content.

There are many different systems out there, free and commercial, but all them work in similar ways. They get the contents from their database, put it together in a design template and send the whole burrito to the visitor. The differences among CMS is not what they do, but how they do it.

So how does it work? How has XOOPS provided you this article you're reading?

== The "what": Collecting the content ==


First thing to get is the content. An article, a list of products, photos... once we get it, we'll manage the problem of showing it to the user.

The URL you can read in your browser's address bar points to a PHP file. The first two things this file does are:

1 – Loads XOOPS config file: "mainfile.php". Now the script "knows" what is needed to locate a file or an entry in the database.

2 – Loads "header.php". This file then runs XOOPS engine.

At this point we still have to collect the content, but this is done in two separate processes. One process states what blocks are visible for this visitor (that is, you) at this address, and goes block after block to get their contents.

The other process gets the "main" content (that is, this article). In XOOPS, there's always a "main" content, a content that is not inside blocks. There's an exception to this rule, but that's all, just one: the starting page.
We won't talk about this "main" content, or the blocks, as every module does it it's own way. The only thing you have to know at this moment is that both the "blocks process" and the "main content process" do the same thing when they end: deliver all the info collected to the template engine.

http://xoops-tips.com/modules/news/images/code_flux.gif



== '''The "how": assembling the content in a template''' ==


In XOOPS, templates are simply HTML files that include special "markers" (we call them Smarty tags) to tell the system where to put the content. A “piece of template” for an article could be something like this:


<{$article.title}>



<{$article.abstract}>






<{$article.text}>




Embedded in the HTML code, these red items are the tags that will be replaced by the appropiated content. The title of the article, the abstract, the text... Something named "template engine" makes the replacing. There are many template engines out there. XOOPS uses Smarty (smarty.php.net). This engine can do a lot of things, but this is not the scope of this article. The only thing we want you to know at this moment is the difference between a Smarty tag and a HTML tag.

· This is a HTML tag:
· This is a Smarty tag: <{tag}>
· This is a variable into a Smarty tag: <{$variable}>

Notice the { } symbols. The <{ and }> is used to identify a Smarty tag.

Enough about markers. Let's talk about the templates. In XOOPS, blocks can have 8 different locations around the main content. In the default theme, they are organized this way:


http://xoops-tips.com/modules/news/images/block_locations.gif

http://xoops-tips.com/modules/news/images/block_templates.gif


You see, blocks surround the main content. It's a cascade structure: theme file calls:
1 – A CSS file that controls everything.
2 – Main content template.
3 – A template for every block location, and these load every block's template.

http://xoops-tips.com/modules/news/images/template_flux.gif


The appropiate Smarty tags are then replaced. The page is finished and ready to be shown to the visitor.

That's all!
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

13
giba
Re: xoopswiki.org
  • 2007/6/11 10:51

  • giba

  • Just can't stay away

  • Posts: 638

  • Since: 2003/4/26


Exlent BS

14
instantzero
Re: xoopswiki.org

Hello Jen,

Quote:

jensclas wrote:
Hi Blue Stocking


That's great to see you

Documentation is like development, there are a lot of treasures in the local support sites.
What about a common work ?
A common plan, then a common documentation and to finish, everybody translate it in his/her own language.
Like this we could have a unique documentation, available in many languages.

15
davidl2
Re: xoopswiki.org
  • 2007/6/11 11:07

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Agree with you, again. That is one of the goals of XoopsWiki

To allow people to work together, and to produce the definitive documentation - and to allow people to work on translations together.

I know I've tried before now with the French documentation of the News modules ... which was a very well written document - but my poor level of French was not up to the translation challenge. But perhaps others could have tacked this and done a better job

16
instantzero
Re: xoopswiki.org

Quote:

davidl2 wrote:
Agree with you, again. That is one of the goals of XoopsWiki

To allow people to work together, and to produce the definitive documentation - and to allow people to work on translations together.

Such actions should be echoed in the local supports more easily and quickly.

The project could won many things with more communication.

17
davidl2
Re: xoopswiki.org
  • 2007/6/11 11:29

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


The facility is available for ALL people to use - regardless of their language...

18
instantzero
Re: xoopswiki.org

Quote:

davidl2 wrote:
The facility is available for ALL people to use - regardless of their language...

David, I don't criticize the wiki, that's an excellent idea, I'm just saying that things could be made more quickly if everybody knew of its existence

19
debianus
Re: xoopswiki.org
  • 2007/6/11 12:11

  • debianus

  • Not too shy to talk

  • Posts: 179

  • Since: 2006/12/17


Quote:

instantzero wrote:
Documentation is like development, there are a lot of treasures in the local support sites.
What about a common work ?
A common plan, then a common documentation and to finish, everybody translate it in his/her own language.
Like this we could have a unique documentation, available in many languages.


Quote:

davidl2 wrote:
To allow people to work together, and to produce the definitive documentation - and to allow people to work on translations together.


Excelent:
The documentation must be common but avalaible in many languages as to be possible in a only one place.
Look at opensuse.org. The start page allows to choice the language and here: in each page there is a list with all languages in a page is avalaible

Work together allow to exchange handbooks, tutorials, tips between documentation teams of several countries. If there is an excelent tutorial in XOOPS argentina it is lost for do not speak spanish; id. polish support, dutch support etc.

20
jensclas
Re: xoopswiki.org

Hi everyone

What I am seeing here is exciting - thanks for contributing. I guess I am just waiting for a little clarity.

- who will be on the documentation team to begin with and lay the foundations of where too from here
- then lets get together and work on some guidelines, in the meantime collect as many docs as what are out there

Blue stocking you may have a big job on your hands putting things into the wiki....and I need to learn more about how it works myself so I look forward to being taught a bit more about that too. And yes...we need to help each other get it out there in different languages! So...once we have a 'home' we would need to start with getting to know each other and our skills surely.

Perhaps it is time to go through the posts from the teams forum and identify those who have said they wish to be part of documentation. What do you think? I will have time to do this tonight (I am fast running out of time this morning!)

jen

Login

Who's Online

420 user(s) are online (305 user(s) are browsing Support Forums)


Members: 0


Guests: 420


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits