• Resolved itsbarry

    (@itsbarry)


    Hello,

    Nice plugin.

    I am seeing an extra <p> tag inserted before my first tab. It’s hard to make it disappear with CSS since it doesn’t have its own class, and it’s not a unique descendant of another block element.

    My hack solution was to insert a string replace operation after line 100 in GTTabs.php:

    If ($results_i[0] > 0 ) $op .= substr($a, 0, $results_i[0]);
    $op = str_replace("<p>","",$op);

    -Barry

    http://wordpress.org/extend/plugins/gt-tabs/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Billy Bryant

    (@diomenas)

    Thank you for the information. I will look into this and correct it for the next version!

    Plugin Author Billy Bryant

    (@diomenas)

    I am working to determine what is causing the stray <p> code. Using the fix you came up with; however, is not the permanent solution as if you DO have text before the tabs begin, this removes the starting <p> and leaves a stray </p>. I will look into this further and include a fix in my next release.

    This solution is not working for me.

    Not quite sure why not. To confirm, this is the code:
    the first 2 lines are already present, and only the final line is added to the code. is this correct? I’m using tabs at the top of a page, so it’s leaving an unfortunately large space. is there any way I can get around this?

    ‘#If there is text before the first tab, print it
    If ($results_i[0] > 0) $op .= substr($a, 0, $results_i[0]);
    $op = str_replace(“<p>”,””,$op);’

    Hey Guys – ditto on start of this thread’s “nice plugin” – actually, i’ll double that opening and add “really nice plugin” :>)

    i’m also glad to see this thread as i thought maybe i was losing it when looking at my code via Firebug as i was working on a custom page so was hyper sensitive about CSS and this paragraph thing was confusing me …

    accordingly for whatever it might be worth, here is my take on things in this rogue paragraph dept … note see below for data points re:my test tab content and firebug results …

    thus i tried to read your php and js files but there are a number of ascii equivalents / hex code that make finding the offending <p/> tag difficult … i searched the plugin files for the string (i.e., <p/> – and no this is not typo per firebug results below) yet suspect said <p/> tag is being dynamically generated hence the hex codes …

    i also suspect that said code might really want to be a <br /> code instead of the <p/> as that would kind of make sense inserting a line break above to better insure proper CSS block separation ..??..

    i also found a <br> that could be improved on line 208 in GTTabs.php … here again i suspect it should be <br />

    small stuff but totally appreciate the effort to nuke this bug … as we developers know all to well, one misplaced period or comma and the whole thing can crumble as fatal such and such but i digress …

    thanks again for really cool, elegant, and useful plugin … to be continued :>) cordially, chuck scott

    ===============================
    Test Tab Content
    ===============================
    [tab:Mass Times]
    <h2>Mass Schedule</h2>
    hey mom look at me

    [tab:Mass Thoughts]
    <h2>Mass Thoughts</h2>
    hey mom look at me

    [tab:Mass Thinking]
    <h2>Mass Thinking</h2>
    hey mom look at me

    [tab:Mass Action]
    <h2>Mass action</h2>
    hey mom look at me

    ===============================
    Resulting Firebug CSS Report
    ===============================

    <div class="entry-content">
    <p/>
    <ul id="GTTabs_ul_2317" class="GTTabs" style="display: none;">
    <li id="GTTabs_li_0_2317" class="GTTabs_curr">
    <a id="2317_0" class="GTTabsLinks" onmouseout="GTTabsShowLinks();" onmouseover="GTTabsShowLinks('Mass Times'); return true;">Mass Times</a>
    </li>
    <li id="GTTabs_li_1_2317" class="">
    <a id="2317_1" class="GTTabsLinks" onmouseout="GTTabsShowLinks();" onmouseover="GTTabsShowLinks('Mass Thoughts'); return true;">Mass Thoughts</a>
    </li>
    <li id="GTTabs_li_2_2317" class="">
    </li>
    <li id="GTTabs_li_3_2317" class="">
    </li>
    </ul>
    <div id="GTTabs_0_2317" class="GTTabs_divs GTTabs_curr_div" style="display: block;">
    </div>
    <div id="GTTabs_1_2317" class="GTTabs_divs" style="display: none;">
    </div>
    <div id="GTTabs_2_2317" class="GTTabs_divs" style="display: none;">
    </div>
    <div id="GTTabs_3_2317" class="GTTabs_divs" style="display: none;">
    </div>
    <script type="text/javascript">
    </script>
    </div>

    – fin –

    Plugin Author Billy Bryant

    (@diomenas)

    Thank you for all the wonderful information. I am releasing an updated version shortly and will include these fixes then.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: GT Tabs (formerly postTabs)] GT Tabs generates an empty paragraph before the first tab’ is closed to new replies.