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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2007, 04:18 PM
PntSingularity's Avatar
PntSingularity PntSingularity is offline
 
Join Date: Feb 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Flat-Style Quote Box

Here's a flat-style quote box I made. The colors are adapted for the original vB theme.

Code:
<table width="100%" border="0">
<tr><td width="100%" align="center">
<table width="97%" border="0">
  <tr>
    <td width="100%" bgcolor="#738FBF">
      <table width="100%" border="0" bgcolor="#E1E4F2">
        <tr>
          <td width="1%" bgcolor="#738FBF" nowrap align="left" valign="top">
            &nbsp;<font size="1"><b>
            <if condition="$show['username']">
                <phrase 1="$username">$vbphrase[originally_posted_by_x]</phrase>
		<if condition="$postid">
                  <a href="showthread.php?$session[sessionurl]p=$postid#post$postid" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/viewpost.gif" border="0" alt="$vbphrase[view_post]" /></a>
                </if>
            <else />
              Quoted Text
            </if>
            </b></font>&nbsp;</td>
          <td width="99%" bgcolor="#E1E4F2">&nbsp;</td>
        </tr>
        <tr>
          <td width="100%" bgcolor="#E1E4F2" colspan="2">
            <table width="100%" cellpadding="2">
              <tr>
                <td width="100%" align="left" valign="top">
                  $message
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</td></tr>
</table><br />
Click here to see it in action.
If you keep reading through that thread you will find the code to have the very same box as custom bbCode (but with another color scheme). I use the custom one for OOC (Out-of-Character) posts, since it's a roleplaying forum.
Reply With Quote
  #2  
Old 02-16-2007, 06:09 AM
CyberAlien's Avatar
CyberAlien CyberAlien is offline
 
Join Date: Mar 2002
Posts: 438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That looks nice, but there are way too many tables. Why use extra table for border when you can set border to <td> or <table>?

This is the same code (approximately, I didn't test it. you might need to adjust padding and margin to make it look exactly the same), but with much less code and inline styling that you can move to classes in css making code much smaller and easier to adjust for different color schemes:
Code:
<div style="width: 80%; margin: 2px auto; border: solid 1px #738FBF; padding: 5px 2px; text-align: left; background-color: #E1E4F2;">
	<span style="padding: 3px 3px 0 3px; background-color: #738FBF; font-weight: bold; font-size: 10px; color: #000;">
            <if condition="$show['username']">
                <phrase 1="$username">$vbphrase[originally_posted_by_x]</phrase>
		<if condition="$postid">
                  <a href="showthread.php?$session[sessionurl]p=$postid#post$postid" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/viewpost.gif" border="0" alt="$vbphrase[view_post]" /></a>
                </if>
            <else />
              Quoted Text
            </if>
	</span>
	<div style="margin: 5px 2px; font-size: 11px;">$message</div>
</div>
Reply With Quote
  #3  
Old 02-16-2007, 10:31 AM
PntSingularity's Avatar
PntSingularity PntSingularity is offline
 
Join Date: Feb 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CyberAlien View Post
That looks nice, but there are way too many tables. Why use extra table for border when you can set border to <td> or <table>?

This is the same code (approximately, I didn't test it. you might need to adjust padding and margin to make it look exactly the same), but with much less code and inline styling that you can move to classes in css making code much smaller and easier to adjust for different color schemes:
That was less code indeed. I might try it out. Thing is, I'm not that good at coding. This new "div" thing that I see more and more widely used instead of tables is somewhat confusing.
However, I looked all over the net for the code for a nice box. I could find code for any box at all, and therefore decided to make my own.
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 09:54 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.03586 seconds
  • Memory Usage 2,180KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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