Hi had upgrade my PHP Nuke 7.4 to 7.5. I had delete all the files from my ftp and I had upload the 7.5 version, and later I had ejecute the upgrade.
All works ok, but the administration of my edonkey module don't work, I have this error:
Quote:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/zakatron/public_html/includes/sql_layer.php on line 286
Access Denied
With 7.4 version worked ok. Any suggestion for fix that?
Post the first few lines of that add-on's admin/modules file, it should be something similar to:
Code:
$row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper FROM " . $prefix . "_authors WHERE aid='$aid'"));
if ($row['radminsuper'] == 1) {
As for Nuke Patched for 7.5 it's in the works, i first need to write instructions for it to save time for users that already have Nuke Patched installed from a previous version of Nuke.
if (!eregi("admin.php", $_SERVER[PHP_SELF])) { die ("Access Denied"); }
$result = sql_query("select radmindownload, radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);
list($radmindownload, $radminsuper) = sql_fetch_row($result, $dbi);
if (($radmindownload==1) OR ($radminsuper==1)) {
I think you can adapt that add-on to work with 7.5 by changing what i posted above to the following which will allow you to grant access to that add-on to other admins without having to make them superusers:
Code:
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
global $prefix, $db;
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='edonkey'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") {
$auth_user = 1;
}
}
if ($row2['radminsuper'] == 1 || $auth_user == 1) {
Edit:
Code:
WHERE title='edonkey'
so that it reflects the actual name of the add-on (case sensitive), this of course will only work if the add-on is listed in the modules db table, since the add-on will not be listed in the edit admins section you will have to add admins manually by entering the user's name in the modules db table under the admins field in the format:
Code:
user1,
if more than one:
Code:
user1,user2,user3,
Regardless of how many admins you add for the add-on make sure the entries always end with a comma (,)
I have adapt the edonkey add-on to work with 7.5, and works ok, thanks you
I had to read a lot of times your post, because my english is very bad But now I have understand all.
I had created a new admin, and set privilege for edonkey module (I wanted to test if work with 7.5 this add-on), and works fine. Later I wanted to change the information of the admin (change the privileges), but when I click on "Administration > Edit Admins > Modify informations" I see that this admin module (mod_authors) don't show the actual privileges of this admin. I think is a good idea if mod_authors show the actual privileges of that admin. I don't know if I explain correct... but mi bad english.......
Thanks for all ChatServ
I edit this post:
Now I had deleted the admin test, but in db table nuke_modules, in admin field is the admin test. Why when I deleted the admin test don't delete this admin on nuke_modules? is a bug? Thanks again.
Like i said in my post you would have to manually edit the user's permissions, remember, Nuke's authors.php file does not come with edonkey coded into it so you have to manually delete the author from the nuke_modules db table.
Try this to see if edonkey gets listed in the edit admins section:
in admin/modules/authors.php find:
Code:
if (file_exists("modules/$row[title]/admin/index.php") AND file_exists("modules/$row[title]/admin/links.php") AND file_exists("modules/$row[title]/admin/case.php")) {
change to:
Code:
if (file_exists("modules/$row[title]/admin/index.php") AND file_exists("modules/$row[title]/admin/links.php") AND file_exists("modules/$row[title]/admin/case.php") || if $row[title] == "edonkey") {
If it doesn't work simply change the line back to what it was.
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