Author |
Message |
kabar
New Member


Joined: Apr 26, 2006
Posts: 5
|
Posted:
Thu Jun 01, 2006 7:58 am |
|
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.
I don't really want to change the module, as I think NSN Downloads is pretty cool.
Many Thanks
kabar |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Thu Jun 01, 2006 9:03 am |
|
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!! |
|
 |
 |
kabar

|
Posted:
Thu Jun 01, 2006 9:31 am |
|
Hi darklord, thanks for the speedy reply, I tried what you suggested but it did not work
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> -> $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&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 " <img align='middle' src='$myimage' border='0' height='16' width='16' alt='' title=''>";
echo "<font class='content'><a href='modules.php?name=$module_name&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> </td>\n</tr>\n</table>\n";
} elseif ($dum == 1 && $count == 1) {
echo "<td> </td>\n<td> </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&cid=$cid&orderby=titleA'>A</a>\<a href='modules.php?name=$module_name&cid=$cid&orderby=titleD'>D</a>) ";
echo ""._DATE." (<a href='modules.php?name=$module_name&cid=$cid&orderby=dateA'>A</a>\<a href='modules.php?name=$module_name&cid=$cid&orderby=dateD'>D</a>) ";
echo ""._POPULARITY." (<a href='modules.php?name=$module_name&cid=$cid&orderby=hitsA'>A</a>\<a href='modules.php?name=$module_name&cid=$cid&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%\"> </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

|
Posted:
Thu Jun 01, 2006 10:10 am |
|
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

|
Posted:
Thu Jun 01, 2006 10:36 am |
|
imma run a few tests on a test site of mine...plz be patient so that i can find the correct solution |
|
|
|
 |
kabar

|
Posted:
Thu Jun 01, 2006 10:36 am |
|
Many thanks darklord.
kabar |
|
|
|
 |
kabar

|
Posted:
Thu Jun 01, 2006 6:43 pm |
|
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 |
|
|
|
 |
|