At present the help page which describes what each module does is a static html page.
It would be nice to have each module define the text and assemble the page automatically.
If people like this idea I am happy to work on it. The file needs to be changed to a .php file which should build a table with a row for each module. The icon it can already get automatically. The other column should contain formatted text which it could grab from a "help.html" or similar file in each module directory.
Good idea, except to make it work for all languages it should probably be an "overview.html" file in each module help directory: lang/xx/help/modulename/overview.html
If the language isn't found in the current language, check "parentlanguage" and then English (en).
No need for a new database table, just read the existing modules table.
If the language isn't found in the current language, check "parentlanguage" and then English (en).
No need for a new database table, just read the existing modules table.
I was talking about html tables and not database tables but didn't make myself clear, sorry.
I agree that it should use the language system.
I will work on this during this coming week.
I agree that it should use the language system.
I will work on this during this coming week.
Having looked more closely I see that the help index page contains links for each module which should be generated automatically too.
I have attached a modified version of help.php. For certain files (index.html and mods.html) it looks in the module directories under lang/$lang/help/$module for files of the same name (it tries the current language, parent language and "en" for $lang each time and does this for every $module, sorted by the full name of the module).
The advantage of this method is that it still works with the old style files. There is of course no reason why the main files and the per-module files should have the same name and this could easily be changed.
The attached file also contains the split up versions of index.html and mods.html for english (en). Of course these files will need to be split for all languages eventually.
I have attached a modified version of help.php. For certain files (index.html and mods.html) it looks in the module directories under lang/$lang/help/$module for files of the same name (it tries the current language, parent language and "en" for $lang each time and does this for every $module, sorted by the full name of the module).
The advantage of this method is that it still works with the old style files. There is of course no reason why the main files and the per-module files should have the same name and this could easily be changed.
The attached file also contains the split up versions of index.html and mods.html for english (en). Of course these files will need to be split for all languages eventually.
Very nice fix and very Moodley - I like it!
I've checked help.php into CVS unchanged.
Quite a few of the mods.html and index.html were missing from the archive but no matter, I pieced them together.
Thanks, Alex!
I've checked help.php into CVS unchanged.
Quite a few of the mods.html and index.html were missing from the archive but no matter, I pieced them together.
Thanks, Alex!