seboyd2000 wrote:
*
I read all the Tutorials as a Subscriber but didnt see anything like this, there..
Could someone give me some basic coding for a phpnuke module that will allow me to create Columns & Rows.
Lets say I want a module that will show or display 3 columns of images & 4 rows high, which would equul 12 thumbnails per page.
---------------------------------------------
Then if thats not to hard, what it does from there is the thunbnail image is either going to be a blank.gif or one the person will upload at the time of image submission.
So in each occurance of these 12 thumbnails on the page , they will have their own thumbnail picture and a "Go To" link.
Here the coding that tells which image to pull or show per occurance on the module page:
and heres what that above looks like it the table that currently will only show one column (the next coding is what I want to change to 3 columns and 4 rows):
thank in advance
Posted: Tue Feb 21, 2006 7:06 pm
*
I read all the Tutorials as a Subscriber but didnt see anything like this, there..
Could someone give me some basic coding for a phpnuke module that will allow me to create Columns & Rows.
Lets say I want a module that will show or display 3 columns of images & 4 rows high, which would equul 12 thumbnails per page.
---------------------------------------------
Then if thats not to hard, what it does from there is the thunbnail image is either going to be a blank.gif or one the person will upload at the time of image submission.
So in each occurance of these 12 thumbnails on the page , they will have their own thumbnail picture and a "Go To" link.
Here the coding that tells which image to pull or show per occurance on the module page:
Code: |
|
$image = $row['imgurl']; if ($image == "") { echo "<td cols=\"2\"><center><a href=\"modules.php?name=Video_Stream&page=watch&id=".$row['id']."\"><img src=\"modules/Video_Stream/images/noimage.gif\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$row['vidname']."\"></a></center></td>"; } else{ echo "<td cols=\"2\"><center><a href=\"modules.php?name=Video_Stream&page=watch&id=".$row['id']."\"><img src=\"".$image."\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$row['vidname']."\"></a></center></td>"; } |
and heres what that above looks like it the table that currently will only show one column (the next coding is what I want to change to 3 columns and 4 rows):
Code: |
|
$result = $db->sql_query("SELECT * FROM ".$prefix."_video_stream ORDER BY id DESC LIMIT $d,10"); $rowvid = $db->sql_numrows($result); $result2 = $db->sql_query("SELECT * FROM ".$prefix."_video_stream"); $rowvid2 = $db->sql_numrows($result2); // If videos are in the DB then they are displayed. if ($rowvid != "0") { while($row = $db->sql_fetchrow( $result )) { $userav = $row['user']; if ($row['rating'] == "") {$rating = "0";} else {$rating = $row['rating'];} $id = $row['id']; echo "<table width=\"35%\" align=center bgcolor=$bgcolor2 border=\"1\" cellspacing=\"1\" cellpadding=\"5\"><tr><td>"; echo "<table width=\"100%\" align=center bgcolor=$bgcolor1 border=\"1\" cellspacing=\"1\" cellpadding=\"5\"><tr><td>"; //avatars($userav); echo "<b>Title</b>: <a href=\"modules.php?name=Video_Stream&page=watch&id=".$row['id']."\"><b>".$row['vidname']."</b></a><br>"; echo "<b>Date</b>: <strong><font size=\"2\">".$row['date']."</font></strong><br><b>By</b>: ".$row['user'].""; echo "".$row['description'].""; category($id); echo "</td></tr></table>"; echo "<br>"; echo "<table width=\"100%\" align=center bgcolor=$bgcolor1 border=\"1\" cellspacing=\"5\" cellpadding=\"5\"><tr>"; $image = $row['imgurl']; if ($image == "") { echo "<td cols=\"2\"><center><a href=\"modules.php?name=Video_Stream&page=watch&id=".$row['id']."\"><img src=\"modules/Video_Stream/images/noimage.gif\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$row['vidname']."\"></a></center></td>"; } else{ echo "<td cols=\"2\"><center><a href=\"modules.php?name=Video_Stream&page=watch&id=".$row['id']."\"><img src=\"".$image."\" border=\"0\" width=\"175\" height=\"150\" alt=\"".$row['vidname']."\"></a></center></td>"; } echo "</tr></table><center>"; echo "</center></td></tr></table><br>"; } $pages = ceil($rowvid2 / 10); $current = ceil(($d + 1)/10); |
thank in advance
Posted: Tue Feb 21, 2006 7:06 pm





















