Support Forums

Sorting listings by JavaScript values

This is a discussion on Sorting listings by JavaScript values within the Templates, HTML, CSS, and Design Help forums, part of the General category; I'm using javascript to calculate how far away each listing is, then displaying the distance in miles on showlistings.tpl - ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 03-02-2010, 10:08 AM   #1
Customer
 
Join Date: Dec 2009
Posts: 6
Rep Power: 0
modworldwide is on a distinguished road
Default Sorting listings by JavaScript values

I'm using javascript to calculate how far away each listing is, then displaying the distance in miles on showlistings.tpl - this is all in a loop.

Is there any way to sort the listings by the values being generated? (ie nearest to farthest)

Edit: Guessing this would involve modifying the PHP somewhere, but I still don't have a full grasp on the interaction between PHP and smarty files...

Last edited by modworldwide; 03-02-2010 at 10:34 AM.
modworldwide is offline   Reply With Quote
Old 03-02-2010, 10:58 AM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

The listing searching is generated by includes/classes/kernel/Listings.php then getAllListings function.

It is very complex but the place to start looking.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting extrafield values in JavaScript modworldwide Templates, HTML, CSS, and Design Help 6 01-11-2010 05:21 PM
Extra field values not persistent through checkout process quasi888 Technical Support 10 09-12-2009 07:38 AM
Caegory values ryanreed71 Technical Support 7 02-13-2009 09:27 PM
Listings Order & Remove Sorting Greg H Technical Support 6 02-09-2009 06:42 PM


All times are GMT -4. The time now is 08:21 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0