![]() |
Thumbnail Images
Ok so i have a widget called featured content and i have copied the template code from vbcms_widget_recentarticle_page and created a new template called vbcms_widget_recentarticle_page_featured and pointed my featured content widget at it.
You can see it in action at the top of the page on www.eteknix.com This is the code for it: Code:
<div class="cms_widget"> Also i would much prefer a horizontal list as opposed to the vertical list of articles as it's currently set out. Any ideas? Thanks, Andy |
as far as i can say but not confirmed look at this code but it'll show a same image on all news
Code:
<a href="{vb:raw article.page_url}">{vb:raw article.title}</a> |
Tried tinkering around myself, but am unsure on the syntax to use.
Anyone able to help? |
Wow it seems this site really is dying. I asked on vb.com and they told me to come here but was afraid to due to the site dying, so now i'm stuck with something that doesn't have the functionality i need.
|
Quote:
Code:
<img src="{vb:raw article.previewimage}" width="{vb:raw article.imagewidth}" height="{vb:raw article.imageheight}" /> |
Quote:
Only problems i have now is that i've had to make it 100x60 as it was WAY too big for that box but now it looks odd as the images are all different sizes so don't end up square. How can i sort that so it uses the imagewidth and heigh as mentioned in the settings but at a 40% reduction or something so the thumbnails are the right aspect ratio? Also here is my code: Code:
<div class="cms_widget"> Many thanks, Andy |
Code:
<img src="{vb:raw article.previewimage}" width="{vb:math {vb:raw article.imagewidth} / 2}" height="{vb:math {vb:raw article.imageheight} / 2}" /> As for your other issue, sorry. Tried it, but CSS isn't my strong suite. |
Dead Eddie - thank you for pointing me here :) I'm having an issue getting this to work, or maybe I'm not understanding the functionality properly. Could you shed some light on this for me? How do I associate a preview image with an article? I feel like this is a 'duh' question, but I am pretty lost on this. Also, where should I insert this code? I may or may not have a problem with this, instead it may just be I don't have a preview image associated with the article. Right now, I have an article that has an image attached to it, and when that happens, my goal is to have a preview of that image shown in the widget. Here is my code:
Code:
<div class="cms_widget"> |
Quote:
Quote:
I've attached an idea of where I'd start (although, I haven't previewed this, so the display may be wonky...try it on a test board!). I've bolded my edits, in case you're looking for them. Code:
<div class="cms_widget"> |
Thanks Eddie - this works as intended perfectly! I'm curious about one thing though...when we are talking about image size, the /# is an indicator of the ratio, not a fixed size, right? Is there a way to code in a fixed size so my contributors don't have to worry about using a specific image size? Or am I way off base?
|
All times are GMT. The time now is 12:09 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|