View previous topic :: View next topic |
Author |
Message |
b0n3z
Joined: 01 Apr 2004 Posts: 3
|
Posted: Thu Apr 01, 2004 1:36 pm Post subject: Catagories |
|
|
I would like to have my catagories go across the screen and not down the screen. I looked in the readme and searched the forums as to how to do this.
Can someone please tell me how to do it. Thanks. |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 294 Location: Oslo, Norway
|
Posted: Fri Apr 02, 2004 8:12 am Post subject: |
|
|
I see your point. The readme is only showing how to do vertical listing.. I'd suggest you go look for a hack. _________________ Sigg3 dot net - because you're worth it! |
|
Back to top |
|
 |
kristopher
Joined: 24 Apr 2004 Posts: 2
|
Posted: Sat Apr 24, 2004 10:55 pm Post subject: |
|
|
Hey,
Dunno if your still trying to get it to run horizontal but I just started using this and wanted the same thing. I looked through the forums but this is the only post I found about the subject. Anyhow I spent the better part of half a day working on this and finally got it working by taking the list_cats function out of the b2templates.functions.php and putting it into the index page.
Heres the edited code...
Code: | // out of the b2 loop
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = 'blah') {
global $tablecategories,$querycount;
global $pagenow;
global $querystring_start, $querystring_equal, $querystring_separator;
$file = ($file == 'blah') ? $pagenow : $file;
$sort_column = 'cat_'.$sort_column;
$query="SELECT * FROM $tablecategories WHERE cat_ID > 0 ORDER BY $sort_column $sort_order";
$result=mysql_query($query);
$querycount++;
if (intval($optionall) == 1) {
$all = apply_filters('list_cats', $all);
echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all">'.$all."</a>\n";
}
while($row = mysql_fetch_object($result)) {
$cat_name = $row->cat_name;
$cat_name = apply_filters('list_cats', $cat_name);
echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'">';
echo stripslashes($cat_name)."</a>\n";
}
} |
All that you need to do is take out the <br /> and it'll be on the same line. Be sure you took out the code from the b2templates.functions.php and inserted it into the page you are calling the function from and it's should work. |
|
Back to top |
|
 |
b0n3z
Joined: 01 Apr 2004 Posts: 3
|
Posted: Sun Apr 25, 2004 12:18 am Post subject: |
|
|
I forgot all about this lol
Thanks for spending your time to do this. This is what I was looking for. |
|
Back to top |
|
 |
|