Keyword

Featured Image

  • NintendoNerds
  • NintendoNerds's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 8 months ago #92613 by NintendoNerds
Replied by NintendoNerds on topic Featured Image
Are you talking about between the rows?

BBC said:
Did you make this huge spacing by purpose ? Or is it template problem.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #92614 by BBC
Replied by BBC on topic Featured Image
Yes, everything between date and autor name. (written by)

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #92615 by BBC
Replied by BBC on topic Featured Image
I see now. It´s only in Opera. Huge space.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #92616 by Terry Britton
Replied by Terry Britton on topic Featured Image
I always laugh at people who completely miss the actual question being asked, and here I did the same thing.

 

You can use the following to insert an image in item.php or category_item.php based on whether it is featured or not:

 

<?php if ($this->item->featured) : ?>

<img class="featured-image" src="/stories/icons/featured.jpg" alt="featured article"></img>

<?php endif; ?>

 

You would put this in the template at a location where you want the image to be. Obviously your html for the image would be different. You would then just have to play around with the positioning and the css to get the exact look you want.

    

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #92617 by BBC
Replied by BBC on topic Featured Image
Now i get confused. I beleived he want different images for different items.
That´s why i asked for more details.

Please Log in or Create an account to join the conversation.

  • NintendoNerds
  • NintendoNerds's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 8 months ago #92618 by NintendoNerds
Replied by NintendoNerds on topic Featured Image
Cool! So it can be done with no major changes :D That's great. Is something you could help me out with, Terry? I'm not too good with that kind of stuff. If you tell me what to modify and for what files, I'm sure I can figure it out :D

Terry A Britton said:
I always laugh at people who completely miss the actual question being asked, and here I did the same thing.

 

You can use the following to insert an image in item.php or category_item.php based on whether it is featured or not:

 

<?php if ($this->item->featured) : ?>

<img class="featured-image" src="/stories/icons/featured.jpg" alt="featured article"></img>

<?php endif; ?>

 

You would put this in the template at a location where you want the image to be. Obviously your html for the image would be different. You would then just have to play around with the positioning and the css to get the exact look you want.

 

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #92619 by Terry Britton
Replied by Terry Britton on topic Featured Image
I'm getting ready to go on the road for a couple of weeks and won't be on the forum much, so I'll try to give you enough to get you started. I couldn't really see what you where talking about in the link you provided so I'll give you a couple of options. Firstly, you could display text over the image that says "Featured" or you could display an image in front of the other image that highlights the fact it is featured. If you do it with an image you will have to use z-index which allows you to stack items on top of each other, the higher the z-index the closer it is to the viewer.

 

The image in the category listing is wrapped by a div (catItemImageBlock). Within that same div in category_item.php you could put the following code. Sorry I can't give you an exact line number but my files are all heavily modified so the line numbers wouldn't match yours. Just search for catItemImageBlock.

 

<?php if ($this->item->featured) : ?>

<span class="featured">Featured</span>

<?php endif; ?>

 

You would then use css to position the text and style it the way you want to. I don't think you'll need z-index if you do it with text, but if you do, just put "z-index:99" in the css for featured. Backup your files before you start and hopefully someone else can step in if you have more questions.

 

Please Log in or Create an account to join the conversation.

  • NintendoNerds
  • NintendoNerds's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 8 months ago #92620 by NintendoNerds
Replied by NintendoNerds on topic Featured Image
Thanks very much, Terry. I'll have a look at it. Have a safe trip.

Terry A Britton said:
I'm getting ready to go on the road for a couple of weeks and won't be on the forum much, so I'll try to give you enough to get you started. I couldn't really see what you where talking about in the link you provided so I'll give you a couple of options. Firstly, you could display text over the image that says "Featured" or you could display an image in front of the other image that highlights the fact it is featured. If you do it with an image you will have to use z-index which allows you to stack items on top of each other, the higher the z-index the closer it is to the viewer.

 

The image in the category listing is wrapped by a div (catItemImageBlock). Within that same div in category_item.php you could put the following code. Sorry I can't give you an exact line number but my files are all heavily modified so the line numbers wouldn't match yours. Just search for catItemImageBlock.

 

<?php if ($this->item->featured) : ?>

<span class="featured">Featured</span>

<?php endif; ?>

 

You would then use css to position the text and style it the way you want to. I don't think you'll need z-index if you do it with text, but if you do, just put "z-index:99" in the css for featured. Backup your files before you start and hopefully someone else can step in if you have more questions.

 

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #92621 by Terry Britton
Replied by Terry Britton on topic Featured Image
One more thing you'll probably have to set the div (catItemImageBlock) and the span (featured) to either float:left or float:right (both to the same) so you can display one on top of the other.

Please Log in or Create an account to join the conversation.

  • NintendoNerds
  • NintendoNerds's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 8 months ago #92622 by NintendoNerds
Replied by NintendoNerds on topic Featured Image
Well, I'm not sure if we're misunderstanding each other or not but this is how I want it to look compared to how it looks now:http://i192.photobucket.com/albums/z133/nintendonerds/featured.png

Terry A Britton said:

One more thing you'll probably have to set the div (catItemImageBlock) and the span (featured) to either float:left or float:right (both to the same) so you can display one on top of the other.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum