Premium Membership
Subscription graphics design php html youtube
Gold Subscription with Silver access
graphics design php html youtube
Live Support
Contact us by live help [photoshop, website design, tutorials]
Not available on weekends
Western Studios :: View topic - Need some help creating columns and rows in a module...
Need Jobs done? Use our brand new Jobs Board to get your projects done at affordable prices.
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups     ProfileProfile   Log inLog in 


Need some help creating columns and rows in a module...


Goto page 1, 2  Next
 
Post new topic   Reply to topicprinter friendly version    Western Studios Forum Index -> Hack and Mods
View user's profileSend private messageReply with quote
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:

Code:

$image = $row['imgurl'];
      
if ($image == "") {
echo "<td cols=\"2\"><center><a href=\"modules.php?name=Video_Stream&amp;page=watch&amp;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&amp;page=watch&amp;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&amp;page=watch&amp;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&amp;page=watch&amp;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&amp;page=watch&amp;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

View user's profileSend private messageSend e-mailVisit poster's websiteReply with quote
admin(Mark) wrote:

hi, this tutorial should help you

http://v2media.biz/templates_graphics_tutorials/php/php_horizontal_looping.htm

If you need help setting it up with phpnuke let me know.

Posted: Tue Feb 21, 2006 9:14 pm

View user's profileSend private messageReply with quote
seboyd2000 wrote:

Admin

Thanks for the link, i reviewed it and could you maybe turn it into a usable & understandable piece of coding that I could use with phpnuke. Say a 3 column, multiple rows type code that has changable slots at the top of the code page to enter the row or column amounts... or do a nice Tutorial on it instead, that also shows a usuable piece of code in it,

$rows = 5;
$columns = 3;

I know that $rows probably should not be used because it is used in nuke coding so much, this is only an example of something that would be nice to have for simple adjustments at the top of the code page.


thanks for your help

Posted: Wed Feb 22, 2006 7:44 pm

View user's profileSend private messageReply with quote
seboyd2000 wrote:

?????????????????????????????????????????????????????????????

thanks

Posted: Sat Mar 04, 2006 9:25 am

View user's profileSend private messageSend e-mailVisit poster's websiteReply with quote
admin(Mark) wrote:

I have an easier way to do this. I'll post the codes for you soon.

Posted: Sun Mar 05, 2006 1:07 pm

Post new topic   Reply to topic    Western Studios Forum Index -> PHP Nuke -> Hack and Mods All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Hundreds of Gmail invites to give away 2 Anna 1043 Sat Feb 04, 2006 11:01 am
leachy View latest post
No new posts PHP Nuke klips 0 admin 1275 Fri Mar 18, 2005 6:52 pm
admin View latest post
No new posts Paypal success.php 1 Jabba 1395 Fri Mar 04, 2005 7:00 pm
admin View latest post
No new posts Testing PHP tags 2 admin 1434 Thu Mar 03, 2005 6:06 pm
admin View latest post
No new posts PHP Nuke Icons 0 admin 1490 Mon Aug 23, 2004 4:05 pm
admin View latest post
 


New Subscribers



Subscriber

Franktwss

Platinum Subscribers

#1
Subscriber

coopvet2000

Platinum Subscribers

#2
Subscriber

inthee30zone

Platinum Subscribers

#3
Subscriber

kowalski

Silver Subscribers

#4
Subscriber

MikeMc

Platinum Subscribers

#5




Our Sponsors



Advertise with Western Studios.net
PHP Nuke themes, stock photos, icons, drupal themes and more.
Horror Movie
Custom jobs at low cost, free lancers and service buyers.


Downloads



Latest in downloads

Most downloaded


Jobs





Community

Western Studios is an award winning website creating website disign and professional php scripts.

Associated Sites

Marketplace Themes, scripts, icons and images

Themes site PHP Nuke themes preview site.