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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-18-2009, 09:53 AM
nirvana43's Avatar
nirvana43 nirvana43 is offline
 
Join Date: Oct 2007
Location: Pune, India
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default css class problems on vb4 custom page

I'm trying to use predefined css classes from vbulletin on my custom page.
However its not showing me expected output (data in predefined class).
It just displays simple text output with no style.
My template under main style contains following code :
Code:
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle}</title>
    {vb:raw headinclude}
  </head>
  <body>
    
    {vb:raw header}
    
    {vb:raw navbar}
        
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
    
    <h2 class="blockhead">MY TEST PAGE</h2>
    <div class="blockbody">
      <div class="blockrow">


<table class="tborder" align="center">
<tr><td>My Test Data</td></tr></table>

<p class="forumdescription">My Test Description</p>


      </div>
    </div>
     {vb:raw footer}
  </body>
</html>
Above template gives me following output with no styles :
Quote:
My Test Data
My Test Description
Reply With Quote
  #2  
Old 12-18-2009, 02:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you doing anything to include the correct css templates in your page? Which css templates are you wanting to include?
Reply With Quote
  #3  
Old 12-19-2009, 12:25 AM
nirvana43's Avatar
nirvana43 nirvana43 is offline
 
Join Date: Oct 2007
Location: Pune, India
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Are you doing anything to include the correct css templates in your page? Which css templates are you wanting to include?
I haven't created any css of my own.. i'm willing to include vbulletin's default style css...
Another thing is, whenever i switch to different style, it should automatically include that style's default css template..
I mean just like vbulletin 3.8 and below versions used to do.

for e.g. I'm willing to use "tborder", "tcat" etc. css classes which always comes with default css of any style.
Reply With Quote
  #4  
Old 12-19-2009, 01:20 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What I'm saying is that you are using classes like blockhead and blockbody, which is fine, except it isn't going to do any styling unless you define those classes. You can find where vbulletin defines them and include the stylesheet in your mod, or you can define them yourself in the head of your template.
Reply With Quote
  #5  
Old 12-19-2009, 02:06 AM
nirvana43's Avatar
nirvana43 nirvana43 is offline
 
Join Date: Oct 2007
Location: Pune, India
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply Lynne,
I can't find where vbulletin defines blockhead and blockbody classes also... i mean in which css template..
And i'm trying to catch "tborder", "tcat" css classes from vbulletin's main CSS (The one we reach from AdminCp->Styles & Templates->Style Manager->Main CSS) but i cant find which css i'm suppose to include.. (or do i even have to include one manually for those classes)

Main CSS contains all the classes i'm willing to use in my custom template.
Reply With Quote
  #6  
Old 12-19-2009, 02:48 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do a Search in Templates for "blockhead" or "blockbody" and you should find them (probably in vbulletin.css). As for tborder and tcat, those are from vb3. They are not in vB4.

You say Main CSS contains all the classes you are willing to use, however, none of the class in Main CSS are in vB4. You are going to have to create your own css is my guess.
Reply With Quote
  #7  
Old 12-19-2009, 03:55 AM
nirvana43's Avatar
nirvana43 nirvana43 is offline
 
Join Date: Oct 2007
Location: Pune, India
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just found "blockbody" and "blockhead". They are :
Code:
<link rel="stylesheet" type="text/css" href="css.php?styleid=1&amp;langid=1&amp;d=1261137425&amp;td=ltr&amp;sheet=vbulletin.css,popupmenu.css,vbulletin-chrome.css,components.css,vbulletin-formcontrols.css" />
Please check attached image. class "tborder" and "tcat" does exists in Main CSS.
May i please know how do i use those classes? or at least syntax to include that css.
Attached Images
File Type: jpg aa.jpg (106.9 KB, 0 views)
Reply With Quote
  #8  
Old 12-19-2009, 03:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure, it was in vB3, but it isn't in vB4. It says right at the top of that page:
Quote:
Obsolute - This CSS file is obsolete and is available here for reference purposes only.
Reply With Quote
  #9  
Old 12-20-2009, 11:37 AM
nirvana43's Avatar
nirvana43 nirvana43 is offline
 
Join Date: Oct 2007
Location: Pune, India
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Lynne for your time.
Finally i had to design my own css template for this issue.
Thank you again.

P.S. By any chance if you know any such inbuilt table classes (like tborder, thead, tcat etc.) then it will be very huge favor.
Reply With Quote
  #10  
Old 12-20-2009, 04:59 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can grab all the old stuff from an old .css file, like this from a default css file on my 3.8 site:
Code:
.tborder
{
	background: #D1D1E1;
	color: #000000;
	border: 1px solid #0B198C;
}
.tcat
{
	background: #869BBF url(../../images/gradients/gradient_tcat.gif) repeat-x top left;
	color: #FFFFFF;
	font: bold 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.tcat a:link, .tcat_alink
{
	color: #ffffff;
	text-decoration: none;
}
.tcat a:visited, .tcat_avisited
{
	color: #ffffff;
	text-decoration: none;
}
.tcat a:hover, .tcat a:active, .tcat_ahover
{
	color: #FFFF66;
	text-decoration: underline;
}
etc
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 02:00 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.07566 seconds
  • Memory Usage 2,278KB
  • Queries Executed 12 (?)
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
  • (3)bbcode_code
  • (3)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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete