Automatically Generated, be sure to be very precise on tabs and spaces.
Add this:
// Sort by XField v1.0 - addblock
if (isset($sortbyxfield)) {
$xfieldsaction = 'noop';
include_once($cutepath.'/inc/xfields.mdu');
if (!function_exists("sortcmp")) {
function sortcmp($a, $b) {
global $all_news, $xfieldsdata, $sortbyxfield;
$news_a = explode('|', $all_news[$a]);
$news_b = explode('|', $all_news[$b]);
$newsid_a = $news_a[0];
$newsid_b = $news_b[0];
return strnatcasecmp($xfieldsdata[$newsid_a][$sortbyxfield], $xfieldsdata[$newsid_b][$sortbyxfield]);
}
}
$xfieldsdata = xfieldsdataload();
uksort($all_news, 'sortcmp');
unset($sortingorder);
}
// Sort by XField v1.0 - End addblock
Between:
}else{ $count_all = count($all_news); }
And:
$i = 0;
Automatically Generated, be sure to be very precise on tabs and spaces.
Add this:
// Sort by XField v1.0 - addblock
case 'noop':
break;
// Sort by XField v1.0 - End addblock
Between:
break;
And:
default: