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

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2010, 10:30 AM
AfterWorldForum AfterWorldForum is offline
 
Join Date: Dec 2008
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vB4 tables

Hi,

For various customizations, I have a bunch of vB 3.8.4 templates using tables. They have been set up to use CSS classes like tCat, tborder, etc.

In vB4 these are not available off the bat. What would be the prefered way to rewrite tables like this to vB4 standard?

Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<th class="tcat" colspan="10" align="center">Legend</td>
</thead>
<tr>
<td width="35" class="alt1">foo</td>
<td width="20%" class="alt1">bar</td>
</tr>
I tried messing around with the div structure, and tried mimicing the forumbits class (with the umpteen div-classes below it, but it seems counterproductive to have to translate a simple table into a structure with lord knows how many sub-levels to get the same results.

Alternatively, I'd be willing to add the vB 3.8 CSS to vB4 somehow, but frankly wouldn't know where to look for this.

Any hints, please?

Thanks.

Peter
Reply With Quote
  #2  
Old 05-25-2010, 04:41 PM
AfterWorldForum AfterWorldForum is offline
 
Join Date: Dec 2008
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nobody?
Reply With Quote
  #3  
Old 05-25-2010, 05:26 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It takes some getting used to but the CSS is the better way to go now. I will tell you a secret though. This:

HTML Code:
<div class="restore">

will become your friend as it restores the old way of doing things in some areas of CSS.
Reply With Quote
  #4  
Old 05-26-2010, 04:28 AM
AfterWorldForum AfterWorldForum is offline
 
Join Date: Dec 2008
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for that, Boofoo. It's not that I cannot understand the reasoning behind the CSS switch, but having to create a simple table by using various nested DIVs just seems counter-productive.

I and many others are looking for speed in development, and having to type more (much more) means less speed.

How would I use the restore class? Could you please give an example?

Thanks

Peter
Reply With Quote
  #5  
Old 05-26-2010, 07:30 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AfterWorldForum View Post
Thanks for that, Boofoo. It's not that I cannot understand the reasoning behind the CSS switch, but having to create a simple table by using various nested DIVs just seems counter-productive.

I and many others are looking for speed in development, and having to type more (much more) means less speed.

How would I use the restore class? Could you please give an example?

Thanks

Peter
I used it for my Site Map hack update as well as my User CP Referral ID hack update. I also didn't use tables this time which made everything a lot easier. Here is an example:

Code:
<div class="restore">
	<ul>
		<li><strong><a href="{vb:raw vboptions.bburl}/calendar.php" title="{vb:rawphrase sm_calendarlink_title, {vb:raw bbuserinfo.username}}">Calendar</a></strong></li>
		<li><strong><a href="{vb:raw vboptions.bburl}/sendmessage.php" title="{vb:rawphrase sm_contactlink_title, {vb:raw bbuserinfo.username}}">Contact Us</a></strong></li>
		<li><strong><a href="{vb:raw vboptions.bburl}/faq.php" title="{vb:rawphrase sm_faqlink_title, {vb:raw bbuserinfo.username}}">FAQ</a></strong></li>
		<li><strong><a href="{vb:raw vboptions.bburl}/memberlist.php" title="{vb:rawphrase sm_memberslink_title, {vb:raw bbuserinfo.username}}">Members List</a></strong></li>
		<li><strong><a href="{vb:raw vboptions.bburl}/online.php" title="{vb:rawphrase sm_whosonlinelink_title, {vb:raw bbuserinfo.username}}">Who's Online</a></strong></li>
	</ul>
</div>

Without the restore there, the indentation and bullets no longer showed in that code. If I understand it right, vb 4 now resets the browsers' default rendering of certain HTML elements and uses CSS for it instead. The restore is something they added to reverse that for people who need or want it.

Try this:

<strong>Hello there!</strong> without the div restore wrapping and you will see that it doesn't work. But if you do this:

Code:
<div class="restore">
     <strong>Hello there!</strong>
</div>

Then it becomes bold again. <b> tags work fine, though. Here is a link to the post about it on the com.

http://www.vbulletin.com/forum/proje...?issueid=37123
Reply With Quote
  #6  
Old 08-21-2010, 11:21 AM
AfterWorldForum AfterWorldForum is offline
 
Join Date: Dec 2008
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wrong post. Please ignore.
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:35 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
  • Page Generation 0.04022 seconds
  • Memory Usage 2,216KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete