You are missing our premiere tool bar navigation system! Register and use it for FREE!


Author: Evaders99PostPosted: Thu Mar 27, 2008 11:10 pm    Post subject:

If you have the proper fixgroup script, then it should run in phpNuke

modules.php?name=Forums &file=fixgroup

Author: shu8manPostPosted: Fri Mar 28, 2008 10:09 am    Post subject:

I have no such file. You mean if I put the file in that location it'll work? Now I'm confused...I'm not a programmer...ok I changed...

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 

Author: shu8manPostPosted: Thu Mar 27, 2008 7:57 pm    Post subject:

Yep, I got the same issue, help would be HUGELY appreciated as I need to reorganize my site and redo all the groups!
this is the code for groupfix.php but I don't know how to port it for nuke. I tried changing the $phpbb_root_path line to 'modules/Forums/' but that didn't do the trick...

Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 262 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Group Permissions Group Permissions

Nuke Cops -> BBtoNuke Installation

Author: XjrBuddhaX PostPosted: Fri Mar 21, 2008 3:31 pm    Post subject: Group Permissions

Help

I have the most current installation of bbtonuke installed. After which I get error messages when trying to set up group permissions. Once I updated from 2.0.22 to 2.0.23 I started getting the error message.

Here is the error message.

Code:
General Error
Couldn't obtain user/group information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ug.group_id = g.group_id AND u.user_id = ug.user_id' at line 1

SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM nuke_users u, nuke_bbgroups g, nuke_bbuser_group ug WHERE g.group_id = AND ug.group_id = g.group_id AND u.user_id = ug.user_id

Line : 702
File : admin_ug_auth.php


I have obtained the groupfix script and ran it, however it did not fix the problem. If I am missing something please let me in on the secret.

Thanks,
Buddha
Code:
<?php
//*****  check users and user groups ****//

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);

// Start session management
$userdata = session_pagestart($user_ip, PAGE_SEARCH);
init_userprefs($userdata);
// End session management

$sql = "SELECT user_id, username
    FROM " . USERS_TABLE ."
    WHERE user_id > 0";
if ( !($result = $db->sql_query($sql)) )
{
    message_die(GENERAL_ERROR, 'Could not obtain user list', '', __LINE__, __FILE__, $sql);
}

$liste ='';
while ( $row = $db->sql_fetchrow($result) )
{
   $username = $row['username'];
   $user_id = $row['user_id'];
   $usergroup = '';
   
   $sql1 = "SELECT ug.group_id
          FROM " . USER_GROUP_TABLE ." ug, ". GROUPS_TABLE. " g
          WHERE ug.user_id = $user_id
            AND ug.group_id = g.group_id
            AND g.group_single_user  = 1
            ";
             
   if ( ($result1 = $db->sql_query($sql1)) )
   {
       $row1 = $db->sql_fetchrow($result1);
          $usergroup =( ( $row1['group_id'] != '' ) ? $row1['group_id'] : 'User has no user group'.$row1 );
         
   }

          if (!($row1['group_id'] != ''))
          {
             
         $sql2 = "SELECT MAX(group_id) AS total
            FROM " . GROUPS_TABLE;
         if ( !($result2 = $db->sql_query($sql2)) )
         {
            message_die(GENERAL_ERROR, 'Could not obtain next group_id information', '', __LINE__, __FILE__, $sq2l);
         }

         if ( !($row2 = $db->sql_fetchrow($result2)) )
         {
            message_die(GENERAL_ERROR, 'Could not obtain next group_id information', '', __LINE__, __FILE__, $sql2);
         }
         $group_id = $row2['total'] + 1;
         
         
         $sql3 = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
            VALUES ($group_id, '', 'Personal User', 1, 0)";
         if ( !($result3 = $db->sql_query($sql3, BEGIN_TRANSACTION)) )
         {
            message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql3);
         }

         $sql4 = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
            VALUES ($user_id, $group_id, 0)";
         if( !($result4 = $db->sql_query($sql4, END_TRANSACTION)) )
         {
            message_die(GENERAL_ERROR, 'Could not insert data into user_group table', '', __LINE__, __FILE__, $sql4);
         }

             
             $usergroup = $usergroup.', adding user group '.$group_id;
          }


   $liste .= ( ( $liste != '' ) ? '<br> ' : '' ) . $username.' <b>'.$usergroup.'</b>';
}

message_die(GENERAL_MESSAGE,'Users:<br>'.$liste);

?>
Code:
<?php
//*****  check users and user groups ****//

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);


to

Code:
<?php
//*****  check users and user groups ****//
if (!eregi("modules.php", $PHP_SELF)) {
    die ("You can't access this file directly...");
}
if ($popup != "1"){
    $module_name = basename(dirname(__FILE__));
    require("modules/".$module_name."/nukebb.php");
}
else
{
    $phpbb_root_path = 'modules/Forums/';
}

define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include('includes/functions_search.'.$phpEx);


However...it gives me a whole big list of all the members, but the bug error remains on the admin side when I go to do forum permissions



Nuke Cops -> BBtoNuke Installation

All times are GMT - 8 Hours

Page 1 of 1

Powered by phpBB © 2001,2002 phpBB Group
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.100 Seconds - 337 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
added by Evaders - DO NOT REMOVE
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::