Is it possible to store the descriptions in the photo order (size, paper, amount) in seperate files into the xml file?
Now all is stored in the 'descriptions'
The advantage of this is that i can calculate how many photo are in i.e. 4x6 and how many in 5x7 and so on.
I tried some extra code into the xml through POST:
//This function is called when the user changes some order settings (like format name, paper type, or amount of items).
//Ordered format information is stored in the description field of Image Uploader items.
//If 'applyToAll' parameter is true, then ordered format information applies to all images in upload pane.
function itemChange(applyToAll) {
if (imageUploader1) {
//Compile the string with ordered formats.
var description = "";
for (var i = 1; i <= maxFormatCount; i++) {
var SelectFormatN = document.getElementById("SelectFormat" + i);
var SelectPaperN = document.getElementById("SelectPaper" + i);
var InputAmountN = document.getElementById("InputAmount" + i);
var SelectResizeN = document.getElementById("SelectResize" + i);
[b]format2 = document.getElementById("SelectFormat" + i); [/b]
var amount = parseInt(InputAmountN.value);
if (SelectFormatN.selectedIndex != 0 && SelectPaperN.selectedIndex != 0 && InputAmountN.value !=
"" && amount && SelectResizeN.selectedIndex != 0) {
var format = SelectFormatN.options[SelectFormatN.selectedIndex].value;
var paper = SelectPaperN.options[SelectPaperN.selectedIndex].value;
var resize = SelectResizeN.options[SelectResizeN.selectedIndex].value;
if (description != "") {
description = description + separator;
}
description = description + format + " " + paper + " x " + amount + " " + resize;
}
}
//Update desriptions of selected items and write ordered formats information into it.
for (var i = 1; i <= imageUploader1.getUploadFileCount(); i++) {
if (applyToAll === true || imageUploader1.getUploadFileSelected(i)) {
imageUploader1.setUploadFileDescription(i, description);
}
}
}
}
And in the upload i added:
//Save file info.
$xmlFile = $descriptions->createElement("file");
$xmlFile->setAttribute("name", $fileName);
[b]$xmlFile->setAttribute("formaat", $_POST ['format2_1']);[/b]
$xmlFile->setAttribute("description", $_POST ['Description_1']);
$descriptions->documentElement->appendChild($xmlFile);
In the XML file i get an empty string formaat