Support Forums

Old 02-06-2009, 09:24 AM   #1
Junior Member
 
Join Date: Jan 2009
Posts: 7
Rep Power: 0
chrisst1 is on a distinguished road
Default Drop down to sort listings

Hi all

Is it possible to have a drop down to sort listings, has anybody done this or would it not work?

Chris
chrisst1 is offline   Reply With Quote
Old 02-06-2009, 09:34 AM   #2
Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,328
Rep Power: 39
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

Many questions such as this go unanswered, because the poster doesn't provide any information for someone to even attempt to answer the question.

What version of the software are you using?
What template are you using?
Where do you want to do this?
Why do you want to use this?
Why wouldn't you use the built in sorting feature that is in the searchlisting.tpl file?

-Mike
__________________
Mike-N-Tosh
v3.1.10 Developer IndianaPC.org - A community website
Sandbox v4.0.9, 4.1
Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds.
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 02-06-2009, 09:54 AM   #3
Junior Member
 
Join Date: Jan 2009
Posts: 7
Rep Power: 0
chrisst1 is on a distinguished road
Default

Sorry, I will remember for the future.

What version of the software are you using?
v4.0.9 Developer
What template are you using?
Default
Where do you want to do this?
showlistings.tpl
Why do you want to use this?
Because my existing site template does not have the room to show all sorting options in a row
Why wouldn't you use the built in sorting feature that is in the searchlisting.tpl file?
Can't find it, haven't got it.

Chris
chrisst1 is offline   Reply With Quote
Old 02-06-2009, 10:01 AM   #4
Moderator
 
 
Join Date: Mar 2006
Posts: 4,109
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by chrisst1 View Post
Why do you want to use this?
Because my existing site template does not have the room to show all sorting options in a row
Why wouldn't you use the built in sorting feature that is in the searchlisting.tpl file?
Can't find it, haven't got it.

Chris
Im not sure I understand this. When you click on a category that allows ads, for example, you see a list of ads in a table. The head of the table has field names and the fields that show are are specified in the site admin.

You can click on the heading of a table to resort the table by that column. Is that not what you are talking about doing?

If its not, what do you mean by you dont have room to show all sorting options? In what manner do you hope to allow sorting?
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 02-06-2009, 10:10 AM   #5
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,768
Rep Power: 110
Eric Barnes is a jewel in the rough
Default

Maybe he means like I have done here:
ClassifiedMods Modifications

Sort Modifications By: Date Added Views Title Asc Desc
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is online now   Reply With Quote
Old 02-06-2009, 10:15 AM   #6
Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,328
Rep Power: 39
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

My personal opinion would be that it would be much more difficult to build a feature such as this then it would be to simply modify the showlisting.tpl file to your needs.

The built in sort functionality is used if you have the showlisting.tpl selected from the administration "Search Settings" / Search Results Template "default" (The short description is "showlistings2.tpl")

Something to also bear in mind is if you are logged in as an Admin when you view showlistings on the front end of the site (not in admin), you may have more fields visible then a guest or a registered user. You can check this by going to the usergroups within the administration. This is important based off your response of, "Because my existing site template does not have the room to show all sorting options in a row"

In addition, your response of "Can't find it, haven't got it." may mean that you are using the showlistings2.tpl (see above). If not, then simply clicking on any of the column headings will sort the listings accordingly. On my site, I added text that says, "Click on a column header to sort these listings" which helps instruct end users to that functionality.

As far as editing/modifying the template itself, if you are using the showlistings.tpl file (with the sorting capability), you could simply comment out the fields that you don't want to include to shorten your table width to fit properly within your template.

Example:
HTML Code:
{if $sDisDateAdded == "Y"}
	<th scope="col"><a href="{$file}?{$querystring_dateadded}" class="sortheader">{$smarty.const.LANG_DATE_ADDED}</a> {if $sqlsort=="dateadded"}<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/sort{$oppositesort}.gif" border="0" alt="Sort" />{/if}</th>
{/if}
To this:
HTML Code:
<!-- {if $sDisDateAdded == "Y"}
	<th scope="col"><a href="{$file}?{$querystring_dateadded}" class="sortheader">{$smarty.const.LANG_DATE_ADDED}</a> {if $sqlsort=="dateadded"}<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/sort{$oppositesort}.gif" border="0" alt="Sort" />{/if}</th>
{/if} -->
-Mike
__________________
Mike-N-Tosh
v3.1.10 Developer IndianaPC.org - A community website
Sandbox v4.0.9, 4.1
Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds.
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 02-06-2009, 10:45 AM   #7
Junior Member
 
Join Date: Jan 2009
Posts: 7
Rep Power: 0
chrisst1 is on a distinguished road
Default

Hi
From the start, I have installed the 68classifieds script into a subdirectory of our larger existing website therefore I have had to make many changes to the to 68classifieds template files so that the overall look is maintained. A result of these changes I am looking to replace (You can click on the heading of a table to resort the table by that column) with a simple dropdown instead of clickable links.

Chris
chrisst1 is offline   Reply With Quote
Old 02-06-2009, 11:04 AM   #8
Moderator
 
 
Join Date: Mar 2008
Posts: 778
Rep Power: 21
seymourjames has a spectacular aura about
Default

Perhaps not the place to say this but here we go.

One thing people should be aware of is that whilst sorting provides a user experience it has some intrinsic problems associated with it as far as search engines.

Largely, duplicate content can result on urls which get picked up by search engines. It is a bit technical but sorting and pagination (moving between pages of lisitings) are non-commutative operations - this means in simple terms that the order in which you carry out the same operations matters.

The bottom line is that from a search engine perspective each page should have sufficiently unique different/content. Moreover, a search engine tends not to like completely different content every time it goes to the same url either. A small piece of content changing on a page is one thing but a whole page which is different each time gives the impression of instability. It has always been a problem of dynamic sites. To this end I have tested these principles on one of my sites. Internal pages get better indexing for sure when they are unique content from others and only changing a bit with the addition of one or two new adverts pushing in. For example, my new listings pages never do as well as a category page. Hierarchy wise the category page should do worse.

Interesting subject.

This why I always implement for my sites (because SEO is critically important to my site) that new listings cannot be sorted (always first in - first out of a page by date) and that all showlistings are only ever ordered by one variable whether it be price, date or whatever (in my case price).
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 02-06-2009, 06:06 PM   #9
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 688
Rep Power: 17
bowers01 is on a distinguished road
Default

Quote:
Originally Posted by Eric Barnes View Post
Maybe he means like I have done here:
ClassifiedMods Modifications

Sort Modifications By: Date Added Views Title Asc Desc
Thats pretty good. Can you make it sort by price?
Also you cant see it in ie7.
Cheers
__________________
Nick Bowers
68c v4.09 Developer
bowers01 is offline   Reply With Quote
Old 02-06-2009, 07:18 PM   #10
Moderator
 
 
Join Date: Mar 2008
Posts: 778
Rep Power: 21
seymourjames has a spectacular aura about
Default

Cant see what in I.E 7 what are you referring to?
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort ICON Unregistered Pre Sales Questions 1 12-01-2008 11:18 AM
how to sort category Abdulaziz v4 Questions & Support 5 10-08-2008 03:07 PM
Sort listings by... crystal v4 Questions & Support 4 06-02-2008 03:43 PM
Sort Listings tessey v4 Questions & Support 3 03-29-2008 08:30 AM
Sort By Price CB v3.1 Questions & Support 1 08-07-2007 11:37 AM


All times are GMT -4. The time now is 04:18 PM.


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