Top Download Block Table , Please HELPPPP

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Top Download Block Table , Please HELPPPP
LongStand
CZ Newbie
LongStand has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 24, 2004
0.00 posts per day
Posts: 8
Points: 388
   
Well iam trying to put 3 or 4 Top list on this block, but i cant, becouse it need somekind of Html tag to make table, so i have try to make it so there will be 3 Top Download on 1 Row and another 3 Top Download under it, but i cant cant get it to work. i dont know what to change on the $content.="<, and i dont know what to add to it, please help me out before this coming feb 10 becouse i will be going to college and i have not have no computer to work on the site no more. please help me out, here is the privew of the block at. [ Register or login to view links on this board. ] Pluz if you have any block that will list alot of Top 10 OT Newest in a nice organize fasion please let me know about it. i have a due date to finish this
<?php
// Title of Top Downloads section
$titlenewdocuments = "New 10 Documents";
// Title of New Downloads section
$titlenewdownloads = "New 10 Downloads";

if (eregi("block-Download_Links.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $prefix, $dbi;
   $content="";
    $content.="<center><a href=\"modules.php?name=Downloads\"><img src=\"modules/Downloads/images/down-logo.gif\" border=\"0\" width=\"221\" height=\"42\"></a></center>";
    $content.="<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" align=\"center\" width=\"90%\"><tr>";
    $result = sql_query("select cid, title, cdescription from ".$prefix."_downloads_categories where parentid=0 order by title", $dbi);
    $count = 0;
    while(list($cid, $title, $cdescription) = sql_fetch_row($result, $dbi)) {
   $content.="<td align=\"left\" valign=\"top\" width=\"50%\"><br><font class=\"option\">\n"
         ."<b><font color=\"#000000\">•</font></b> ;;<a href=\"modules.php?name=Downloads&d_op=viewdownload&amp;cid=$cid\"><b>$title</b></a></font>";
   if ($cdescription) {
      $content.="<br><font class=\"content\">$cdescription</font><br>";
   } else {
   $content.="<br>";
   }
   $result2 = sql_query("select cid, title from ".$prefix."_downloads_categories where parentid=$cid order by title limit 0,3", $dbi);
   $space = 0;
   while(list($cid, $stitle) = sql_fetch_row($result2, $dbi)) {
           if ($space>0) {
      $content.=", ;;";
       }
      $content.="<font class=\"content\"><a href=\"modules.php?name=Downloads&d_op=viewdownload&amp;cid=$cid\">$stitle</a></font>";
       $space++;
   }
   if ($count<1) {
       $content.="</td><td> ;; ;;</td>";
       $dum = 1;
   }
   $count++;
   if ($count==2) {
       $content.="</td></tr><tr>";
       $count = 0;
       $dum = 0;
   }
    }
    if ($dum == 1) {

    $result = sql_query("select * from ".$prefix."_downloads_downloads", $dbi);
    $numrows = sql_num_rows($result, $dbi);
    $result = sql_query("select * from ".$prefix."_downloads_categories", $dbi);
    $catnum = sql_num_rows($result, $dbi);

   $content.="</tr><tr><td align=\"center\" valign=\"top\" colspan=\"3\">There are <b>$numrows</b> downloads and <b>$catnum</b> Categories in our database</td></tr></table>";
    } elseif ($dum == 0) {
   $content.="<td></td></tr></table>";



    }



$content .= "<hr noshade size=\"2\" color=\"#333333\">";
    $content.="<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\" width=\"100%\" bgcolor=\"\"><tr><td valign=\"top\" width=\"49%\">";
$content .= "<font color=#000000><b>$titlenewdocuments:</b></font><br>";

$a = 1;
$result = sql_query("select artid, title, counter from ".$prefix."_seccont order by secid DESC limit 0,10", $dbi);
while(list($artid, $title, $secid) = sql_fetch_row($result, $dbi)) {
    $title2 = ereg_replace("_", " ", $title);
    if(strlen($title) > 21) {
   $title2 = substr($title,0,21);
        $title2 .= "..";
    }
    $content .= "<font color=\"#000000\">$a: <a href=\"modules.php?name=Sections&op=viewarticle&artid=$artid\" target=\"_self\">$title2</a> ;;<em>($secid hits)</em></font><br>";
    $a++;
}

       $content.="</td><td valign=\"middle\" width=\"2%\"> ;;</td><td valign=\"top\" width=\"49%\">";
$content .= "<font color=\"#000000\"><b>$titlenewdownloads:</b></font><br>";

$a = 1;
$result = sql_query("select lid, title, hits from ".$prefix."_downloads_downloads order by date DESC limit 0,10", $dbi);
while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
    $title2 = ereg_replace("_", " ", $title);
    if(strlen($title) > 27) {
   $title2 = substr($title,0,25);
        $title2 .= "..";
    }
    $content .= "<font color=\"#000000\">$a: <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&amp;lid=$lid&amp;ttitle=$utitle\" target=\"_self\">$title2</a> ;;<em>($hits hits)</em></font><br>";
    $a++;
}

   $content.="</td></tr></table>";
   
?>



Back to top Reply with quote
#2   re: Top Download Block Table , Please HELPPPP
LongStand
CZ Newbie
LongStand has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 24, 2004
0.00 posts per day
Posts: 8
Points: 388
   
Well i was playing around with this block and i just could get it, i almost did, but it just don't look rigth, any idea of how todo this?



Back to top Reply with quote
#3   re: Top Download Block Table , Please HELPPPP
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
I am really not sure what you mean but i think you want it to show 3 downloads in a row then another 3 so forth so on..

Mess with the

if ($count==2) {
$content.="</td></tr><tr>";
$count = 0;
$dum = 0;


Make the first set start the table and the last end the tr.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   re: Top Download Block Table , Please HELPPPP
LongStand
CZ Newbie
LongStand has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 24, 2004
0.00 posts per day
Posts: 8
Points: 388
   
Well i want it to look like this

Check tihs website , i made this using html. but i want it to work with phpnuke block,


[ Register or login to view links on this board.]



Back to top Reply with quote
#5   re: Top Download Block Table , Please HELPPPP
LongStand
CZ Newbie
LongStand has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 24, 2004
0.00 posts per day
Posts: 8
Points: 388
   
You guys just ignore people here, if you guys dont want to help please just say so, becouse i want to ask if i could get help here or now, thanks



Back to top Reply with quote
#6   Re: re: Top Download Block Table , Please HELPPPP
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.48 posts per day
Posts: 3765
Points: 351,412
   


Originally posted by Telli:

I am really not sure what you mean but i think you want it to show 3 downloads in a row then another 3 so forth so on..

Mess with the

if ($count==2) {
$content.="</td></tr><tr>";
$count = 0;
$dum = 0;


Make the first set start the table and the last end the tr.


Looks like someone already tried to help you at least once. Doesn't look like you're being ignored to me. Try having a little patience. This is a help forum, not an instant messenger. When someone comes online that is able to help you, I'm sure they will.

Kelly



Back to top Reply with quote
#7   re: Top Download Block Table , Please HELPPPP
LongStand
CZ Newbie
LongStand has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 24, 2004
0.00 posts per day
Posts: 8
Points: 388
   
I did do that bro, i create it on html and convert it to php with the php. but it still does work . it work but it nots rigth, its all wack up..

and i use HTML to AnyCode Converter

thats what i use to conver it



Back to top Reply with quote
#8   re: Top Download Block Table , Please HELPPPP
LongStand
CZ Newbie
LongStand has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 24, 2004
0.00 posts per day
Posts: 8
Points: 388
   
if ($count==2) {
$content.="</td></tr><tr>";
$count = 0;
$dum = 0;



I did mess around with this, and it has nothing todo with it.

Any idea ?


Back to top Reply with quote
#9   
LongStand
CZ Newbie
LongStand has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 24, 2004
0.00 posts per day
Posts: 8
Points: 388
   
Hello, can anyone help me?



Back to top Reply with quote
#10   re: Top Download Block Table , Please HELPPPP
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
when you messed around with the code given to you...did you change the vaiables? to say 3 and then change the 0 to say 3, etc?

if nothing changed then we prolly did not understand exactly what you wanted to say or achieve?

taut



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

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
You cannot attach files in this forum
You cannot download files in this forum