Author |
Message |
djyo
New Member


Joined: May 28, 2006
Posts: 15
|
Posted:
Sun May 28, 2006 9:33 am |
|
Hi i know you have all heard this plenty of times but when i read over the topics already made about this it seems its a older version or something, were it says find Code:$db->sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1')");
|
i dont see that at all, the closest thing to that i see is Code:$db->sql_query("SELECT * FROM `".$prefix."_modules` WHERE `title`='$name'");
|
but i tryed changeing it to
Code:$db->sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1','0')");
|
but didnt do anything, has it changed since then? becuase every topic i seem to find about this tells you to do this but i dont see it, here is my modules.php file, could some one please tell me what to do? thanks
Code:<?php
/********************************************************/
/* NSN Groups */
/* By: NukeScripts Network (webmaster@nukescripts.net) */
/* http://www.nukescripts.net */
/* Copyright � 2000-2005 by NukeScripts Network */
/********************************************************/
define('MODULE_FILE', true);
require_once("mainfile.php");
$module = 1;
$name = trim($name);
if(isset($name)) {
if(eregi("http\:\/\/", $name)) { die("Hi and Bye"); }
if(eregi("http\:\/\/", $file)) { die("Hi and Bye"); }
$modstring = strtolower($_SERVER['QUERY_STRING']);
if(stripos_clone($modstring,"&user=") AND ($name=="Private_Messages" || $name=="Forums" || $name=="Members_List")) header("Location: index.php");
global $nukeuser, $db, $prefix;
$nukeuser = base64_decode($user);
$nukeuser = addslashes($nukeuser);
$result = $db->sql_query("SELECT * FROM `".$prefix."_modules` WHERE `title`='$name'");
$row = $db->sql_fetchrow($result);
$mod_active = intval($row['active']);
$view = intval($row['view']);
$groups = $row['groups'];
if(($mod_active == 1) OR is_admin($admin)) {
if(!isset($mop)) { $mop="modload"; }
if(!isset($file)) { $file="index"; }
if(ereg("\.\.",$name) || ereg("\.\.",$file) || ereg("\.\.",$mop)) {
$pagetitle = "- "._SOCOOL;
include("header.php");
OpenTable();
echo "<center><b>"._SOCOOL."</b></center><br>";
echo "<center>"._GOBACK."</center>";
CloseTable();
include("footer.php");
die();
} else {
$ThemeSel = get_theme();
if(file_exists("themes/$ThemeSel/modules/".$name."/".$file.".php")) {
$modpath = "themes/$ThemeSel/";
} else {
$modpath = "";
}
$modpath .= "modules/".$name."/".$file.".php";
if(file_exists($modpath)) {
if($view == 0) {
include($modpath);
} elseif($view == 1 AND (is_user($user) OR is_group($user, $name) OR is_admin($admin))) {
include($modpath);
} elseif($view == 2 AND is_admin($admin)) {
include($modpath);
} elseif($view == 3 AND paid()) {
include($modpath);
} elseif($view > 3 AND in_groups($groups)) {
include($modpath);
} else {
$pagetitle = "- "._RESTRICTEDAREA;
include("header.php");
OpenTable();
echo "<center><b>"._RESTRICTEDAREA."</b></center><br>";
echo "<center>"._GOBACK."</center>";
CloseTable();
include("footer.php");
die();
}
} else {
$pagetitle = "- "._FILENOTFOUND;
include("header.php");
OpenTable();
echo "<center><b>"._FILENOTFOUND."</b></center><br>";
echo "<center>"._GOBACK."</center>";
CloseTable();
include("footer.php");
die ();
}
}
} else {
$pagetitle = "- "._MODULENOTACTIVE;
include("header.php");
OpenTable();
echo "<center>"._MODULENOTACTIVE."</center><br>";
echo "<center>"._GOBACK."</center>";
CloseTable();
include("footer.php");
die ();
}
} else {
$pagetitle = "- "._MODULENOTFOUND;
include("header.php");
OpenTable();
echo "<center>"._MODULENOTFOUND."</center><br>";
echo "<center>"._GOBACK."</center>";
CloseTable();
include("footer.php");
die ();
}
if(!function_exists("stripos_clone")) {
function stripos_clone($haystack, $needle, $offset=0) {
return strpos(strtoupper($haystack), strtoupper($needle), $offset);
}
}
?>
|
|
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sun May 28, 2006 10:08 am |
|
I think that is the wrong file.
It should be the admin/modules/modules.php file |
|
|
|
 |
djyo

|
Posted:
Sun May 28, 2006 10:16 am |
|
i didnt know about that file but i tryed it and it didnt work either |
|
|
|
 |
Guardian2003

|
Posted:
Sun May 28, 2006 11:09 am |
|
It should.
Lets take it from the top.
Which version of nuke are you using and what additional modules have you installed.
I'm guessing you have either GT Next Gen installed or NSN Groups.
Both these modules ask you to alter the core nuke_modules table ans your problem is arising because the number of fields in that table does not match what is in admin/modules/modules.php |
|
|
|
 |
djyo

|
Posted:
Sun May 28, 2006 1:05 pm |
|
hmm im new to php-nuke, i downloaded and installed "rwsRavenNuke76_v2.02.02_FULL"
i coudlnt tell if you if i have GT or NSN installed becuase i dont have a clue but i have heard of NSN |
|
|
|
 |
Guardian2003

|
Posted:
Sun May 28, 2006 3:10 pm |
|
That explains it.
Either undo whatever editing you have done or re-upload the original files.
To get new modules visible in the menu you have to first go to the main nuke admin area and select the 'modules' icon.
This will then bring up the list of installed modules.
When you go back to the main page, the module you have added should now be visible to you.
The reason you have to go to the admin->modules is that by doing so, it fires the admin/modules/modules.php file which then updates the module list in the database.
Simply uploading a new module is not enough to make it appear in the user menu. |
|
|
|
 |
djyo

|
Posted:
Sun May 28, 2006 8:03 pm |
|
sorry but i am looking in the admin-> modules area, when i had normal php-nuke installed it worked fine |
|
|
|
 |
Guardian2003

|
Posted:
Sun May 28, 2006 8:30 pm |
|
If you are using the original modules.php and
admin/modules/modules.php (I think you said you had edited one or the other) and it is still not working then it must be something related to the module you are installing as you seem to be the only one out of hundreds with this problem.
Can you please PM or email me the following (do NOT post it here) so I can take a look for you.
A super admin login
Sentinel login
ftp login so I can check the file
Any log-in that will let me see the database (usually for your hosting control panel). |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue May 30, 2006 7:01 am |
|
This issue is fixed in the soon to be released RN76 2.10.00 release. There was a bug in the NSN Groups (a file was missed). Open up admin.php in your nuke root directory and find the ONLY line which has an "insert" statement in it and change it to:
Code:
$db->sql_query("insert into " . $prefix . "_modules values (NULL, '$modlist[$i]', '".str_replace('_', ' ', $modlist[$i])."', '0', '0', '', '1', '0', '')");
|
You will see that there is an extra value added to the field list but there is also another problem solved with the custom title being incorrectly valued.
However, as Guardian has stated, if you first click on the Modules admin link and then go back to your administration control panel, you should have seen your module admin link there. On only rare occassions have I ever had this not work. |
_________________ 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! |
|
|
 |
djyo

|
Posted:
Wed May 31, 2006 9:55 am |
|
hmm i see two lines that has insert into in it, here is the two i see, which should i change?
Code://Uncomment the following lines after setting the site url in the Administration
//global $domain;
//if (!stripos_clone($_SERVER['HTTP_HOST'], $domain)) {
// die("Access denied");
//}
get_lang("admin");
function create_first($name, $url, $email, $pwd, $user_new) {
global $prefix, $db, $user_prefix;
$first = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_authors"));
if ($first == 0) {
$pwd = md5($pwd);
$the_adm = "God";
$email = validate_mail($email);
$db->sql_query("INSERT INTO ".$prefix."_authors VALUES ('$name', '$the_adm', '$url', '$email', '$pwd', '0', '1', '')");
if ($user_new == 1) {
$user_regdate = date("M d, Y");
$user_avatar = "gallery/blank.gif";
$commentlimit = 4096;
if ($url == "http://") { $url = ""; }
$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_website, user_avatar, user_regdate, user_password, theme, commentmax, user_level, user_lang, user_dateformat) VALUES (NULL,'$name','$email','$url','$user_avatar','$user_regdate','$pwd','$Default_Theme','$commentlimit', '2', 'english','D M d, Y g:i a')");
}
login();
}
|
|
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Wed May 31, 2006 10:09 am |
|
there are a few places where it states insert but i do believe that montego is referring to the graphic admin funtion...so first search for GraphicAdmin
then search for insert...and change that line like he states although my statement is based on a plain nuke install...not ravens...which ive been meaning to grab and install..
Now i may be wrong so this is stated as an opinion as to try to get u a quick response...its an educated statement none the less...make a backup of the original in the event that im wrong.
Edit: i got raven nuke and after lookin at the admin file...i still see 3 places with the insert statement so i do believe that i was correct in my statement that montego meant under the graphic admin function. hope this is correct  |
_________________ For those who stand shall NEVER fall and those who fall shall RISE once more!! |
|
 |
 |
montego

|
Posted:
Wed May 31, 2006 1:39 pm |
|
Sorry about that. Just realized that my search was still set for "match case"! Yes, D is right in that I meant the one within the GraphicAdmin() function definition. It is the only one inserting into the nuke_modules table. |
|
|
|
 |
djyo

|
Posted:
Wed May 31, 2006 6:24 pm |
|
yay! its working thanks for the help guys  |
|
|
|
 |
montego

|
Posted:
Thu Jun 01, 2006 7:30 am |
|
|
|
 |
konijntje
New Member


Joined: Jun 11, 2006
Posts: 1
|
Posted:
Sun Jun 11, 2006 4:11 pm |
|
|
|
 |
beautifaye
New Member


Joined: Jul 20, 2006
Posts: 7
|
Posted:
Tue Sep 12, 2006 4:17 pm |
|
Is there a limit to the number of mods that can been shown ( i have 16 ) and tried this fix but still cant show anymore
Cheers |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Tue Sep 12, 2006 7:27 pm |
|
No there should be no limit. What version of phpNuke are you using? Post the structure of your modules table |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
|