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
kd8hho
Worker
Worker



Joined: Mar 30, 2009
Posts: 118

PostPosted: Sat Nov 03, 2012 12:27 am Reply with quote

Redid my site. and went to re-add an admin. and well account is active yet he has nothing to admin. (no modules shown) any ideas?
[ Only registered users can see links on this board! Get registered or login! ] [ Only registered users can see links on this board! Get registered or login! ]

shot 2 shows what he should have. shot 1 shows what he gets

_________________
Linux Register User #481509 | Ubuntu Register User #25492

Last edited by kd8hho on Tue Nov 06, 2012 9:35 pm; edited 2 times in total 
View user's profile Send private message Visit poster's website
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1531

PostPosted: Sat Nov 03, 2012 4:07 am Reply with quote

Take a look into your nuke database and check the table nuke_modules. Do you have your added admin in the admins-row?
 
View user's profile Send private message
kd8hho







PostPosted: Sat Nov 03, 2012 2:18 pm Reply with quote

neralex wrote:
Take a look into your nuke database and check the table nuke_modules. Do you have your added admin in the admins-row?


yes admin is showing in the nuke_modules
 
kd8hho







PostPosted: Tue Nov 06, 2012 2:18 pm Reply with quote

bump.

So im still scratching my head on this.. admin is set correctly. and the admin account is showing in the nuke modules db like it should. but still admin has nothing to admin when he logs in...

trying to figure this one out turned a few hairs grey
 
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 577
Location: Netherlands

PostPosted: Tue Nov 06, 2012 3:37 pm Reply with quote

I want to set myself available to help you out on this for the next hour.
You can contact me over here with a pm or use the email adres in my profile.(have msn running).

Grtzzz wHiTeHaT.
 
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Tue Nov 06, 2012 4:43 pm Reply with quote

My fuzzy memory reminds me that there was a problem with the is_mod_admin function in an early version of our latest release. The admin.php program populates the list of modules in the ACP by running through the file system for each module. The code is:

Code:
      $result = $db->sql_query('SELECT `title` FROM `' . $prefix . '_modules` ORDER BY `title` ASC');

      while ($row = $db->sql_fetchrow($result, SQL_ASSOC)) {
         if (is_mod_admin($row['title'])) {
            if (file_exists(NUKE_MODULES_DIR . $row['title'] . '/admin/links.php')) {
               include_once NUKE_MODULES_DIR . $row['title'] . '/admin/links.php';
            }
         }
      }


If your modules directory is populated and if the system recognizes you as a module admin then the icon and name for the module will appear in the ACP.

From your screen image, it appears you weren't signed in as GOD admin. If you could do that and see if the problem goes away, we can probably narrow the problem down to getting you a "fixed" version of is_mod_admin.

Here is the code from the latest release -- this is from mainfile.

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


If yours is different it might be causing the problem but I'd try logging in as the GOD admin just to make sure.
 
View user's profile Send private message Visit poster's website
kd8hho







PostPosted: Tue Nov 06, 2012 9:35 pm Reply with quote

mainfile code you posted fixed the issue.

the screen shot was of the admin account in question. (i used god to create it)
 
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 ©