Elegant ist es nicht aber man könnte die Daten vor der Ausgabe im Template sortieren.
dazu muss man sich nur das quickpoll Template ins template-Verzeichnis kopieren und dann folgende Ersetzung vornehmen:
PHP-Code:
<?php foreach ($this->graph as $graph): ?>
PHP-Code:
<?php
$graph_arr = $this->graph;
function quickpoll_cmp($ga, $gb) {
if($ga['result'] === $gb['result']) return 0;
return ($ga['result'] < $gb['result']) ? 1 : -1;
};
usort($graph_arr, "quickpoll_cmp");
foreach ($graph_arr as $graph): ?>
Lesezeichen