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

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
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, 49 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Specific permissions for members [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Beauxarts
Nuke Soldier
Nuke Soldier


Joined: Apr 07, 2007
Posts: 11

Location: Montreal

PostPosted: Mon May 07, 2007 12:57 pm Reply with quoteBack to top

I must be feeling quite obtuse today and have been reading all afternoon, have also explored NSN groups addon, but it still doesn't do it.

I am using patched phpNuke 7.9

What I want, is for new members to post at least 3 messages before having access to other parts of the forum.

In forums, I try creating a group but it doesn't show up when I assign forums permission.

I renamed members (the first group after mod) to another name, and gave it 3 for numbers of post required. It's still not working. Any registered member can access most of the forums.

I tried creating new ranks, same thing.

Your help is appreciated, thank you!
Find all posts by BeauxartsView user's profileSend private messageVisit poster's website
Beauxarts
Nuke Soldier
Nuke Soldier


Joined: Apr 07, 2007
Posts: 11

Location: Montreal

PostPosted: Mon May 07, 2007 1:37 pm Reply with quoteBack to top

Oh please disregard, I just found it.

    - Create permissions for forums (private) individually.

    - Create group and assign.


and most important, assign permissions to members, individually.

Rolling Eyes
Find all posts by BeauxartsView user's profileSend private messageVisit poster's website
Beauxarts
Nuke Soldier
Nuke Soldier


Joined: Apr 07, 2007
Posts: 11

Location: Montreal

PostPosted: Tue May 08, 2007 10:53 pm Reply with quoteBack to top

Big glitch, wearing me down.

I did as mentioned above. Assigned permissions to existing users, giving them access to the whole forum after 3 posts.

Now, a new member has posted his 3 mandatory messages, I add him to the usersgroup, but when I try to add the permissions (in user permission), I get this:

Quote:
Could not obtain moderator status

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 aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.' at line 3

SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod FROM nuke_bbauth_access aa, nuke_bbuser_group ug WHERE ug.user_id IN () AND aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.user_id

Line : 529
File : admin_ug_auth.php


I don't want him as moderator, just a a group member.

You might want to know why I set it up this way. It's because I have lots of material on visual arts techniques and theories, and want people to be part of the community instead of just hopping in, grabbing it and leaving nothing in return. I think it's only fair, for the work involved on my part.

Besides, I seem to be logged in a dozen times when in fact, I am only connected once as admin.

Hmmm... Rolling Eyes

Thanks for your help, it is appreciated. Very Happy
Find all posts by BeauxartsView user's profileSend private messageVisit poster's website
hue
Support Mod
Support Mod


Joined: Apr 18, 2003
Posts: 368

Location: Ohio

PostPosted: Wed May 09, 2007 1:43 am Reply with quoteBack to top

Maybe try this . Copy the code below and save it as fixgroup.php . Then, upload it to your modules/Forums folder . Once thats done, point your browser to it like so ::
Quote:
http://www.yourdomain.com/modules.php?name=Forums&file=fixgroup


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);

// Start session management
$userdata = session_pagestart($user_ip, PAGE_SEARCH, $nukeuser);
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);

?> 

_________________
Go Go Buckeyes!!
Find all posts by hueView user's profileSend private messageICQ Number
Beauxarts
Nuke Soldier
Nuke Soldier


Joined: Apr 07, 2007
Posts: 11

Location: Montreal

PostPosted: Wed May 09, 2007 6:53 am Reply with quoteBack to top

Thanks for your prompt reply, Hue.

I created a file as per your instructions, and uploaded it to the appropriate folder and clicked on it. I got the following message

Quote:
You can't access this file directly...


I went to the forum admin page and tried again for the personal tweaking of that member and got the same error message as above.

So I deleted the group. I figured if I can assign rights to individual members, why do I need a group at all for these members. After deleting the group, I assigned particular rights to that member and it worked.

So I guess I have to re-create the group and add members to it once they are assigned their specific rights, or is there something I am missing?

Anyhow, thank you very much for your help and have a great day!
Find all posts by BeauxartsView user's profileSend private messageVisit poster's website
hue
Support Mod
Support Mod


Joined: Apr 18, 2003
Posts: 368

Location: Ohio

PostPosted: Wed May 09, 2007 8:08 am Reply with quoteBack to top

Beauxarts wrote:
I created a file as per your instructions, and uploaded it to the appropriate folder and clicked on it. I got the following message


Quote:
You can't access this file directly...

It has to be uploaded into your modules/Forums folder and the url must be called like so ::
Quote:
http://www.yourdomain.com/modules.php?name=Forums&file=fixgroup

_________________
Go Go Buckeyes!!
Find all posts by hueView user's profileSend private messageICQ Number
Beauxarts
Nuke Soldier
Nuke Soldier


Joined: Apr 07, 2007
Posts: 11

Location: Montreal

PostPosted: Thu May 10, 2007 7:29 am Reply with quoteBack to top

Hue wrote:
It has to be uploaded into your modules/Forums folder


that is where I placed it.

Quote:
and the url must be called like so ::

http://www.yourdomain.com/modules.php?name=Forums&file=fixgroup



The file is in its proper place, so I called it manually, as per your example, with the following result:

Quote:
Anonymous User has no user group, adding user group 22
bozarts User has no user group, adding user group 23


What is it exactly doing?
Find all posts by BeauxartsView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
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.645 Seconds - 518 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::