Author |
Message |
rebelt
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: May 07, 2006
Posts: 172
|
Posted:
Fri Feb 24, 2012 1:14 am |
|
When I create an admin and select permissions, all they have is an option to logout, none of the module appear. But if I make them a super user, they have the full access.
Ideas please.
Thanks |
_________________ I wish I knew what I was doing LOL |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
FireATST
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/1890b00a421a4615ecd23.jpg)
Joined: Jun 12, 2004
Posts: 654
Location: Ohio
|
Posted:
Fri Feb 24, 2012 6:34 am |
|
Humm, I am getting the same issue when attempting to add one to my test site.
Have added a entry in Mantis for this btw. |
|
|
![ICQ Number ICQ Number](themes/RavenIce/forums/images/lang_english/icon_icq_add.gif) |
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
Site Admin
![](modules/Forums/images/avatars/502a2d1345d88a86ddb4a.png)
Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Fri Feb 24, 2012 8:55 am |
|
I have a fix for this, but I am currently at work. When I get home tonight I'll post the code. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Feb 24, 2012 2:38 pm |
|
Apologies for the delay, please try the following.
Open mainfile.php and find function is_mod_admin (around line 498) and replace with the following code:
Code:function is_mod_admin($module_name = '') {
global $admin, $db, $prefix;
static $authmod = array();
if(!is_admin($admin) || empty($module_name)) return 0;
if(isset($authmod[$module_name])) {
return $authmod[$module_name];
}
$aid = is_admin($admin);
$authmod[$module_name] = false;
$admins = '';
$radminsuper = 0;
$query = $db->sql_query('SELECT `name`, `radminsuper` FROM `' . $prefix . '_authors` WHERE `aid`="' . addslashes($aid) . '"');
list($name, $radminsuper) = $db->sql_fetchrow($query, SQL_NUM);
if (($radminsuper == 1 && $name == 'God') || ($radminsuper == 1 && $module_name != 'founder')) {
$authmod[$module_name] = true;
}
if ($module_name != 'admin' && $module_name != 'founder' && $radminsuper == 0) {
$query = $db->sql_query('SELECT `admins` FROM `' . $prefix . '_modules` WHERE `title`="' . addslashes($module_name) . '"');
if ($query) {
list($admins) = $db->sql_fetchrow($query, SQL_NUM);
}
$admins = explode(',', $admins);
$count = count($admins);
for($i=0; $i < $count; $i++) {
if($name == $admins[$i] && !empty($admins)) {
$authmod[$module_name] = true;
}
}
}
return $authmod[$module_name];
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rebelt
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Feb 25, 2012 9:30 am |
|
Worked a treat. Thank you. |
Last edited by rebelt on Sat Feb 25, 2012 9:47 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
FireATST
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Feb 25, 2012 9:40 am |
|
I made the edit in the mainfile.php. It appears that the standard modules that I selected for the added in admin on this test site now appear as they should and when clicked on go to the appropriate page except one. That is the Edit Groups. When I click on it, it takes me to a white page that says access denied! This maybe a totally different issue because when I put in the mainfile.php file before your edits and log in as Super User admin it gives me the following message when clicking on the Edit Groups icon:
It appears that NSN Groups has not been configured correctly. The most common cause is that you either have an error in the syntax that is including includes/nsngr_func.php FROM your mainfile.php, or you have not added the NSN Groups code to your mainfile.php. This code must be placed immediately before the closing ?> tag in mainfile.php. So your first 7 lines in mainfile.php must look like this:
if(defined('FORUM_ADMIN')) {
include_once("../../../includes/nsngr_func.php");
} elseif(defined('INSIDE_MOD')) {
include_once("../../includes/nsngr_func.php");
} else {
include_once("includes/nsngr_func.php");
}
?>
so I need to go back through this test site and see if I can figure out what the issue with the Edit groups is. One of my other sites is still RN2.4 and the Edit Groups module works fine.
I also several third party modules that is used for stat tracking for different online games and one of those when I click on the module icon as the added in admin, it gives me an "unauthorized action" message. It works fine as the Super User Admin. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Sat Feb 25, 2012 10:53 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
FireATST
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Feb 25, 2012 11:26 am |
|
.....yes that help with the Edit Groups module, thanks Nuken. Missed that removal on that site earlier. Still unable to get the third party mod to work with the added admin. Works with the Super Admin, but not the added. Will take a look at that module admin files and compare them with the other mods that work. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Mon Feb 27, 2012 1:38 pm |
|
Code:$module_name != 'founder'
| hmm, now you have me wondering what that's all about ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Tue Feb 28, 2012 10:21 pm |
|
http://www.ravenphpscripts.com/postt19158.html ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Wed Feb 29, 2012 3:27 pm |
|
The topic or post you requested does not exist Palbin |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 29, 2012 3:32 pm |
|
It is an internal post. founder = god/superadmin |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mike63740
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/4437be354f1b121b97f6b.gif)
Joined: Jun 21, 2010
Posts: 102
|
Posted:
Mon Mar 05, 2012 10:04 pm |
|
Somewhere between lines 17 and 42, stops me from logging in the Admin CP(RN2.50.00). It causes my username and password to erase instantly.
html/admin.php
Code:17 define('ADMIN_FILE', true);
18 require_once 'mainfile.php';
19
20 global $admin, $admin_file;
21
22 $op = !empty($_REQUEST['op']) ? $_REQUEST['op'] : 'adminMain';
23
24 //Do we need to be doing this at all? If the value is not set that means the config file is not loaded or misedited.
25 /**
26 * Why do this check in every module when it can be done here!
27 */
28 if (!isset($admin_file)) $admin_file = 'admin';
29
30 /**
31 * Some quick checks to see if everything is legit!
32 *
33 * @todo not sure about the regex being here.
34 */
35 if(isset($_REQUEST['aid'])) {
36 if( ($_REQUEST['aid'] && empty($admin) && $op != 'login') || preg_match('/[^\p{L}\p{N}\p{Pd}\p{Pc}]/', trim($_REQUEST['aid'])) ) {
37 header('Location: ' . $admin_file . '.php');
38 die('Access Denied');
39 }
40 }
41
42 get_lang('admin');
|
Some installation steps recorded here: http://trickedoutnews.com/ftopic-205-days0-orderasc-0.html
This is a local install using XAMPP.
Thanks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 06, 2012 2:15 am |
|
My first question would that since this is a migration from php-nuke, do you have any characters in your admin username that are not letters or numbers?
For security reasons, RN doesn't allow none alpha-numeric characters in the username |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mike63740
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 06, 2012 10:41 am |
|
Yes, these three characters @_. are at the end of the username. I went into phpMyAdmin and change the username. I can sign in now.
Thank you.
P.S. I had no problem with the username in RavenNuke 2.40.01. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|