Categories > TinyButStrong general >

Difference between 1.96 and 1.97.12

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2004-07-25
Time: 12:37

Difference between 1.96 and 1.97.12

I am getting this error which I didn't get before:
TinyButStrong Error (Block definition): {lst.title} can not be enlarged or extended.

template part:
<table width="100%" border="0" cellpadding="1" cellspacing="0" class="topArt">
    <tr>
        <td valign="top" class="wsheader">
            <input type="hidden" name="article_nr" value="{lst.article_nr;htmlconv=no}">
            {lst.article_nr;htmlconv=no}&nbsp;&nbsp;-&nbsp;&nbsp;{lst.title;block=table;htmlconv=no;encaps=2}
        </td>
    </tr>
</table>

template
//Merge the block by page
$tbs->LoadTemplate($dir['templ'] . 'article.htm') ;
$tbs->MergeBlock( 'lst', $curr_art );
$tbs->MergeSpecial('var');
$tbs->Show();

// Contents of $curr_art
//Array
//(
//    [0] => Array
//        (
//            [article_id] => 9783
//            [article_nr] => trhrthtrh
//            [cat_id] => 552
//            [title] => trhhtth
//            [descr] => trhrthr
//        )
//
//)


But, it does show the entire contents of the variable!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

By: RwD
Date: 2004-07-25
Time: 12:39

Re: Difference between 1.96 and 1.97.12

Even worse!!
noerr does not remove the message!!!!!
By: Skrol29
Date: 2004-07-25
Time: 14:54

Re: Difference between 1.96 and 1.97.12

Hi,

In your block definition, you have "block=table" and "encaps=2".
But the table is not encapsulated into another table.
Just drop "encaps=2" and all will run ok.

Block definition errors can't be stopped by parameter "noerr".
I don't know why TBS 1.96 didn't make an error (I will have a look) but the error is real.

I'll try to make this error message more detailed in next version.
By: RwD
Date: 2004-07-25
Time: 15:39

Re: Difference between 1.96 and 1.97.12

There is more to the template, and encaps=2 removed gives more errors.

more template:
<!-- next article -->
<!-- form start -->
<form action="basket.php" method="POST" name="articlesubmit_{lst.article_id}" onsubmit="return CanContinue();">
<input type="hidden" name="lang" value="{var.def.lang;noerr}" />
<table width="100%" border="0" cellpadding="1" cellspacing="0" class="topArt">
    <tr>
        <td valign="top" class="wsheader">
            <input type="hidden" name="article_nr" value="{lst.article_nr;htmlconv=no}">
            {lst.article_nr;htmlconv=no}&nbsp;&nbsp;-&nbsp;&nbsp;{lst.title;block=table;htmlconv=no}
        </td>
    </tr>
</table>
<table width="100%" border="0" cellpadding="4" cellspacing="0" class="midArt">
    <tr>
        <td width="100"  valign="center" align="center" nowrap class="wsback1">
<!-- choice 1/4: both image and thumb -->
            {tbs_check.a3-{lst.article_id};if '{var.img_display}' = '3';block=td}
            <a href="#" onclick="m_ShowPicture( '/data/article/images/{lst.image;htmlconv=no;friendb=a}' ); return false;" target="_blank">
            <img src="/data/article/images/thumbnails/{lst.image_thumb;htmlconv=no;friendb=img}" border="0">
            </a>
        </td>
        <td width="100" valign="center" align="center" nowrap class="wsback1">
<!-- choice 2/4: only an image -->
            {tbs_check.a2-{lst.article_id};if '{var.img_display}' = '2';block=td}
            <a href="#" onClick="m_ShowPicture( '/data/article/images/{lst.image;htmlconv=no;friend=a}' ); return false;" target="_blank" class="fade art_links">
            <img src="/user/images/store/camera.gif" border="0" alt="{var._syst_view_large_image}">
            <!-- Oude text: Grote<br/>afbeelding -->
            </a>
        </td>
        <td width="100"  valign="center" align="center" nowrap class="wsback1">
<!-- choice 3/4: anly a thumb -->
            {tbs_check.a1-{lst.article_id};if '{var.img_display}' = '1';block=td}
            <img src="/data/article/images/thumbnails/{lst.image_thumb;htmlconv=no;friendb=img}" border="0">
        </td>
        <td width="100" valign="top" nowrap class="wsback1">
<!-- choice 4/4: no image at all -->
            {tbs_check.a0-{lst.article_id};if '{var.img_display}' = '0';block=td}
            <font class="InactiveLink">
            {var._syst_no_image}
            </font>
        </td>
        <td width="90%" height="50" valign="top" class="wsback2">
            <b>{var._syst_article_description}</b><br/>
            {lst.descr;htmlconv=wsp;.}<br/>
        </td>
    </tr>
</table>
By: Skrol29
Date: 2004-07-25
Time: 16:22

Re: Difference between 1.96 and 1.97.12

Hi,

I think I understand what you're trying to do.
It should work with "extend=1" on the tag having "block=table"
Without "extend=1", other Field tags are outside the block.

It would be better if you merge [tbs_check] tags before to merge the "lst" block. You can do this using MergeSpecial('tbs_check'), but you will have to change [tbs_check] subnames before.
By: RwD
Date: 2004-07-26
Time: 13:49

Re: Difference between 1.96 and 1.97.12

That did not work quite right either, the program now complains it doesn't know the first article_id (in the form name)

however, I simply cancelled that error (noerr) and tested if everything worked. At that moment I was too tired to fix it properly. I will keep it this way for now (if it is working, don't fix it ;))