Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-14-2011, 03:21 AM
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Location: at Home...
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

PHP Code:
if(self::VIEW_PREVIEW == $viewtype && $this->content->getParentId() == 1//set to the node id of your home page.
{
$view = new vB_View_Article('vbcms_content_article_custom_preview');

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)
Reply With Quote
  #12  
Old 12-14-2011, 04:15 AM
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 12-14-2011, 04:19 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #14  
Old 12-14-2011, 04:30 AM
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want to change the article preview thumbnail in my home page section.

--------------- Added [DATE]1323840903[/DATE] at [TIME]1323840903[/TIME] ---------------

right now when I try to target the element it reflects it everywhere.
Reply With Quote
  #15  
Old 12-15-2011, 09:49 PM
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you know what I need to do differently?
Reply With Quote
  #16  
Old 12-15-2011, 11:12 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about a link to the section you wish to change and a link to a section that should stay the same.
Reply With Quote
  #17  
Old 12-15-2011, 11:25 PM
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I will post a link soon as I get my custom style loaded. I am having difficulty for some reason.
Reply With Quote
  #18  
Old 12-19-2011, 05:04 PM
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok the url is texasmx.com/forums the site is password protected since it is in a testing directory. I will pm you the login details so you can access it. you will see one thumbnail on the home page of the cms in the post "welcome to texasmx" I would like to make the preview thumbnail larger. maybe even full width of that area. and then style the title and preview text differently. I just cant seem to figure how to override the default *important styling. This is the point I was trying to make a custom template and rename the divs around the code that calls the content. Since this is the only section that will really be using thumbnails I can just have the archives of that section display it the same way.

Looking forward to your response!
Reply With Quote
  #19  
Old 12-21-2011, 03:55 PM
clayton47 clayton47 is offline
 
Join Date: Oct 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne did you happen to take a look yet?
Reply With Quote
  #20  
Old 12-21-2011, 09:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by clayton47 View Post
Lynne did you happen to take a look yet?
I replied to you just after I got your PM.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 05:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04419 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete