Old Design


NOTE: This is oldstuff, about the PHP-version of LogiLogi, the new one will be in Ruby (on Rails), have a look at LogiLogiManta

Here is a short outline of what it all is, for developers and other interested people to read.

The basic wiki, template-system and parse-engine structure of TaVi is used in this project.

The main layout

if an user visits, lib/main.php is loaded first,
that one reads in all the vars, and then loads an action (action/actionname.php),
depending on the vars.

The action proceeds, and then calls the template
(template/actionname.php most of the times).

Each template adds the layout of the inner page, as far as there is something custom to add.

Lastly, each template calls template/common.php, which places everyting around the inner page.

The callings happen with the use of $args, which are key-value arrays specifying what in Java is called arguments.

The parser

You will undoubtedly run across calls to parseText(... ... ...)

That brings us to the parseEngines which are specified in lib/defaults.php, where the contents of the key-value array are actually function names that appear in parse/transforms.php and parse/macros.php
(the more complicated things like pageindex and transclude)

These functions are called in the order listed there, with each line of the page that is to be processed. Regexps and so on inside these functions to check for the individual matches, and to act upon them if
neccesary.

Sections

alias is the url the user entered
page is the page that is actually viewed

When an user enters an url the .htaccess apache urlrewrite rewrites it into an action command for the index.php which includes the part after the first / as the pagename.

This pagename is then set as the value for alias on line 199 of main.php. Where in the following lines the alias_determine_page determines the page that should be shown for this alias.

ikwid stands for an "I Know What I Do". When an user clicks a red colored link in the upper bar for example, he wants that alias to become a new page, and that alias only, and no "smart" system that gives him the nearest page for the alias. Also the language-buttons are examples of ikwid's.

Also ikwid is set to -1 as a quick hack to overcome the problem that an user can ikwid a page while that page contains transcludes. Transcludes do not need to be parsed with ikwid 1, and therefore it is specified as -1 for each pageread that occurs within a transclude.

The $area that is used in parsing the html_section_menu is the pagename
stripped of everything after the last / So that's the section
effectively.

DataBase

The Database layout of LogiLogi is as follows

alias
archive
counter_de
counter_en
counter_es
counter_fr
counter_it
counter_nl
links
pages
pages_de
pages_en
pages_es
pages_fr
pages_it
pages_nl
rate
years

  • alias is the table that contains the aliasses. Aliasses are at this point regardless of language, and for all pages that exist an alias to itself is present, besides the aliasses that might point from the destination of a link to a page somewhere else in the section-tree.
  • archive contains the empty pages that have been removed using the admin/maintain.php script, this to make up for the possibillity that pages are deleted by accident (as for the alias system to be kept neat and tidy, empty pages are deleted instantly, and not seven days after their change to empty state).
  • counter_<languagecode> contains the counter field for each page in the system
  • links contains all links that link out of each page (for each language). Links always point to an alias.
  • pages contains each pagename in the system and it's language.
  • pages_<languagecode> contains the main content for each page, as wel as old versions of non-empty pages that are no older than (default) seven days.
  • rate contains data about visitor's ip's to limit the amount of systemresources that each user may use.
  • years comparable to links, but this one contains years, especially usefull for historians

More info
Part of the LogiLogi Network: The LogiLogi Foundation - LogiLogi.org - OgOg.org
This is an old version for archival purposes, see www.LogiLogi.org for the current version.
< Edit this document | View history | Printer friendly (inc. links) >
Visited 2193 times
Document last modified Sun, 27 Aug 2006 16:36:28
All content is available under the GNU Free Documentation License. The LogiLogi-system is under the GPL
SourceForge.net Logo Zylon Internet Services-Groningen Logo
Visitor statistics