Support Forums

Display ALL active listings under category list

This is a discussion on Display ALL active listings under category list within the Technical Support forums, part of the Technical Support Forums category; If you want the listings to appear under main categories and one level of subcategory but not under the top ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 08-26-2009, 09:17 AM   #41
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,255
Rep Power: 81
seymourjames is a jewel in the rough
Default

If you want the listings to appear under main categories and one level of subcategory but not under the top browselistings page itself then you do this instead in category.php . You don't need to touch other files at all.

replace $showlistings='N'; with

if(isset($_GET['cat']) || isset($_GET['id']))
{
$showlistings='Y';
}
else
{
$showlistings='N';
}



and then the code Eric gave for category.php

$options['section']=$sec;

Change to:

if(isset($sec)) {
$options['section']=$sec;
}
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 08-30-2009, 11:21 AM   #42
Member
 
Fatih67's Avatar
 
Join Date: Jun 2008
Location: TURKEY
Posts: 58
Rep Power: 14
Fatih67 is on a distinguished road
Default

Quote:
Originally Posted by seymourjames
If you want the listings to appear under main categories and one level of subcategory but not under the top browselistings page itself then you do this instead in category.php . You don't need to touch other files at all.

replace $showlistings='N'; with

if(isset($_GET['cat']) || isset($_GET['id']))
{
$showlistings='Y';
}
else
{
$showlistings='N';
}



and then the code Eric gave for category.php

$options['section']=$sec;

Change to:

if(isset($sec)) {
$options['section']=$sec;
}
ı tried this.

but not worked.

all listings are shown every category.. same problem..
__________________
� 2007 68 Classifieds - A division of 68 Designs, LLC - v4.0.3 Developer
Another 68C site ; ikinci el kamyonlar
Fatih67 is offline  
Old 08-30-2009, 11:25 AM   #43
curmudgeon
 
Join Date: Mar 2006
Posts: 5,399
Rep Power: 136
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by Fatih67
ı tried this.

but not worked.

all listings are shown every category.. same problem..
Did you expect it to? Your sig says you are using 4.0.3 yet this thread is in the 4.1.X support forum. There are seperate support forums for 4.0 and 4.1 for a reason and that reason is that there are a lot of code difference between the 2 major releases.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 10-14-2009, 02:10 PM   #44
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 412
Rep Power: 17
damiun is on a distinguished road
Default

this isnt working for me either, it shows this error:

Quote:
Notice: Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 SQL: SELECT id FROM class_categories WHERE parent_id In () in /usr/home/deb19947/domains/damiun.nl/public_html/includes/classes/database/mysql.php on line 143

Notice: Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.price BETWEEN 0 AND 99999999999 AND p.expiration > NOW() AND p.display =' at line 1 SQL: SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.description, p.price, p.dateadded, p.expiration, p.display, p.pHighlighted, p.pBold, p.hitcount, p.url, u.username, u.state, u.city, u.country, u.extra, u.extra2, u.extra3 , p.alt_address, p.alt_city, p.alt_state, p.alt_country, p.alt_zip, p.alt_phone ,store.sTitle,store.sDescription,store.sImage FROM class_listings AS p LEFT JOIN class_users AS u ON p.owner = u.id LEFT JOIN class_store AS store ON (p.owner = store.sUserId) WHERE 1=1 AND p.section In () AND p.price BETWEEN 0 AND 99999999999 AND p.expiration > NOW() AND p.display = "Y" GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, p.alt_state, p.alt_city, p.alt_country ORDER BY dateadded desc in /usr/home/deb19947/domains/damiun.nl/public_html/includes/classes/database/mysql.php on line 143

Notice: Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND p.price BETWEEN 0 AND 99999999999 AND p.expiration > NOW() AND p.display =' at line 1 SQL: SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.description, p.price, p.dateadded, p.expiration, p.display, p.pHighlighted, p.pBold, p.hitcount, p.url, u.username, u.state, u.city, u.country, u.extra, u.extra2, u.extra3 , p.alt_address, p.alt_city, p.alt_state, p.alt_country, p.alt_zip, p.alt_phone ,store.sTitle,store.sDescription,store.sImage FROM class_listings AS p LEFT JOIN class_users AS u ON p.owner = u.id LEFT JOIN class_store AS store ON (p.owner = store.sUserId) WHERE 1=1 AND p.section In () AND p.price BETWEEN 0 AND 99999999999 AND p.expiration > NOW() AND p.display = "Y" GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, p.alt_state, p.alt_city, p.alt_country ORDER BY dateadded desc in /usr/home/deb19947/domains/damiun.nl/public_html/includes/classes/database/mysql.php on line 143
And "$options['section']=$sec;" isnt in the category file anymore

Last edited by damiun; 10-14-2009 at 02:13 PM.
damiun is offline  
Old 10-14-2009, 02:27 PM   #45
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,255
Rep Power: 81
seymourjames is a jewel in the rough
Default

Go here : this is where I tied it together and updated with the release of 4.1.6. You do not use $sec in the template file. It is now $categoryid for version 4.1.6 .

Enhancing browse pages with listings

If you are running version 4.1.X but below 4.1.6 then it will work if you follow the instructions. And "$options['section']=$sec;" is in the code at line 95.

When you say it does not work it helps often to say what you actually did.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Closed Thread

Tags
category , hack , listings , sub cats

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listings in admin are active... but expired?? Tim_A Technical Support 1 03-03-2009 09:51 AM
Listings 'Not Active' tdisraeli Technical Support 6 10-03-2008 12:37 PM
Display Category name in Featured*listings hel68c Technical Support 0 08-06-2008 06:19 PM


All times are GMT -4. The time now is 11:17 AM.


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