Hi Willspo,
the modifications are:
- integration of a language system
- change some values, because f.e. my "seen" is the column "mediatype"
- no statistics, because I think you wanna do that
- after that a Skin, or two, or three
I must say, I've understood the code of your first version, but now it is really complex. It's hard to understand. So first problem: the language system. I like to use your config file to let the user choose their language. It's like the skin-menu. In the config you can have the choice of a language (he scans all datasets in the folder "lang". He lists it and saves to config.xml. In the language files all words used in your template are declared.
The data after the colon behind the variables will be imported. For example: movietitle:Filmtitel
So far, now my problems:
I've added in config.hta the function
Code: Select all
function populateLangList() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folder = fso.GetFolder("./Lang");
var fc = new Enumerator(folder.SubFolders);
for (; !fc.atEnd(); fc.moveNext()){
var oOption = document.createElement("OPTION");
document.all.langSelect.options.add(oOption);
oOption.innerText = fc.item().Name;
oOption.value = fc.item().Name;
}
}
which should be searching for files in the lang folder.
The html form:
Code: Select all
<tr><td>
<strong>Language:</strong>
</td><td>
<select id="langselect">
</select>
</td></tr>
And in the save-function:
Code: Select all
xmlDoc.documentElement.selectSingleNode("//lang").text = langSelect.value;
The tag is addes in config.xml.
But it doesn't work. Error Message: document.all.langSelect.options is no object. Where I have langselect to declare?
Second problem: I want to change the names you've given, for example "movie title" or "seen" to variables. But where I have to include the dataset where the variables are defined?
Sry for my english and my Code. I don't know anything about xml/xsl.