vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   HTML Table Converted to BBCode (https://vborg.vbsupport.ru/showthread.php?t=325671)

ChefBryardee 10-13-2017 03:50 AM

HTML Table Converted to BBCode
 
I posted an HTML table in one of my threads and it converted the coding from the standard <td> elements to [TD] elements and it completely disregarded all the <style> coding I made. I enabled HTML coding in the forum, but it still went haywire.

Any ideas?

ChefBryardee 10-15-2017 05:59 AM

Bump

ChefBryardee 10-18-2017 11:48 PM

Any help?

blind-eddie 10-19-2017 10:10 AM

Show us your bbcode for this please.

ChefBryardee 10-20-2017 12:45 AM

It changes this original coding;

Code:

<!DOCTYPE html>
<html>
<head>
<style>
        table {
            height: auto;
        width: 750px;
        border: 3px solid grey;
        border-collapse: collapse;
        font-family: Droid Sans;
}
        th {
            height: auto;
        width: 50%;
        border: 3px solid grey;
        border-collapse: collapse;
        padding: 5px;
        font-family: Droid Serif;
        color: #B21A41;
}
        td {
            height: auto;
        width: 50%;
        padding: 10px;
}
        td.stats {
            height: auto;
        width: 50%;
        padding-left: 30px;
        padding-right: 30px;
}
        td.back {
            height: auto;
        width: 100%;
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 50px;
        padding-right: 20px;
}
</style>
</head>
<body>
<table>
    <tr>
            <th colspan="2">TEST</th>
    </tr>
    <tr>
            <td colspan="2" align="center">TEST</td>
    </tr>
    <tr>
            <th>TEST</th>
        <td class="stats" rowspan="2">TEST</td>
    </tr>
    <tr>
            <td>TEST</td>
    </tr>
    <tr>
            <th colspan="2">TEST</th>
    </tr>
    <tr>
            <td class="back" colspan="2">TEST</td>
    </tr>
</table>
</body>
</html>


Into this coding, and none of the styling is applying properly in the resulting table:

Code:

<style>
    table {
        height: auto;
        width: 750px;
        border: 3px solid grey;
        border-collapse: collapse;
        font-family: Droid Sans;
}
    th {
        height: auto;
        width: 50%;
        border: 3px solid grey;
        border-collapse: collapse;
        padding: 5px;
        font-family: Droid Serif;
        color: #B21A41;
}
    td {
        height: auto;
        width: 50%;
        padding: 10px;
}
    td.stats {
        height: auto;
        width: 50%;
        padding-left: 30px;
        padding-right: 30px;
}
    td.back {
        height: auto;
        width: 100%;
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 50px;
        padding-right: 20px;
}
</style>



   
       


       


       



       


       


       

[TABLE]
<tbody>[TR]
[TH="colspan: 2"]TEST[/TH]
    [/TR]
    [TR]
[TD="colspan: 2, align: center"]TEST[/TD]
    [/TR]
    [TR]
[TH]TEST[/TH]
        [TD="class: stats"]TEST[/TD]
    [/TR]
    [TR]
[TD]TEST[/TD]
    [/TR]
    [TR]
[TH="colspan: 2"]TEST[/TH]
    [/TR]
    [TR]
[TD="class: back, colspan: 2"]TEST[/TD]
    [/TR]
</tbody>[/TABLE]


MarkFL 10-20-2017 01:40 AM

First, I would highly recommend against allowing HTML to be posted, unless you are the only one allowed to post in the forum where you have it allowed.

I would move the CSS to your additional.css template, with the appropriate id/class selectors so that it affects table elements in your posts/post previews only.

I think the way I would go about it would be to create custom BBCodes to construct custom tables.

By the way, I tested your code on my local dev site, and while it was a mess, the HTML was not converted to BBCodes...I have no idea how that's happening unless you have custom code doing that. :)


All times are GMT. The time now is 01:10 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.00993 seconds
  • Memory Usage 1,727KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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