Insert a horizontal rule in between each download

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Insert a horizontal rule in between each download
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Ok I have a "Newest Downloads" block and I want to insert a horizontal rule after each listing but I can't find the place to insert the code.

Here is the code for the block.
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/*         Additional security & Abstraction layer conversion           */
/*                           2003 chatserv                              */
/*      http://www.nukefixes.com -- http://www.nukeresources.com        */
/************************************************************************/
/* Last 10 Downloads And Information Center v1.1                        */
/* Copyright (c) 2005 by black71                                        */
/* http://www.nuker.hu                                                  */
/************************************************************************/

if (eregi("block-Last_10_Downloads_And_Information_Center.php", $_SERVER['SCRIPT_NAME'])) {
    Header("Location: ../index.php");
    die();
}
   
global $prefix, $db, $locale, $currentlang, $bgcolor1, $bgcolor2;
$downloads = "Downloads";
get_lang($downloads);
// Begin Configuration
$dl = "downloads"; // php-nuke, nuke style, platinum = downloads || nsn gr downloads = nsngd
$newlimit = 10; // list limit
$days = 1; // new picture days limit
// END Configuration

if ($currentlang == "hungarian") {
   define("_NU_DOWNLOADNAME","Program neve");
   define("_NU_DOWNL","Öszzes fájl");
   define("_NU_TOTALDOWNL","Összes letöltés");
   define("_NU_TOTALMB","Forgalom");
} else {
   define("_NU_DOWNLOADNAME","Program Name");
   define("_NU_DOWNL","Total Files");
   define("_NU_TOTALDOWNL","Total Downloads");
   define("_NU_TOTALMB","Sent");
}
$content  = "<table width=\"100%\" bgcolor=\"$bgcolor1\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\" style=\"border: 1pt solid #FFFFFF\">\n";
$content .= "  <tr>\n";
$content .= "    <td bgcolor=\"$bgcolor2\"><strong>&nbsp;</strong></td>\n";
$content .= "    <td width=\"100%\" bgcolor=\"$bgcolor2\"><strong>"._NU_DOWNLOADNAME."</strong></td>\n";
$content .= "    <td align=\"right\" bgcolor=\"$bgcolor2\"><strong>"._FILESIZE."</strong></td>\n";
$content .= "    <td align=\"right\" bgcolor=\"$bgcolor2\"><strong>"._DOWNLOADS."</strong></td>\n";
$content .= "    <td bgcolor=\"$bgcolor2\"><strong>"._CATEGORY."</strong></td>\n";
$content .= "  </tr>\n";
$a = 1;
$result = $db->sql_query("SELECT * FROM ".$prefix."_".$dl."_downloads ORDER BY lid DESC");
$num = $db->sql_numrows($result);
while ($row = $db->sql_fetchrow($result)) {
    $lid = intval($row['lid']);
    $cid = intval($row['cid']);
    $title = stripslashes($row['title']);
    $title2 = ereg_replace("_", " ", $title);
    $date = $row['date'];
    $hits = $row['hits'];
    $filesize = $row['filesize'];
    $active = intval($row['active']);
    $result2 = $db->sql_query("SELECT title FROM ".$prefix."_".$dl."_categories WHERE cid='$cid'");
    $row2 = $db->sql_fetchrow($result2);
    $ctitle = stripslashes($row2['title']);
    if ((($active == 1) AND ($dl == "nsngd") OR ($active == 0) AND ($dl == "downloads")) AND ($a <= $newlimit)) {
       $content .= "<tr onMouseOver=\"this.style.backgroundColor='$bgcolor2';\" onMouseOut=\"this.style.backgroundColor='$bgcolor1';\">\n";
       $content .= "<td><img src=\"images/arrow.gif\">&nbsp;";
       if ($a < 10) { $content .= "0$a"; } else { $content .= "$a"; }
       $content .= "</td>\n";
       if ($dl == "downloads") {
          $content .= "<td><a href=\"modules.php?name=$downloads&amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;title=$title\">$title2</a>&nbsp;";
       } elseif ($dl == "nsngd") {
       $content .= "<td><a href=\"modules.php?name=$downloads&amp;op=getit&amp;lid=$lid\">$title2</a>&nbsp;";
       }
       setlocale(LC_TIME, $locale);
       ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $date, $datetime);
       $datetime = strftime("%Y-%m-%d", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
       $datetime = ucfirst($datetime);
       $startdate = time();
       $count = 0;
       while ($count <= $days) {
          $daysold = date("Y-m-d", $startdate);
          if ($daysold == $datetime) {
             if ($count <= $days) {
                $content .= "<img src=\"images/new.gif\">";
             }
          }
          $count++;
          $startdate = (time()-(86400 * $count));
       }
       $mb = 1024*1024;
       $gb = $mb*1024;
       if ( $filesize > $gb ) {
          $size = sprintf ("%01.2f",$filesize/$gb)."&nbsp;Gb";
       } elseif ( $filesize > $mb ) {
          $size = sprintf ("%01.2f",$filesize/$mb)."&nbsp;Mb";
       } elseif ( $filesize >= 1024 ) {
          $size = sprintf ("%01.2f",$filesize/1024)."&nbsp;Kb";
       } else {
          $size = $filesize."&nbsp;Byte";
       }
       $content .= "</td>\n";
       $content .= "<td align=\"right\">$size</td>\n";
       $content .= "<td align=\"center\">$hits</td>\n";
       $content .= "<td><a href=\"modules.php?name=$downloads";
       if ($ctitle == "") {
          $ctitle = _DOWNLOADS;
       } else {
          if ($dl == "downloads") {
             $content .= "&amp;d_op=viewdownload&amp;cid=$cid";
          }elseif ($dl == "nsngd") {
             $content .= "&amp;cid=$cid";
          }
       }
       $content .= "\">$ctitle</a></td>\n";
       $content .= "</tr>\n";
       $a++;
    }
    $totaldownl += $hits;
    $totalfiledownlsize = sprintf("%01.2f", ($hits*$filesize)/$mb);
    $totaldownlsize += $totalfiledownlsize;
}
$content .= "</table>\n<br>";
$content .= "<table width=\"100%\" bgcolor=\"$bgcolor1\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n";
$content .= "  <tr>\n";
$content .= "    <td width=\"33%\" align=\"center\" bgcolor=\"$bgcolor2\"><strong>"._NU_DOWNL."</strong></td>\n";
$content .= "    <td width=\"33%\" align=\"center\" bgcolor=\"$bgcolor2\"><strong>"._NU_TOTALDOWNL."</strong></td>\n";
$content .= "    <td width=\"33%\" align=\"center\" bgcolor=\"$bgcolor2\"><strong>"._NU_TOTALMB."</strong></td>\n";
$content .= "  </tr>\n";
$content .= "  <tr>\n";
$content .= "    <td align=\"center\">$num</td>\n";
$content .= "    <td align=\"center\">$totaldownl</td>\n";
$content .= "    <td align=\"center\">$totaldownlsize&nbsp;MB</td>\n";
$content .= "  </tr>\n";
$content .= "</table>\n";
$content  .= "<div align=\"right\"><a href=\"http://www.nuker.hu\" target=\"_blank\"><font style=\"font-size: 9px; text-decoration: none;\">&copy;</font></a></div>\n";
?>



Back to top Reply with quote
#2   re: Insert a horizontal rule inbetween each download
xGSTQ
CZ Super Newbie
 Codezwiz Site Donator
xGSTQ has been a member for over 19 year's 19 Year Member
uk.gif
Gender: Male
Website:
Status: Offline
Joined: Sep 07, 2005
0.01 posts per day
Posts: 56
Points: 4,428
   
The only problem i see is that its a table if you

find: (online 52)

border=\"0\"

and change it to

border=\"1\"

upload you will see what i mean

not an easy fix im afraid not unless theres a wizz kid out there !!



Back to top Reply with quote
#3   re: Insert a horizontal rule inbetween each download
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Yeah I had already tried that. I included the line in a rewrite to make it have a border similiar to cznews.

style=\"border: 1pt solid #FFFFFF\

I just wanted it to look similiar to the recent news and forum post.



Back to top Reply with quote
#4   re: Insert a horizontal rule in between each download
xGSTQ
CZ Super Newbie
 Codezwiz Site Donator
xGSTQ has been a member for over 19 year's 19 Year Member
uk.gif
Gender: Male
Website:
Status: Offline
Joined: Sep 07, 2005
0.01 posts per day
Posts: 56
Points: 4,428
   
yeah i went to your page and looked and realised thats what you were trying to achieve ..

it will probably need a rewrite, i might have ago.. but my experiance with coding isnt that great icon_rolleyes.gif



Back to top Reply with quote
#5   re: Insert a horizontal rule in between each download
xGSTQ
CZ Super Newbie
 Codezwiz Site Donator
xGSTQ has been a member for over 19 year's 19 Year Member
uk.gif
Gender: Male
Website:
Status: Offline
Joined: Sep 07, 2005
0.01 posts per day
Posts: 56
Points: 4,428
   
Ok i managed it !!

I basicly had to re-write the whole block from scratch... me being a noob it took me 2 hours !! lol

Im learning though ive added it to my downloads section for others to grab ...

And also create a little bit of traffic to my site ... icon_rolleyes.gif

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

Here is the preview:



Back to top Reply with quote
#6   re: Insert a horizontal rule in between each download
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
you know that owns....

One day I hope to be able to do that.



Back to top Reply with quote
#7   re: Insert a horizontal rule in between each download
xGSTQ
CZ Super Newbie
 Codezwiz Site Donator
xGSTQ has been a member for over 19 year's 19 Year Member
uk.gif
Gender: Male
Website:
Status: Offline
Joined: Sep 07, 2005
0.01 posts per day
Posts: 56
Points: 4,428
   
well all the work had already been done for me, all the infomation was there it just needed re aranging a little to match the style of your current one's

im not saying it was easy as it wasnt, for me anyway.. but i do like a challange !!



Back to top Reply with quote
#8   re: Insert a horizontal rule in between each download
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Job well done. The only thing I sit here trying to figure out is how to wrap the whole thing in a border. I guess if you look at it you will see what I mean. Not a big deal it still looks a lot better than before.

I tried to wrap it in a simple table but my coding must of been off somewhere, because it kept messing it up.



Back to top Reply with quote
#9   re: Insert a horizontal rule in between each download
xGSTQ
CZ Super Newbie
 Codezwiz Site Donator
xGSTQ has been a member for over 19 year's 19 Year Member
uk.gif
Gender: Male
Website:
Status: Offline
Joined: Sep 07, 2005
0.01 posts per day
Posts: 56
Points: 4,428
   
lol well the whole thing just needs placing inside another box with a border of 1



ive just tried breifly, but ended up like him above !! lol as i said im not that good ive tried the obvious but for some stupid reason it wont play cricket today ...

Ill have another go when it cools down !! icon_razz.gif



Back to top Reply with quote
#10   re: Insert a horizontal rule in between each download
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Got this working, took a break and decided to give it another try. I was just surfed through cznews doing some customizing and stumbled across the answer. Took me a lil bit to get the code placed correctly and I also made it resemble CZNews v3 much more.




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