My site is not a dating site and I need the images to upload in sequential order, one after the other. However, they are currently mixed EVERY time a new image is loaded into it's album, which requires sorting the album all over again. I found this code in BXDOLALBUMS which I am sure is responsible for the uploads order being mixed up each time via the $mixedObj code.
/ album's objects methods
function addObject ($iAlbumId, $mixedObj, $bUpdateCount = true) {
$iAlbumId = (int)$iAlbumId;
if ($iAlbumId == 0)
return;
$sqlFields = "`id_album`, `id_object`";
$sqlBody = "";
$iLastObjId = $this->getLastObj($iAlbumId);
$iCount = 0;
if (is_array($mixedObj)) {
foreach ($mixedObj as $iValue) {
$iValue = (int)$iValue;
$sqlBody .= "('$iAlbumId', '$iValue'), ";
$iCount++;
}
}
else {
$iValue = (int)$mixedObj;
$sqlBody = "('$iAlbumId', '$iValue')";
$iCount++;
}
Will the code work the way I need if I change it to this?
/ album's objects methods
function addObject ($iAlbumId, $bUpdateCount = true) {
$iAlbumId = (int)$iAlbumId;
if ($iAlbumId == 0)
return;
$sqlFields = "`id_album`, `id_object`";
$sqlBody = "";
$iLastObjId = $this->getLastObj($iAlbumId);
$iCount = 0;
$iValue = (int)$iValue;
$sqlBody .= "('$iAlbumId', '$iValue'), ";
$iCount++;
}
Thanks in advance, Pip