[TYPO3-dam] sorting files code

Miroslav Monkevic m at vektorius.lt
Mon Oct 9 18:34:09 CEST 2006


I did, actually, for testing purposes. :)

Everything as explained in original letter, except last part which I 
adjusted like this:
#####################################################################
			foreach ($this->dataObjects as $list) {

				if ($list->count())	{
					$incAcc = 0;
					while ($list->valid()) {

						$row = $list->current();

						
						$accRows[$incAcc] = $row;
						$this->currentTable['idList'][] = $row['uid'];
						if ($doSort) {
							if ($prevUid) {
								$this->currentTable['prev'][$row['uid']] = $prevPrevUid;
								$this->currentTable['next'][$prevUid] = '-'.$row['uid'];
								$this->currentTable['prevUid'][$row['uid']] = $prevUid;

				                $accRows[$incAcc]['prev'] = 
$accRows[$incAcc]['prevSorting'] = $prevPrevUid;
                 				$accRows[$incAcc-1]['next']= 
$accRows[$incAcc-1]['nextSorting'] = '-'.$row['uid'];
  							}
							$prevPrevUid = isset ($this->currentTable['prev'][$row['uid']]) ? 
- $prevUid : $row['pid'];
							$prevUid = $row['uid'];
						}
						$incAcc++;
						$list->next();
					}
				}
			}
#####################################################################

Use it on your own risk, it is still a hack, and I believe there is a 
good reason why R.F. did not include this possibility himself.


Nico Potvin wrote:
> hi,
> 
> i found this in the archives, coorect me if i am wro,g, does this code 
> add the ppossibility to manually sort the files in the dam?
> and did anyone try this?
> 
> greets nico
> 



More information about the TYPO3-project-dam mailing list