sqzdog
Involved


Joined: Sep 22, 2003
Posts: 252
|
Posted:
Wed Nov 09, 2005 2:10 pm |
|
After upgrading to 7.6 patched w/3.1 this module quit working. I went to reinstall it and the readme called for the index.php and the modules.php to be edited. I could not find in either file where to place the text. I will paste in the two files as an example:
README says:
My file is:
Quote: | <?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/************************************************************************/
/* Additional security checking code 2003 by chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
require_once("mainfile.php");
global $prefix, $db, $admin_file;
$modpath = '';
define('MODULE_FILE', true);
$_SERVER['PHP_SELF'] = "modules.php";
$row = $db->sql_fetchrow($db->sql_query("SELECT main_module from ".$prefix."_main"));
$name = $row['main_module'];
define("HOME_FILE", true);
if (isset($url) AND is_admin($admin)) {
echo "<meta http-equiv=\"refresh\" content=\"0; url=$url\">";
die();
}
if ($httpref==1) {
$referer = $_SERVER["HTTP_REFERER"];
$referer = check_html($referer, nohtml);
if ($referer=="" OR eregi("^unknown", $referer) OR substr("$referer",0,strlen($nukeurl))==$nukeurl OR eregi("^bookmark",$referer)) {
} else {
$result = $db->sql_query("INSERT INTO ".$prefix."_referer VALUES (NULL, '$referer')");
}
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_referer"));
if($numrows>=$httprefmax) {
$result2 = $db->sql_query("DELETE FROM ".$prefix."_referer");
}
}
if (!isset($mop)) { $mop="modload"; }
if (!isset($mod_file)) { $mod_file="index"; }
$name = trim($name);
$file = trim($file);
$mod_file = trim($mod_file);
$mop = trim($mop);
if (ereg("\.\.",$name) || ereg("\.\.",$file) || ereg("\.\.",$mod_file) || ereg("\.\.",$mop)) {
echo "You are so cool...";
} else {
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/module.php")) {
include("themes/$ThemeSel/module.php");
if (is_active("$default_module") AND file_exists("modules/$default_module/".$mod_file.".php")) {
$name = $default_module;
}
}
if (file_exists("themes/$ThemeSel/modules/$name/".$mod_file.".php")) {
$modpath = "themes/$ThemeSel/";
}
$modpath .= "modules/$name/".$mod_file.".php";
if (file_exists($modpath)) {
include($modpath);
} else {
$index = 1;
include("header.php");
OpenTable();
if (is_admin($admin)) {
echo "<center><font class=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"".$admin_file.".php?op=modules\">"._ADDAHOME."</a> ]</center>";
} else {
echo "<center>"._HOMEPROBLEMUSER."</center>";
}
CloseTable();
include("footer.php");
}
}
?> |
2nd file to edit from the readme is modules.php:
Quote: | [FIND]
$name = trim($name); |
My modules.php says:
Quote: | <?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/************************************************************************/
/* Additional security checking code 2003 by chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
define('MODULE_FILE', true);
require_once("mainfile.php");
$module = 1;
$name = addslashes(trim($name));
if (isset($name)) {
if (eregi("http\:\/\/", $name)) {
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 active, view FROM ".$prefix."_modules WHERE title='$name'");
$row = $db->sql_fetchrow($result);
$mod_active = intval($row['active']);
$view = intval($row['view']);
if (($mod_active == 1) OR ($mod_active == 0 AND is_admin($admin))) {
if (!isset($mop)) { $mop="modload"; }
if (!isset($file)) { $file="index"; }
if (ereg("\.\.",$name) || ereg("\.\.",$file) || ereg("\.\.",$mop)) {
echo "You are so cool...";
} else {
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/modules/$name/".$file.".php")) {
$modpath = "themes/$ThemeSel/";
} else {
$modpath = "";
}
if ($view == 0) {
$modpath .= "modules/$name/".$file.".php";
if (file_exists($modpath)) {
include($modpath);
} else {
die ("Sorry, such file doesn't exist...");
}
} else if ($view == 1 AND (is_user($user) OR is_group($user, $name)) OR is_admin($admin)) {
$modpath .= "modules/$name/".$file.".php";
if (file_exists($modpath)) {
include($modpath);
} else {
die ("Sorry, such file doesn't exist...");
}
} elseif ($view == 1 AND !is_user($user) AND !is_admin($admin)) {
$pagetitle = "- "._ACCESSDENIED."";
include("header.php");
title("$sitename: "._ACCESSDENIED."");
OpenTable();
echo "<center><b>"._RESTRICTEDAREA."</b><br><br>"
.""._MODULEUSERS."";
$result2 = $db->sql_query("SELECT mod_group FROM ".$prefix."_modules WHERE title='$name'");
$row2 = $db->sql_fetchrow($result2);
if ($row2[mod_group] != 0) {
$result3 = $db->sql_query("SELECT name FROM ".$prefix."_groups WHERE id='$row2[mod_group]'");
$row3 = $db->sql_fetchrow($result3);
echo ""._ADDITIONALYGRP.": <b>$row3[name]</b><br><br>";
}
echo ""._GOBACK."";
CloseTable();
include("footer.php");
die();
} else if ($view == 2 AND is_admin($admin)) {
$modpath .= "modules/$name/".$file.".php";
if (file_exists($modpath)) {
include($modpath);
} else {
die ("Sorry, such file doesn't exist...");
}
} elseif ($view == 2 AND !is_admin($admin)) {
$pagetitle = "- "._ACCESSDENIED."";
include("header.php");
title("$sitename: "._ACCESSDENIED."");
OpenTable();
echo "<center><b>"._RESTRICTEDAREA."</b><br><br>"
.""._MODULESADMINS.""
.""._GOBACK."";
CloseTable();
include("footer.php");
die();
} else if ($view == 3 AND paid()) {
$modpath .= "modules/$name/$file.php";
if (file_exists($modpath)) {
include($modpath);
} else {
die ("Sorry, such file doesn't exist...");
}
} else {
$pagetitle = "- "._ACCESSDENIED."";
include("header.php");
title("$sitename: "._ACCESSDENIED."");
OpenTable();
echo "<center><b>"._RESTRICTEDAREA."</b><br><br>"
.""._MODULESSUBSCRIBER."";
if ($subscription_url != "") {
echo "<br>"._SUBHERE."";
}
echo "<br><br>"._GOBACK."";
CloseTable();
include("footer.php");
die();
}
}
} else {
include("header.php");
OpenTable();
echo "<center>"._MODULENOTACTIVE."<br><br>"
.""._GOBACK."</center>";
CloseTable();
include("footer.php");
}
} else {
die ("Sorry, you can't access this file directly...");
}
?> |
I like this mod and would really like to get it going again. |
|
|