Categories > TinyButStrong general >

TBS Newbie Needs A Little Help

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Shawn
Date: 2004-12-03
Time: 15:02

TBS Newbie Needs A Little Help

First I love TBS.  It's by far the simplest template system I have run across.  I'm able to pull data from my database, but what I'm trying to do is loop thru the database creating a new table with each record.

Here's my code:




<td bgcolor="#eeeeee"> <a href="#"  target="_blank" class="category_links">[b1.softwaretitle]</a>&nbsp;<font color=red><small><sup class=upd>Updated</sup></small></font>
            &nbsp;<font color=green><small><sup class=pop>Popular</sup></small></font>
            &nbsp;<font color=red><small><sup class=fea>Featured</sup></small></font>
            <small><sup class=new>New</sup></small></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF" colspan=2 valign=top><p>[b1.description]<font face="Verdana,Helvetica" size=2 color="black"><small><br>
              <br>
              <font face="Verdana,Helvetica" size=2 color="black"><small><strong>Rating:</strong>
              <img src="[b1.rating]"> <strong>Size:</strong> 1.33 MB </small></font><small><strong>Screenshot:</strong>
              <a href="images/desktop-armor.gif">click here</a> <strong>Platform:</strong>
              [b1.operatingsystem]</small><br>
              <a href="desktop-armor.php"><img src="images/try.gif" width="124" height="25" border="0"></a></small></font>
              <a href="http://www.regnow.com/softsell/nph-softsell.cgi?item=5696-7&affiliate=36105" target="_blank"><img src="images/buy.gif" width="124" height="25" border="0"></a>
            </p>
            </td>

Here's what I'm trying to accomplish (but this was done manually)

http://www.exefiles.com/antivirus.php

By: Skrol29
Date: 2004-12-03
Time: 15:23

Re: TBS Newbie Needs A Little Help

Hello,

There are several ways to do it. Here are 3 examples including 2 that can do the space between each tables.

With no space between tables:
<table>
   ... [b1.softwaretitle;block=table] ...
</table>

Using explicit block syntax and <br> for the space:
[b1;block=begin]
<table> ... </table>
<br>
[b1;block=end]

Using encapsulated tables, and a blank row for the space:
<tr>
   <table>
      <tr>
        ... [b1.softwaretitle;block=tr;encaps=2extend=1]
       </tr>
   </table>
  </tr>
  <tr> ... (blank row) ... </tr>
By: Shawn
Date: 2004-12-03
Time: 15:26

Re: TBS Newbie Needs A Little Help

Skrol,

Thanks for the fast response.  I'll give it a shot and update you via this thread on my success.  Fingers are crossed.  Smile.

Sincerely,

Shawn
By: Shawn
Date: 2004-12-03
Time: 15:31

Re: TBS Newbie Needs A Little Help

Skrols,

Here's the update.  It worked like a champ!  Thanks.

Sincerely,

Shawn