SMF: 1.1.5
I know this topic might go under the SMF Gallery Mod area, but I don't really think it does. I just need help making the entries from the mod into rows. I already know how to pull all the data and I am already doing that. But if a person has more than 1 category then they all merge into 1 which doesn't look pretty.
So I am asking, does anyone know how to do this?
Currently using this code
<table width="100%" border="0" bgcolor="#000000" class="photosets">
<tr>
<td width="33%" rowspan="4" align="center" valign="middle"><?php
$data = mysql_query("SELECT * FROM vgsmf_gallery_usercat WHERE ID_MEMBER = $feed0") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
if( $info['image'] != '')
Print "<a href=http://76.166.246.152/vg/boards/index.php?action=gallery;su=user;cat=".$info['USER_ID_CAT'].";u=".$feed0."><img src=".$info['image']." height=100 /></a><br>";
if( $info['filename'] != '')
Print "<a href=http://76.166.246.152/vg/boards/index.php?action=gallery;su=user;cat=".$info['USER_ID_CAT'].";u=".$feed0."><img src=http://76.166.246.152/vg/boards/gallery/catimgs/".$info['filename']." height=100 /></a><br>";
}
?></td>
<?php
$data = mysql_query("SELECT * FROM vgsmf_gallery_usercat WHERE ID_MEMBER = $feed0") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
if( $info['title'] != '')
Print "<td valign=top><p><span class=style52>Title: ".$info['title'] ."<br></span></p></td>
</tr>";
}
?>
<?php
$data = mysql_query("SELECT * FROM vgsmf_gallery_usercat WHERE ID_MEMBER = $feed0") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
if( $info['total'] != '')
Print "<tr>
<td valign=top># of Photos: ".$info['total']."<br></td>
</tr>";
}
?>
<?php
$data = mysql_query("SELECT * FROM vgsmf_gallery_usercat WHERE ID_MEMBER = $feed0") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
if( $info['description'] != '')
Print " <tr>
<td valign=top>Info:<br>".$info['description'] ."<br></td>
</tr>";
}
?>
</table>
$feed0 = ID_MEMBER(I have it defined at the top of the page that this code is imported onto)
That is the code that I am currently using to pull all the values for the variables. But like I said, if the person has more than 1 category, then it merges all into 1 which is not good.
What I want done is that, if a person makes a new category that it will use the above code and create a whole new table with all the features I have applied to it.
Is this possible?
For an example of what the code looks like in action right now, view here:
Its right under Photo Sets
http://76.166.246.152/vg/ourgirls/81/