Hi Everyone, I was hoping I could get some help. I installed sentinal 2.4.0 and I'm running Nuke 7.6.0.2.9 (2.9) patched. My installation went ok, but in my "Edit for core files" I run in to a problem. Specifacly with "mainfile7.6".
It asks to find:
Code:
if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
@require_once("../../../includes/sql_layer.php");
if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
@require_once("../../../includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
@require_once("../../includes/sql_layer.php");
if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
@require_once("../../includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
@require_once("config.php");
@require_once("db/db.php");
@require_once("includes/sql_layer.php");
if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
@require_once("includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}
HOWEVER, the best I can find near that in my mainfile.php is:
function get_lang($module) {
global $currentlang, $language;
if (file_exists("modules/$module/language/lang-".$currentlang.".php")) {
if ($module == admin) {
@include_once("admin/language/lang-".$currentlang.".php");
} else {
@include_once("modules/$module/language/lang-".$currentlang.".php");
}
} else {
if ($module != "Forums") {
if ($module == admin) {
@include_once("admin/language/lang-".$currentlang.".php");
} else {
@include_once("modules/$module/language/lang-".$language.".php");
}
}
}
}
After I replace the code that is a little different from the one is asked to replace, my sentinal does work, but I run in to problems with other functions of my nuke, such as surveys/polls, last seen block, site messenger and other. Is there some thing that I'm missing with 2.9? has anyone ran in to this??
Joined: Aug 29, 2004 Posts: 7458 Location: Arizona
Posted:
Mon Jan 09, 2006 6:51 am
NeapolitanWorld, I have looked through my "archives" and are you able to find the following bit of code in mainfile.php (around line 112 is the code you should be looking for):
Code:
if (stristr($_SERVER['SCRIPT_NAME'], "mainfile.php")) {
Header("Location: index.php");
die();
}
if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
} else {
@require_once("config.php");
@require_once("db/db.php");
/* FOLLOWING TWO LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
/* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
@require_once("includes/sql_layer.php");
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
}
I gave you a bit of extra code at the beginning and end to help you find what you need to be looking for.
I am confused by all the extra code you posted including what appears to me to be duplication. Are you sure it is asking you to find all this extra bit of code? I think it is really looking for the
if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
} else {
@require_once("config.php");
@require_once("db/db.php");
/* FOLLOWING TWO LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
/* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
@require_once("includes/sql_layer.php");
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
}
Bit of code and probably asking you to add another require_once to include the sentinel.php scripts (or was it nukesentinel.php by 2.4.0 - can't remember).
Anyways, hopefully that gets you closer. However, I would strongly, strongly, strongly advise you upgrading your site to the latest 3.1 patchset and lastest NukeSentinel 2.4.2.
Thank you for your help. I will for sure upgrade, as soon as I get my install done correctly. In my edits folder for mainfile7.6, here is what is telling me to find:
#-----[ FIND ]------------------------------------------
#
if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
@require_once("../../../includes/sql_layer.php");
if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
@require_once("../../../includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
@require_once("../../includes/sql_layer.php");
if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
@require_once("../../includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
@require_once("config.php");
@require_once("db/db.php");
@require_once("includes/sql_layer.php");
if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
@require_once("includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}
As stated in the text file, it may not be the same as the one in my nuke 7.6, which is not, it is much shorter, maybe the same you wrote on your post. However, after I add the following code per instructions:
#-----[ CHANGE TO ]------------------------------------------
#
if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
@require_once("../../../includes/sql_layer.php");
if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
//@require_once("../../../includes/ipban.php");
@include_once("../../../includes/nukesentinel.php");
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
@require_once("../../includes/sql_layer.php");
if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
//@require_once("../../includes/ipban.php");
@include_once("../../includes/nukesentinel.php");
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
@require_once("config.php");
@require_once("db/db.php");
@require_once("includes/sql_layer.php");
if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
//@require_once("includes/ipban.php");
@include_once("includes/nukesentinel.php");
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}
It istalls and I can work with sentinal admin, however my nuke does not work properly. The problems I have are things like survy's/polls not working and some other thigs as well. I have done all my previous edits already, however this one, seams to have a problem with my nuke. Sorry I know I'm being a little repetative, but maybe I did not explain right, or I'm not sure if I got your post right.
Please, anyone, much appriciated the help you can provide.
Joined: Aug 29, 2004 Posts: 7458 Location: Arizona
Posted:
Tue Jan 10, 2006 6:32 am
NeapolitanWorld, Please send me both the original mainfile.php (that you started with) and the file which has the core file edit instructions in it for 2.4.0 and I'll incorporate it for you. You may send it to montego _at_ montegoscripts dot com.
Please be patient, though, I have a day job and night job (family). I should be able to give it back to you by around this time tomorrow.
Joined: Aug 29, 2004 Posts: 7458 Location: Arizona
Posted:
Wed Jan 11, 2006 7:02 am
NeapolitanWorld, I sent the edited mainfile.php back to you, however, as noted in my message, the original unedited script is not from the same nuke version (as best I can tell -- too many differences) than the second "edited" file you provided. So, if I did not edit the right script, please resend me the mainfile.php script from the nuke version you are trying to install NS on. Thanks.
I too have this problem. i downloaded phpnuke 7.6 Patched from NukeResources. the code i have in my mainfile.php is identical to NeapolitanWorld's as show in his first post of this topic. can someone please show me how to change mine correctly? and it's patched 3.1
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