(This was already posted in the templates/design forum, sorry about the duplicate post..) I'm using javascript to calculate how far away each listing is, then displaying the distance in miles - this is all in a loop in showlistings.tpl. Now I'm trying to sort the listings from nearest to farthest. Someone said to modify the getAllListings function in "includes/classes/kernel/Listings.php" - I haven't had much luck so far and was wondering if anyone here could give more specific advice?