vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Threadbit Inner Border Width - bottom only? (https://vborg.vbsupport.ru/showthread.php?t=161254)

nothing4me 10-27-2007 04:19 PM

Threadbit Inner Border Width - bottom only?
 
1 Attachment(s)
How would I remove the verticle lines (red in screenshot) and keep the horizontal lines?
(I tried putting the "Inner Border Width" in the style options to "0", but it takes them all away.)

Refer to the attachment.

ChrisLM2001 10-27-2007 04:35 PM

Try the "rules" tag (though I believe it's depreciated in XHTML). Rules="rows" will display only the horizontal row borders. You'll lose the outside vertical border in the process (which can be corrected by wrapping a div around the table).

Or, much better, with solid color background, just change the border color of the td to match the backgrounds (much easier -- just make the border-right/border-left the background color). 1px spacing difference won't be noticed.

nothing4me 10-27-2007 04:39 PM

Quote:

Originally Posted by ChrisLM2001 (Post 1369846)
Try the "rules" tag (though I believe it's depreciated in XHTML). Rules="rows" will display only the horizontal row borders. You'll lose the outside vertical border in the process (which can be corrected by wrapping a div around the table).

Or, much better, with solid color background, just change the border color of the td to match the backgrounds (much easier -- just make the border-right/border-left the background color). 1px spacing difference won't be noticed.

Where would I place the Rules="rows"?

ChrisLM2001 10-27-2007 04:57 PM

Right after all the table $Style tags, on the Forumdisplay template. The threadbit table is split between the forumdisplay (the table header data), and the threadbit template (thread data).

The td/border option is the best way, though. As you can change it all via the stylesheet, and not have to bother hacking the tables you wish to impliment only a row border -- and it verifies. Just search in your stylesheet for a td { } tag, and change the border there. If you just want to change the forumdisplay border rules, just make 2 new CSS tags, like td.fdl [for the td with a border-left:0;], and td.fdr [for border-right:0;], and add the class to the corresponding <td> -- like <td class="fdl">. Much cleaner, and can be used anywhere you need it later, too.

For future reference: the devs added comment lines <!-- --> where a table begins and ends. Use "view source" from the browser to track down the corresponding templates the table headers are split between. This split is seen especially in the bit tables, as they're inserted into another nest of tables.

Messy, messy, messy!

nothing4me 10-27-2007 09:27 PM

Quote:

Originally Posted by ChrisLM2001 (Post 1369863)
Right after all the table $Style tags, on the Forumdisplay template. The threadbit table is split between the forumdisplay (the table header data), and the threadbit template (thread data).

The td/border option is the best way, though. As you can change it all via the stylesheet, and not have to bother hacking the tables you wish to impliment only a row border -- and it verifies. Just search in your stylesheet for a td { } tag, and change the border there. If you just want to change the forumdisplay border rules, just make 2 new CSS tags, like td.fdl [for the td with a border-left:0;], and td.fdr [for border-right:0;], and add the class to the corresponding <td> -- like <td class="fdl">. Much cleaner, and can be used anywhere you need it later, too.

For future reference: the devs added comment lines <!-- --> where a table begins and ends. Use "view source" from the browser to track down the corresponding templates the table headers are split between. This split is seen especially in the bit tables, as they're inserted into another nest of tables.

Messy, messy, messy!

Arggh!! :(

I'm having trouble, what stylesheet are you talking about?

ChrisLM2001 10-28-2007 06:43 AM

Here's the AWFUL editting for this customization, in it's INFAMOUS gory glory.

DISCLAIMERS: This example is all done on an DEFAULT vBulletin template. It's only to change the FORUMDISPLAY THREADBIT table to have no vertical borders, as a custom style, not global. If you want it to be global, just change the table/thead/tcat/td CSS to the below style tags. If you're using a custom template or have a ton of mods, you'll have to fit the code below into your style -- don't just copy and paste it -- look at the code below and add the code to correspond to your custom style, instead.

========
Part ONE
========
In FORUMHOME template, search for <!-- /controls above thread list -->, and replace the header with...

HTML Code:

<table class="tborder" style="border-top:1px solid red; border-right:1px solid red; border-bottom:0; border-left:1px solid red;" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
Notice the cellspacing="0" is at zero? The variable tag was removed, or the default spacing will show (that light blue 1px solid border that surrounds the inside "tcat" and "thead" tds).

========
Part TWO
========

If you want a vertical border separating "Threads in Forum:xxxx", "Forum Tools" and "Search this Forum", goto the first -- class="vbmenu_control" -- in the table above, and after that tag add this...

HTML Code:

style="border-right:1px solid red; border-left:1px solid red;"
Should look like this with the default template...

HTML Code:

<td class="vbmenu_control" style="border-right:1px solid red; border-left:1px solid red;" id="forumtools" nowrap="nowrap"><a href="$show[nojs_link]#goto_forumtools" rel="nofollow">$vbphrase[forum_tools]</a> <script type="text/javascript"> vbmenu_register("forumtools"); </script></td>
==========
Part THREE
==========

To add a border around the threadbit area, since now the tds in the threadbit won't have a right or left border, replace the table header of the table just below the table above, with this...

HTML Code:

<table class="tborder" style="background:#334d80;" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" id="threadslist" style="border:1px solid red;">
Notice I added the style="background:#334d80"? That's due to if you want to add a different border style than "solid" as a border between the thead tds (change it to the color of your thead, to match it well). If you don't define it, the default table background will show through.

=========
Part FOUR
=========

If you want thead td vertical borders, search for the corresponding class="thead" tags of the table above, and add after that tag upto the "Views" td, this...

HTML Code:

style="border-right:1px dotted orange;"
It should look like this :cough vb devs: UGLY MESS :cough vb devs:...

HTML Code:

<table class="tborder" style="background:#334d80;" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" id="threadslist" style="border:1px solid red;">
<tbody>
$announcebits
<tr>
<if condition="$show['search_engine']">
 <if condition="$show['threadicons']">
  <td class="thead" colspan="2">&nbsp;</td>
 <else />
  <td class="thead">&nbsp;</td>
 </if>
 <td class="thead" "width="100%">
  <if condition="$show['threadratings']"><span style="float:$stylevar[right]">$vbphrase[rating]</span></if>
  $vbphrase[thread] / $vbphrase[thread_starter]
 </td>
 <td class="thead" style="border-right:1px dotted orange;" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[last_post]</span></td>
 <td class="thead" style="border-right:1px dotted orange;" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[replies]</span></td>
 <td class="thead" style="border-right:1px dotted orange;" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[views]</span></td>
<else />
 <if condition="$show['threadicons']">
  <td class="thead" style="border-right:1px dotted orange;" colspan="2">&nbsp;</td>
 <else />
  <td class="thead" style="border-right:1px dotted orange;">&nbsp;</td>
 </if>
 <td class="thead" style="border-right:1px dotted orange;" width="100%">
  <if condition="$show['threadratings']"><span style="float:$stylevar[right]"><a href="$sorturl&amp;order=desc&amp;sort=voteavg" rel="nofollow">$vbphrase[rating]</a> $sortarrow[voteavg]</span></if>
  <a href="$sorturl&amp;order=asc&amp;sort=title" rel="nofollow">$vbphrase[thread]</a> $sortarrow[title] /
  <a href="$sorturl&amp;order=asc&amp;sort=postusername" rel="nofollow">$vbphrase[thread_starter]</a> $sortarrow[postusername]
 </td>
 <td class="thead" style="border-right:1px dotted orange;" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=lastpost" rel="nofollow">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
 <td class="thead" style="border-right:1px dotted orange;" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=replycount" rel="nofollow">$vbphrase[replies]</a> $sortarrow[replycount]</span></td>
 <td class="thead" style="border-right:1px dotted orange;" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=views" rel="nofollow">$vbphrase[views]</a> $sortarrow[views]</span></td>
<if condition="$show['inlinemod']">
  <if condition="$show['popups']">
  <td class="thead" "id="imod" align="center" title="$vbphrase[moderation]">
<script type="text/javascript"> vbmenu_register('imod'); </script> </td>
  <else />
  <td class="thead" align="center">
    <input type="checkbox" name="allbox" id="checkall_all" title="$vbphrase[check_uncheck_all]" onclick="inlineMod.check_all()" />
    </td>
  </if>
 </if>
</if>
</tr>
</tbody>

---------
Part FIVE
---------
Edit the CSS in the CSS editor and add this into the "Additional CSS Definitions" box...

HTML Code:

/* Forumdisplay Threadbit TD */
.alt3 {
background:#f5f5ff;
color:#000000;
border-top:1px solid red;
border-right:0;
border-bottom:0px solid red;
border-left:0;
}
.alt4 {
background:#e1e4f2;
color:#000000;
border-top:1px solid red;
border-right:0;
border-bottom:0px solid red;
border-left:0;
}

Add padding; change border-color; and style to your theme, if you prefer.

--------
Part SIX
--------

In the THREADBIT template, replace all class="alt1" and class="alt2" tags with class="alt3" and class="alt4".

--

Now you know why W3C is trying HARD to get rid of tables for this stuff (let alone why there's even so few paid template designers). It's senseless to go through all this just to change the style. Pure bandwidth and load time waste!

ChrisLM2001 10-28-2007 06:52 AM

1 Attachment(s)
And how it would look (just remove the vertical style tags in the How-To above to have a totally horizontal border table; or mix-and-match).

nothing4me 10-28-2007 01:47 PM

You didn't need to write all that. :(

I significantly reduced the amounts of steps by:
--------
Part ONE
--------
Add the following CSS to the extra CSS definitions:
Code:

/* Forumdisplay Threadbit TD */
.alt3 {
background:#f8f7f2;
color:#000000;
border-top:0px solid grey;
border-right:0;
border-bottom:1px solid grey;
border-left:0;
}
.alt4 {
background:#f8f7f2;
color:#000000;
border-top:0px solid grey;
border-right:0;
border-bottom:1px solid grey;
border-left:0;
}

(Notice I replaced top:1px with top:0px and bottom:0px with bottom:1px! It tends to looks better :))
(P.S. Replace grey and #f8f7f2 with a color that matches your forum.)
--------
Part TWO
--------
And then I went to "All Style Options" and change the "Inner Border Width (pixels)" to "0".
After that, I created two style replacement variables.

Quote:

1. Search: class="alt1"
Replace: class="alt3"

2. Search: class="alt2"
Replace: class="alt4"
--------
END
--------
And... Tada! Less work, very clean, less load, no tables. :)

Thanks for helping me! ^.^

ChrisLM2001 10-28-2007 02:02 PM

It's all variations of borders for the forumdisplay/threadbit table, not just removing border-right and border-left. ;)

Some may want no borders for the tcats and theads, while borders for the tds or vice-versa (especially if they want to take the challenge of replacing the tables with divs......READING THAT vBULLETIN DEVS??!!). All that above, shows the variations, and more importantly, where to find the tables to do so.

If vBulletin wouldn't hard-code class/id names, designers could transform those tables into divs faster, let alone remove the style="" statements out and replace them with cleaner class or id tags at random.

It's still all ugly business. Non-practical, time consuming and just a plain waste of resources to use tables for presentation.

nothing4me 10-28-2007 02:19 PM

I wanted to remove all of them. :)

Thanks for the help!

ChrisLM2001 10-28-2007 02:33 PM

TIP: If you wanted to remove all vertical borders globally, you wouldn't even need the alt3 and alt 4 additions. ;) Just apply borders to alt1 and alt2. Alt3 and alt4 was included for those who only wanted to change the FORUMDISPLAY layout, while maintaining the default borders, elsewhere (like in menus).

Changing the inner widths and padding via the Stylevar editor, is the global solution, and nothing but style"" tags to wrap the naked tds would be needed for the loss of outer table borders.

nothing4me 10-28-2007 02:41 PM

Quote:

Originally Posted by ChrisLM2001 (Post 1370407)
TIP: If you wanted to remove all vertical borders globally, you wouldn't even need the alt3 and alt 4 additions. ;) Just apply borders to alt1 and alt2. Alt3 and alt4 was included for those who only wanted to change the FORUMDISPLAY layout, while maintaining the default borders, elsewhere (like in menus).

Changing the inner widths and padding via the Stylevar editor, is the global solution, and nothing but style"" tags to wrap the naked tds would be needed for the loss of outer table borders.

Argh :( You beat me! Thanks for that tip, I undo'd mine and did yours. :)


All times are GMT. The time now is 05:49 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.01180 seconds
  • Memory Usage 1,803KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (7)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete