1 hmisthelaw Mar 07, 2007 13:43
3 herm Mar 19, 2007 00:52
hmmm i just tried this out but it didn't work somehow :/
what does this part
<div class="bPost inCat'.$Item->main_cat_ID.'"" lang="<?php $Item->lang() ?>">
do? thanks so far :)
4 hmisthelaw Mar 19, 2007 09:12
Herm wrote:
hmmm i just tried this out but it didn't work somehow :/
what does this part
<div class="bPost inCat'.$Item->main_cat_ID.'"" lang="<?php $Item->lang() ?>">
do? thanks so far :)
yeh i also tried it and the more i get is the text area width reduced to leave a blank space for the supposed image, though the image does not load.
this part is meant to "write" the following html code in the final post view
<div class="bPost inCat42" lang="en-UK">
where 42 is the number of the category to which you want to set a default image.
i do not know much about PHP code, but the solution seems to be good though there's some problem in the code. if it could be checked it would be great.
5 yabba Mar 19, 2007 10:16
If your category ID == 42 then you need to be defining the following class in your css, you'd obviously need to change the image path/filename to suit.
.inCat42 .imgPad{
display:block;
background-image:url( img/picture.jpg);
}
If you still can't get the images to load then just leave a link to your blog so I can see what's going wrong
¥
6 herm Mar 19, 2007 12:19
i changed the first line into:
<div class="bPost inCat<?php echo "$Item->main_cat_ID" ?>">
and now everything works fine :)
7 yabba Mar 19, 2007 12:31
Lol, ooops, in my _main.php I'm echoing the whole of that line :p
I've corrected my original post :P
¥
8 hmisthelaw Mar 19, 2007 14:58
yeeeeh!! that's it!! thanks a lot folks!! ;)
Simplest solution :-
¥