Displaying all subcategories & adding a separator

This is a discussion on Displaying all subcategories & adding a separator within the HTML, CSS, and Design Help forums, part of the General category; I need help to show all the subcategories (below the main category). I would also like each category to be ...


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

 
LinkBack Thread Tools Display Modes
  #1  
Old 05-04-2006, 09:19 AM
Junior Member
 
Join Date: Apr 2006
Posts: 13
Rep Power: 10
Default Displaying all subcategories & adding a separator

I need help to show all the subcategories (below the main category). I would also like each category to be separated by commas.

Currently, only 3 subcategories are displayed with no separator. Please go to
http://www.njhomeguide.com/pros to see what I'm talking about.

Any help with this would be greatly appreciated.
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
Reply With Quote
  #2  
Old 05-04-2006, 10:06 AM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 3,763
Rep Power: 87
Default

You would have to manually change this in the index.php file.

If you open it and locate this:
PHP Code:
while($arow=$result2->fetch())
        {
            
$add_cats.='<a href="category.php?type='.$rs['id'].'&sec='.$arow['id'].'">'.$arow['name'].'</a> ';
        } 
Then change it to:
PHP Code:
while($arow=$result2->fetch())
        {
            
$add_cats.='<a href="category.php?type='.$rs['id'].'&sec='.$arow['id'].'">'.$arow['name'].'</a>, ';
        } 
__________________
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 | Submit a Ticket
Reply With Quote
  #3  
Old 05-04-2006, 10:15 AM
Junior Member
 
Join Date: Apr 2006
Posts: 13
Rep Power: 10
Default

Thank you for the comma separator.

How do I show all the subcategories (below the main category)? Only 3 are displaying now and I want all of them to display.
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
Reply With Quote
  #4  
Old 05-04-2006, 10:17 AM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 3,763
Rep Power: 87
Default

Just above that change is a sql query:
PHP Code:
$sSQL2 "SELECT id,name,image FROM ".PREFIX."categories WHERE parent_id = ".$rs['id']." AND display<>'N' ORDER BY cOrder LIMIT 3"
Change it to:
PHP Code:
$sSQL2 "SELECT id,name,image FROM ".PREFIX."categories WHERE parent_id = ".$rs['id']." AND display<>'N' ORDER BY cOrder"
__________________
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 | Submit a Ticket
Reply With Quote
  #5  
Old 05-04-2006, 11:01 AM
Junior Member
 
Join Date: Apr 2006
Posts: 13
Rep Power: 10
Default

Thanks Eric.

Now I have another problem. I am trying to make formatting changes to the main categories on the index page. When I FTP the file categories/maincategories.tpl.php - the changes don't show up. I don't understand, it worked yesterday.

I have already cleared the compiled templates and the templates_c folder is empty.
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
Reply With Quote
  #6  
Old 05-04-2006, 11:09 AM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 3,763
Rep Power: 87
Default

That is strange.

Here are a few things you could try:
1. Physically open the file off the server and see if it does include your changes.
2. Make sure you are not getting any ftp errors like "over disk space" etc.
3. Try to add something like <h1>TEST</h1> and see if that shows.
4. Make sure you are uploading it to the correct template folder.
__________________
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 | Submit a Ticket
Reply With Quote
  #7  
Old 05-04-2006, 11:20 AM
Junior Member
 
Join Date: Apr 2006
Posts: 13
Rep Power: 10
Default

I know, it's driving me crazy. It's definently going in the right folder. The changed file (maincategories.tpl.php) is on the server, but it seems the classifieds software is not using it.

Is there a setting somewhere in the program causing this?
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
Reply With Quote
  #8  
Old 05-04-2006, 11:21 AM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 3,763
Rep Power: 87
Default

Can you give me a link?
__________________
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 | Submit a Ticket
Reply With Quote
  #9  
Old 05-04-2006, 11:31 AM
Junior Member
 
Join Date: Apr 2006
Posts: 13
Rep Power: 10
Default

Eric,
I'm still on the same page: http://www.njhomeguide.com/pros/index.php

I just replaced maincategories.tpl.php with the original file and nothing happened. I checked the server and the new file is there, but when I reload the page and check the source - it's not there.
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
Reply With Quote
  #10  
Old 05-04-2006, 11:42 AM
Junior Member
 
Join Date: Apr 2006
Posts: 13
Rep Power: 10
Default

Here's more info: when I make changes to:

subcategories.tpl.php - the changes show up
maincategories.tpl.php - the changes DON'T show up

It's odd that the system would process one file but not the other?
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
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
Viewing ads from subcategories in Main Categories browse view SilverMicro v3.1 Questions & Support 11 05-26-2007 04:39 PM
Showing the number of ads in subcategories on main page pat01 v3.1 Modules & Modifications 6 07-19-2006 04:24 PM


All times are GMT -4. The time now is 04:00 AM.


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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22