Author |
Message |
thebishop
Worker


Joined: Aug 30, 2005
Posts: 244
Location: Flying to close to the sun
|
Posted:
Sat Apr 15, 2006 9:46 am |
|
Hello all, i installed fetchmodg for my nuke 7.6 patched to 3.1 site today and after making the required edits to the downloads/index.php i recieved an unexpected T_CASE error on LINE 130.
this error happens in the original creaters version as well as the Nukem66 version. here is a snippet of the code.
Code:
#-----[ FIND ]-------------------------------
#
case "menu":
menu($maindownload);
break;
#
#-----[ ADD AFTER ]------------------------
#
case "gfx":
gfx($random_num);
break;
|
it should be noted that in the my orginal downloads/index.php there is no break; like there is in the [FIND] above.
also, if i do not make this edit the module seems to work fine except does not show the gfx numbers for the user to input in order to receive the download. any help very much appreciated.  |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Apr 15, 2006 9:51 am |
|
Well, my 7.6 version does not even have that case statement in it! Are you sure you have the original nuke download module? Would you please post about 20 lines before and after LINE 130 in your mod'd code? Thanks. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
thebishop

|
Posted:
Sat Apr 15, 2006 10:14 am |
|
here is how my original downloads/index.php reads.
although i am using the advanced downloads module. maybe that has changed the text in the index.php.
Code:
function downloadinfomenu($lid, $ttitle) {
global $module_name, $user;
echo "<br><font class=\"content\">[ "
."<a href=\"modules.php?name=$module_name&d_op=viewdownloadcomments&lid=$lid&ttitle=$ttitle\">"._DOWNLOADCOMMENTS."</a>"
." | <a href=\"modules.php?name=$module_name&d_op=viewdownloaddetails&lid=$lid&ttitle=$ttitle\">"._ADDITIONALDET."</a>"
." | <a href=\"modules.php?name=$module_name&d_op=viewdownloadeditorial&lid=$lid&ttitle=$ttitle\">"._EDITORREVIEW."</a>"
." | <a href=\"modules.php?name=$module_name&d_op=modifydownloadrequest&lid=$lid\">"._MODIFY."</a>";
if (is_user($user)) {
echo " | <a href=\"modules.php?name=$module_name&d_op=brokendownload&lid=$lid\">"._REPORTBROKEN."</a>";
}
echo " ]</font>";
}
function index() {
global $prefix, $db, $show_links_num, $module_name;
include("header.php");
$maindownload = 0;
menu($maindownload);
echo "<br>";
OpenTable();
echo "<center><font class=\"title\"><b>"._DOWNLOADSMAINCAT."</b></font></center><br>";
echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>";
$sql = "SELECT cid, title, cdescription FROM ".$prefix."_downloads_categories WHERE parentid='0' ORDER BY title";
$result = $db->sql_query($sql);
$count = 0;
while ($row = $db->sql_fetchrow($result)) {
$cid = intval($row['cid']);
$title = stripslashes(check_html($row['title'], "nohtml"));
$cdescription = stripslashes($row['cdescription']);
if ($show_links_num == 1) {
$cnumrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_downloads_downloads WHERE cid='$cid'"));
$cnumm = "($cnumrows)";
} else {
$cnumm = "";
}
|
thanks for the quick reply montego  |
|
|
|
 |
thebishop

|
Posted:
Sat Apr 15, 2006 10:17 am |
|
oops here is the mod'd code sorry for that.
Code:
if (is_user($user)) {
echo " | <a href=\"modules.php?name=$module_name&d_op=brokendownload&lid=$lid\">"._REPORTBROKEN."</a>";
}
echo " ]</font>";
}
function index() {
global $prefix, $db, $show_links_num, $module_name;
include("header.php");
$maindownload = 0;
menu($maindownload);
case "gfx":
gfx($random_num);
break;
echo "<br>";
OpenTable();
echo "<center><font class=\"title\"><b>"._DOWNLOADSMAINCAT."</b></font></center><br>";
echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>";
$sql = "SELECT cid, title, cdescription FROM ".$prefix."_downloads_categories WHERE parentid='0' ORDER BY title";
$result = $db->sql_query($sql);
$count = 0;
while ($row = $db->sql_fetchrow($result)) {
|
here is the link to download this module also if anybody needs it as well as one other made for 7.6.
Only registered users can see links on this board! Get registered or login! |
|
|
|
 |
montego

|
Posted:
Sat Apr 15, 2006 10:27 am |
|
Well, the problem is that you are trying to use a mod that was meant for the basic core nuke download module and not the advanced download module. Unfortunately, going this route will force you to have to figure out how to make it work with the advanced downloads. I see that they also have this download module (from the link you gave above):
Ultra_Downloads_76.zip
Why not switch to using that downloads module? |
|
|
|
 |
thebishop

|
Posted:
Sat Apr 15, 2006 10:38 am |
|
I dont really know much about the creator and its much more DB involved.
the other one is just a hack and has been proven to work very well and does not slow the site down. but in the end i may have to use it. ill keep working on this one because it has been shown to work with nuke versions up to 7.3, TY |
|
|
|
 |
montego

|
Posted:
Sat Apr 15, 2006 10:51 am |
|
Ok, just as long as you understand that the hack's instructions are for the original nuke Downloads module and NOT for the one you are trying to modify (Advanced Downloads). So, unfortunately, you may be on your own unless you can find someone who has already hacked the advanced downloads module in this manner. |
|
|
|
 |
|