Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Other
Author Message
kabar
New Member
New Member



Joined: Apr 26, 2006
Posts: 5

PostPosted: Thu Jun 01, 2006 7:58 am Reply with quote

Hi, I have a problem with the way the downloads are viewed in my current theme, with NSN Dopwnloads, each download is shown side by side, how do I show them under one another.

You can see here: Only registered users can see links on this board! Get registered or login!

The layout is a bit messed up, works ok in the standard theme, but won't in my current.

Sorry but I am not a php guru. Embarassed

I don't really want to change the module, as I think NSN Downloads is pretty cool.

Many Thanks

kabar
 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Thu Jun 01, 2006 9:03 am Reply with quote

try this

look in modules/public/index.php for this:
Code:
$result=$db->sql_query("SELECT lid FROM ".$prefix."_nsngd_downloads WHERE active>'0' AND cid=$cid ORDER BY $orderby LIMIT $min,".$dl_config['perpage']);


while(list($lid)=$db->sql_fetchrow($result)) {
    if ($a == 0) { echo "<tr>"; }
    echo " <td valign='top' width='50%'> <font class='content'>";
    showlisting($lid);
    echo "</font></td>";
    $a++;


change the 50 % to 100%

like this:
Code:
<td valign='top' width='100%'>


hope it works for u

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
kabar







PostPosted: Thu Jun 01, 2006 9:31 am Reply with quote

Hi darklord, thanks for the speedy reply, I tried what you suggested but it did not work Crying or Very sad

Here is the whole code for the index.php file that you suggested to change:

Code:
<?php


/********************************************************/
/* NSN GR Downloads                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/************************************************************************/
/* PHP-Nuke Platinum: Expect to be impressed                  COPYRIGHT */
/*                                                                      */
/* Copyright (c) 2004 - 2006 by http://www.techgfx.com                  */
/*     Techgfx - Graeme Allan                       (goose@techgfx.com) */
/*                                                                      */
/* Copyright (c) 2004 - 2006 by http://www.conrads-berlin.de            */
/*     MrFluffy - Axel Conrads                 (axel@conrads-berlin.de) */
/*                                                                      */
/* Refer to TechGFX.com for detailed information on PHP-Nuke Platinum   */
/*                                                                      */
/* TechGFX: Your dreams, our imagination                                */
/************************************************************************/

if (!isset($cid)) { $cid = 0; }
$cid = intval($cid);
include("header.php");
if (!isset($min)) $min=0;
if (!isset($max)) $max=$min+$dl_config['perpage'];
if(isset($orderby)) { $orderby = convertorderbyin($orderby); } else { $orderby = "title ASC"; }
if ($cid == 0) {
  menu(0);
  $title = ""._MAIN."";
} else {
  menu(1);
  $cidinfo = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_nsngd_categories WHERE cid=$cid AND active>'0'"));
  $title = getparentlink($cidinfo['parentid'], $cidinfo['title']);
  $title = "<a href=modules.php?name=$module_name>"._MAIN."</a> -&gt; $title";
}
echo "<br>";
OpenTable();
echo "<table align='center'><tr><td><font class='option'><b>"._CATEGORY.": $title</b></font></td></tr></table>";
$result2 = $db->sql_query("SELECT * FROM ".$prefix."_nsngd_categories WHERE parentid=$cid ORDER BY title");
$numrows2 = $db->sql_numrows($result2);
if ($numrows2 > 0) {
  echo "<table align='center' border='0' cellpadding='10' cellspacing='1' width='100%'>\n";
  $count = 0;
  while($cidinfo2 = $db->sql_fetchrow($result2)) {
    if ($count == 0) { echo "<tr>\n"; }
    if ($dl_config['show_links_num'] == 1) {
      $cnumrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsngd_downloads WHERE cid='".$cidinfo2['cid']."' AND active>'0'"));
      $categoryinfo = getcategoryinfo($cidinfo2['cid']);
      $cnumm = " (".$cnumrows."/".$categoryinfo['downloads'].")";
    } else {
      $cnumm = "";
    }
    echo "<td valign='top' width='33%'><font class='option'>";
    $myimage = myimage("icon-.png");
    echo "<img align='middle' src='$myimage' border='0' height='16' width='16' alt='' title=''>";
    echo "<a href='modules.php?name=$module_name&amp;cid=".$cidinfo2['cid']."'><b>".$cidinfo2['title']."</b></a>$cnumm</font>";
    newcategorygraphic($cidinfo2['cid']);
    if ($cidinfo2['cdescription']) {
      echo "<font class='content'>".$cidinfo2['cdescription']."</font><br>";
    } else {
      echo "<br>";
    }
    $space = 0;
    $result3 = $db->sql_query("SELECT cid, title FROM ".$prefix."_nsngd_categories WHERE parentid='".$cidinfo2['cid']."' AND active>'0' ORDER BY title");
    while($cidinfo3 = $db->sql_fetchrow($result3)) {
      if ($dl_config['show_links_num'] == 1) {
        $snumrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsngd_downloads WHERE cid='".$cidinfo3['cid']."' AND active>'0'"));
        $categoryinfosub = getcategoryinfo($cidinfo3['cid']);
        $cnum = " (".$snumrows."/".$categoryinfosub['downloads'].")";
      } else {
        $cnum = "";
      }
      $myimage = myimage("icon+.png");
      echo "&nbsp;&nbsp;<img align='middle' src='$myimage' border='0' height='16' width='16' alt='' title=''>";
      echo "<font class='content'><a href='modules.php?name=$module_name&amp;cid=".$cidinfo3['cid']."'>".$cidinfo3['title']."</a>$cnum</font>";
      newcategorygraphic($cidinfo3['cid']);
      echo "<br>\n";
      $space++;
    }
    echo "</td>\n";
    if ($count < 2) { $dum = 1; }
    $count++;
    if ($count == 3) { echo "</tr>\n"; $count = 0; $dum = 0; }
  }
  if ($dum == 1 && $count == 2) {
    echo "<td>&nbsp;</td>\n</tr>\n</table>\n";
  } elseif ($dum == 1 && $count == 1) {
    echo "<td>&nbsp;</td>\n<td>&nbsp;</td>\n</tr>\n</table>\n";
  } elseif ($dum == 0) {
    echo "</tr>\n</table>\n";
  }
}
$listrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsngd_downloads WHERE active>'0' AND cid='$cid'"));
if ($listrows > 0) {
  $op = $query = "";
  $orderbyTrans = convertorderbytrans($orderby);
  echo "<table border='0' cellpadding='0' cellspacing='4' width='100%'>";
  echo "<tr><td colspan='2'><hr noshade size='1'></td></tr>";
  echo "<tr><td align='center' colspan='2'><font class='content'>"._SORTDOWNLOADSBY.": ";
  echo ""._TITLE." (<a href='modules.php?name=$module_name&amp;cid=$cid&amp;orderby=titleA'>A</a>\<a href='modules.php?name=$module_name&amp;cid=$cid&amp;orderby=titleD'>D</a>) ";
  echo ""._DATE." (<a href='modules.php?name=$module_name&amp;cid=$cid&amp;orderby=dateA'>A</a>\<a href='modules.php?name=$module_name&amp;cid=$cid&amp;orderby=dateD'>D</a>) ";
  echo ""._POPULARITY." (<a href='modules.php?name=$module_name&amp;cid=$cid&amp;orderby=hitsA'>A</a>\<a href='modules.php?name=$module_name&amp;cid=$cid&amp;orderby=hitsD'>D</a>)";
  echo "<br><b>"._RESSORTED.": $orderbyTrans</b></font></td></tr>\n";
  echo "</table>";
  $totalselected = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsngd_downloads WHERE active='1' AND cid=$cid"));
  pagenums($cid, $query, $orderby, $op, $totalselected, $dl_config['perpage'], $max);
  echo "<table border='0' cellpadding='0' cellspacing='4' width='100%'>";
  // START LISTING
  $x = 0;
  $a = 0;
  $result=$db->sql_query("SELECT lid FROM ".$prefix."_nsngd_downloads WHERE active>'0' AND cid=$cid ORDER BY $orderby LIMIT $min,".$dl_config['perpage']);
  while(list($lid)=$db->sql_fetchrow($result)) {
    if ($a == 0) { echo "<tr>"; }
    echo "<td valign='top' width='50%'><font class='content'>";
    showlisting($lid);
    echo "</font></td>";
    $a++;
    if ($a == 2) { echo "</tr>"; $a = 0; }
    $x++;
  }
  if ($a == 1) { echo "<td width=\"50%\">&nbsp;</td></tr>"; } else { echo "</tr>"; }
  echo "</table>";
  // END LISTING
  $orderby = convertorderbyout($orderby);
  pagenums($cid, $query, $orderby, $op, $totalselected, $dl_config['perpage'], $max);
}
CloseTable();
include("footer.php");

?>


I hope you or some one can help as it looks really messy.


Thanks again


kabar
 
kabar







PostPosted: Thu Jun 01, 2006 10:10 am Reply with quote

I have tried to put my Theme.php in for you to look at but every time I do I get a warning page saying I have to alter my html tags in the code, whch I did, my eyes are bleeding now, trying to find the the tag to put my last space in.


kabar
 
gregexp







PostPosted: Thu Jun 01, 2006 10:36 am Reply with quote

imma run a few tests on a test site of mine...plz be patient so that i can find the correct solution
 
kabar







PostPosted: Thu Jun 01, 2006 10:36 am Reply with quote

Many thanks darklord.


kabar
 
kabar







PostPosted: Thu Jun 01, 2006 6:43 pm Reply with quote

All sorted now darklord, was a function.php replacement from Only registered users can see links on this board! Get registered or login!.


he has other fixes there as well that sorted out some other problems.

Thanks fo you time and the speedy responces.


kabar
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Other

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©