4
It varies according to the module, but most modules involve interaction with 3 files, for example:
module/article.php
module/templates/article.html
module/language/english/main.php
So...
article.php might extract the name of an author (e.g. 'Fred') from the database and put it into a variable called $authorname.
It then passes this data to a target 'placeholder' in the page template with the command:
$xoopsTpl->assign('author', $authorname);
In article.html, you will find the placeholder:
<{$author}>
which is often preceded by a reference to the module's language file:
<{$smarty.const._NW_AUTHOR_NAME}> <{$author}>
In module/language/english/main.php you'll find the matching language definition:
define("_NW_AUTHOR_NAME", "The Author is");
The result would be (in English)
Quote:
Simples!