The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I know I probably should know how to do this but I just can't get it right ^^;
Anyway, how do you make things display in columns instead of rows? Like after you grab data from the database, your bit template has to be different. Instead of just <tr><td> which will create just rows, how do you make it so there's 4 columns (of images in this case) instead? Sorry for the confusing explanation. Thanks! :ninja: |
|
#2
|
|||
|
|||
|
Add a conditional for the <tr> tags. Like so:
Code:
<table width="600" align="center" cellpadding="4" cellspacing="8" class=alt2">
<?
$a=0;
while($row=mysql_fetch_object($XX))
{
-- Variables placed here to call image title, file name in loop --
if ($a == '0') {echo "<tr>";}
if ($a == '4') {echo "</tr><tr>";}
if ($a == '8') {echo "</tr><tr>";}
if ($a == '12') {echo "</tr><tr>";}
if ($a == '16') {echo "</tr><tr>";}
if ($a == '20') {echo "</tr><tr>";}
?>
<td class="alt4" align="center" width="25%" valign="middle">
-- Image code here --
</td>
<?
$a = $a + 1;
}
?>
</table>
|
|
#3
|
||||
|
||||
|
Thanks Jolten! I think I've tried doing that but it hasn't worked yet for me. >.> Maybe I did something wrong, but I'll follow your structure.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|