Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
rebelt
Worker
Worker



Joined: May 07, 2006
Posts: 172

PostPosted: Fri Feb 24, 2012 1:14 am Reply with quote

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 
View user's profile Send private message Visit poster's website
FireATST
RavenNuke(tm) Development Team



Joined: Jun 12, 2004
Posts: 654
Location: Ohio

PostPosted: Fri Feb 24, 2012 6:34 am Reply with quote

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.
 
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Fri Feb 24, 2012 8:55 am Reply with quote

I have a fix for this, but I am currently at work. When I get home tonight I'll post the code.
 
View user's profile Send private message
jakec







PostPosted: Fri Feb 24, 2012 2:38 pm Reply with quote

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];
}
 
rebelt







PostPosted: Sat Feb 25, 2012 9:30 am Reply with quote

Worked a treat. Thank you.


Last edited by rebelt on Sat Feb 25, 2012 9:47 am; edited 1 time in total 
FireATST







PostPosted: Sat Feb 25, 2012 9:40 am Reply with quote

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.
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sat Feb 25, 2012 10:53 am Reply with quote

See if this is the issue

http://www.ravenphpscripts.com/postt18214.html

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
FireATST







PostPosted: Sat Feb 25, 2012 11:26 am Reply with quote

Embarassed.....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.
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Mon Feb 27, 2012 1:38 pm Reply with quote

Code:
$module_name != 'founder'
hmm, now you have me wondering what that's all about Smile
 
View user's profile Send private message Send e-mail
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Feb 28, 2012 10:21 pm Reply with quote

http://www.ravenphpscripts.com/postt19158.html Wink

_________________
"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. 
View user's profile Send private message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Wed Feb 29, 2012 3:27 pm Reply with quote

The topic or post you requested does not exist Palbin
 
View user's profile Send private message
Palbin







PostPosted: Wed Feb 29, 2012 3:32 pm Reply with quote

It is an internal post. founder = god/superadmin
 
mike63740
Worker
Worker



Joined: Jun 21, 2010
Posts: 102

PostPosted: Mon Mar 05, 2012 10:04 pm Reply with quote

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.
 
View user's profile Send private message
Guardian2003







PostPosted: Tue Mar 06, 2012 2:15 am Reply with quote

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
 
mike63740







PostPosted: Tue Mar 06, 2012 10:41 am Reply with quote

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. Very Happy

P.S. I had no problem with the username in RavenNuke 2.40.01.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©