Recent Topics

1 Aug 08, 2004 01:13    

Hi,

I'm trying to display a category's image instead of a category's name.
To achieve this I named the file like the categories.
fruits.png for the category named fruit etc
(I only use PNG files)
I know all the code to fetch and display the image, except the one that corresponds to name of the category, thus to the name of the file.

I tried :


$Item->dGet('main_category')
$Item->dGet(main_category())
$Item->get('main_category')
$Item->dGet('categories')

but all I get was a blank.

Did I missed some piece of code ?

2 Aug 08, 2004 08:38

try

get_catname( $Item->main_cat_ID )

3 Aug 08, 2004 15:44

Thanks that works.

However a pieces of code are obviously missing in my skin because several things are not working (no error message though) :

#

url_add_param(get_bloginfo('blogurl', $curr_blogparams), 'cat='.$cat_ID)


I get a blank instead of the cat_ID number

#

file_exists()


is_readable()


These are never true, even if the path and permissions are correct.
I can view the image directly in my browser and display it in the skin,
but I can't do the above checkings.

#


<link rel="stylesheet" type="text/css" href="LMB.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo dirname(__FILE__).'/LMB.css';?>" />


The page isn't styled with that code.
(however when I switch to the custom skin, the page IS styled with href="custom.css" )
I must use :


<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $skins_url.'/LMB.css';?>" />

Note : I am running the blog in a directory external to the one where b2e is installed.

Any ideas ?

4 Aug 08, 2004 15:55

ermm wait a minute, I just discovered

<base href="<?php skinbase(); // Base URL for this skin. You need this to fix relative links! ?>" />


Form is loading...