Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 09 Dec 2011, 16:21
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Custom Thumbnail Size For Section

How would I go about doing this? I tried just changing it up with some css, but the thumbnail settings over ride anything with the important rule that is attached by default. I want to keep thumbnails the same everywhere buy my home page of my cms.

Any help on this would be greatly appreciated. I have been banging my head for weeks. Found nothing on the forums, or googling.

Thanks, Clayton
Reply With Quote
  #2  
Old 09 Dec 2011, 17:40
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
What do you have set for AdminCP > Settings > Options > content management > Use Thumbnails in Preview ? If you have that set to No, then it will use regular CSS to size the images and then you could write some custom CSS for your Home page to change it just there.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 09 Dec 2011, 17:57
clayton47 clayton47 is offline
 
Join Date: Oct 2011
It is set to no. I cleared cache, rebuilt thumbnails. and tried adding new posts and new thumbnails and it still automatically resized them.

Do I need to double click the image and select the size? It only gives me thumnail, med, large, fullsize. Or do I need to select anything if I set my css for the image size?

--------------- Added 09 Dec 2011 at 18:06 ---------------

the default template is "vbcms_content_section_page" if I want to create my own and use it how do I select it or activate it? So pages that I want to use a certain size thumbnail I can, and others that I want to use the default they will. If I address the css for the default template it obviously affects it everywhere.
Reply With Quote
  #4  
Old 09 Dec 2011, 20:01
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
It will resize them via this CSS:
.cms_article_preview_image {
max-height:{vb:stylevar image_thumbnail_max};
max-width:{vb:stylevar image_thumbnail_max} !important;
_width:{vb:stylevar image_thumbnail_max}; /*IE6*/
}
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 09 Dec 2011, 20:22
clayton47 clayton47 is offline
 
Join Date: Oct 2011
I had already targeted .cms_article_preview_image, but why you include {vb:stylevar image_thumbnail_max}?

Back to my template question, I found the template - vbcms_content_article_preview

Can I create a duplicate of it with a different name, rename some of elements and select where to show this template? If I only want my home page section to show thumbnails a certain way could I do it that way? I dont know how to activate or utilize creating a custom template. Please clarify how I can do that, I would be able to do some really nice stuff If I could only find how to implement the custom templates.
Reply With Quote
  #6  
Old 13 Dec 2011, 17:24
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Lynne could you answer my question on how to use the custom templates. I have found no solid answer anywhere on how to use it once created. *only have found info for when creating a static page. But what about using it for a specific section. And then letting all the other sections use the standard templates.

I would greatly appreciate any help on this!
Reply With Quote
  #7  
Old 13 Dec 2011, 21:42
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Totally replacing the template for one section? The only part I know you may easily replace is the grid via the layout.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 13 Dec 2011, 22:02
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Ok, how can you use a custom template then. If I select a template this is what is shown
vbcms_content_article_preview:

This template has not been customized in this style or any of its parent styles.

Double-click the template name or click the 'Customize' button to add a customized version of this template to the current style and its child sets.

Last edited June 28 2011 at 16:09 by michael.lavaveshkul
So If you create a new vbcms_content_article_preview template named "vbcms_content_article_custom_preview" how would you use it?
Reply With Quote
  #9  
Old 14 Dec 2011, 01:04
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You would need to modify the code, or write some plugin (not sure you can do it via plugin), to render the new template, if in that specific section, which is not as easy as it sounds.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #10  
Old 14 Dec 2011, 02:49
clayton47 clayton47 is offline
 
Join Date: Oct 2011
I know its not easy as it sounds. Thats why I am here asking this specific question. I just dont know why its made so conveniently easy to "create a custom template" for the vbulletin template structure and no way to conveniently use it.
Reply With Quote
  #11  
Old 14 Dec 2011, 03:21
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
To be fair, changing the template used on the fly isn't exactly standard functionality.

There's no great way to do it, but you should be able to hook into vbcms_article_populate_start and recreate the $view object.

Completely untested:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This would have to be repeated for other content types as needed...

(Actually, on second thought, ignore this. It'll only work if your home page content is assigned to the hme page)

Last edited by Dead Eddie; 14 Dec 2011 at 14:46. Reason: Corrected the view class.
Reply With Quote
  #12  
Old 14 Dec 2011, 04:15
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Thank you for your reply. When you say this would have to be repeated for other content types as needed what does that mean?

All I want to do is have a custom structure of my "home" page which is a specific section in vbulletin terms. And only that section use it.

Heres one part of my reasoning for the custom template for the vbcms_content_article_custom_preview vs the default vbcms_content_article_preview - is the default template has css styling that has the *important rule applied that I cant over ride in the "additional.css". So I was going to add some custom div class's to target the thumbnail images for that specific section.

If you have a better way of achieving this please let me know. Cause I want the default to work everywhere else. I already have to manually add the articles to this "home" section as it is.
Reply With Quote
  #13  
Old 14 Dec 2011, 04:19
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You may override CSS. You just haven't told us the exact rule you wish to override so we can't see exactly where it is in your page (which you also have not linked to) and so we can't tell you what to do. Also, even if you do a new basic page, I'll bet you still use a layout/grid and my guess is the CSS is in there. But, we won't know until you tell us exactly what you need to change.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #14  
Old 14 Dec 2011, 04:30
clayton47 clayton47 is offline
 
Join Date: Oct 2011
I want to change the article preview thumbnail in my home page section.

--------------- Added 14 Dec 2011 at 04:35 ---------------

right now when I try to target the element it reflects it everywhere.
Reply With Quote
  #15  
Old 15 Dec 2011, 21:49
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Do you know what I need to do differently?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:40.

Layout Options | Width: Wide Color: