Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 02-04-2009, 12:46 AM
kouroshazar Offline
forum loafer
 
Join Date: Feb 2009
Posts: 7
Arrow How to Display Categories Horizontally

I'm not that conversant with CSS or PHP but I've been trying everything to try and figure out a way to display the list of Categories on the Browse page as a horizontal list instead of a vertical list that it defaults to whenever you use the <CATEGORY_LINKS_AS_LIST> tag. I am using version 1.7.1 and modyfying the Simple Template to suit my needs.

I have tried modifying the css files every which way I could but no luck. I read somewhere that I need to edit the categories.php file. I have no idea what to edit in this file. The outcome I want to achieve is:

Category A (12) | Category B (5) | Category C (34) | Category D (9)

Any help would be greatly appreciated.. Much thanks in advance...Kourosh
Reply With Quote
  #2  
Old 02-06-2009, 12:42 AM
kouroshazar Offline
forum loafer
 
Join Date: Feb 2009
Posts: 7
Please Help!

Please Help! Anyboby.... Anyone!
Reply With Quote
  #3  
Old 02-06-2009, 04:02 AM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
A link to your site showing exactly what you want done might be helpful.
__________________
Jay Williams | A Different View
Reply With Quote
  #4  
Old 02-06-2009, 11:27 PM
kouroshazar Offline
forum loafer
 
Join Date: Feb 2009
Posts: 7
My site

The way it looks on my site at the moment can be seen here:

http://pixelpost.kouroshazar.com/index.php?x=browse

The way I want it to look can be seen here:

http://www.homeofthevain.com/index.php?x=browse
Reply With Quote
  #5  
Old 02-08-2009, 11:28 PM
kouroshazar Offline
forum loafer
 
Join Date: Feb 2009
Posts: 7
Somebody please help!
Reply With Quote
  #6  
Old 02-09-2009, 01:32 AM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
What you need to do is open up the addon paged_archive.php, and do a search for "$category_Link_List". Every time you see $category_Link_List .= "someting...<br />"; remove the <br /> and replace it with a pipe "|" or whatever else you want.

Example:
On line #201, you'll see this.
PHP Code:
$category_Link_List .= "<a href='index.php?x=browse&amp;category=$id'>$catname_count</a><br />"
Change it so it looks like this:
PHP Code:
$category_Link_List .= "<a href='index.php?x=browse&amp;category=$id'>$catname_count</a> |"
Continue to search until all of the "$category_Link_List" items are altered.
__________________
Jay Williams | A Different View
Reply With Quote
  #7  
Old 02-09-2009, 08:38 PM
kouroshazar Offline
forum loafer
 
Join Date: Feb 2009
Posts: 7
Thank you!

Jay,

Thank you so much for your help! I really appreciate it!
Reply With Quote
  #8  
Old 02-09-2009, 08:50 PM
kouroshazar Offline
forum loafer
 
Join Date: Feb 2009
Posts: 7
One last question regarding this.

Your recommendation works like a charm. However, is there a way to not have it put the pipe " | " after the last category? You can see what I mean at:
http://pixelpost.kouroshazar.com/index.php?x=browse
Reply With Quote
  #9  
Old 02-09-2009, 09:00 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
Quick and easy solution is to use rtrim...

Example,

On line 208 you see this:
PHP Code:
$category_Link_List_paged .= "</ul>"
Right above that on line 207 add this:
PHP Code:
$category_Link_List rtrim($category_Link_List' |'); 
Reply With Quote
  #10  
Old 02-09-2009, 09:29 PM
kouroshazar Offline
forum loafer
 
Join Date: Feb 2009
Posts: 7
Thanks!

Thanks Dkozikowski, it's all good now!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 09:59 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs