26

Re: User Groups System

I get this error when I try to make a new post..

"Unable to fetch group info."

sure you do..

27 (edited by pen 2004-06-09 19:18)

Re: User Groups System

i get

Parse error: parse error in /home/pen/public_html/tagmonkey/forum/search.php on line 666

this part yikes.. the last bracket tongue

<?php

        $footer_style = 'search';
        require $pun_root.'footer.php';
    }
    else
        message($lang_search['No hits']);
}

EDIT:
btw.. the row number is what scares me really sad

28

Re: User Groups System

Is it possible to make pre made PHP files with this MOD included ? Anyone got some :-)

29

Re: User Groups System

is it possible to put group restriction to this rss feed?

http://punbb.org/forums/viewtopic.php?id=4117

30 (edited by Dr.Jeckyl 2004-07-01 21:20)

Re: User Groups System

i just got done downloading and editing all of the required files and thank goodness for:

#
#---------[ 87. UPLOAD ]------------------------------------------------------
#

install_mod.php to /
admin_forums.php to /
admin_groups.php to /
group.php to /
profile.php to /
viewtopic.php to /
search.php to /
viewforum.php to /
functions.php to /include
common_admin.php to /include
(language)_common.php to /lang/(language)
(language)_profile.php to /lang/(language)
(language)_userlist.php to /lang/(language)

in the readme/install instructions, cuz silly me didn't re-upload each file as i was done with it and i had forgotten where i got them from.

nice mod by the way, it works perfect!

~James
FluxBB - Less is more

31 (edited by CodeXP 2004-07-07 21:32)

Re: User Groups System

Just registered here after testing PunBB for the first time...and I love it! smile

I ran into a slight problem installing this mod, but after a little troubleshooting I figured it out. Just thought I'd post in this topic in case someone ran into the same problem. It seems as if there are a little error in the documentation (or perhaps it only occurs on my server?). In any case, here it is.

When editing the "search.php" file, when you reach this point....

#
#---------[ 47. FIND ]-----------------------------------------------
#

// If a valid search_id was supplied we attempt to fetch the search results from the db


#
#---------[ 48. BEFORE, ADD ]-------------------------------------------------
#

if ($forum_list[$i][3] != '0') {
            $group_forums[$i] = $forum_list[$i][0];    // $group_forums contains the ID's of group only forums
                $groups[$i] = $forum_list[$i][3];
                 }

 }


#

It seems like there's one } to many. I just removed the last one, and now everything's working just fine smile

32

Re: User Groups System

When changing a users name he isen't in the group any more. At least he has no acces to the forums of that group.

To get it working I needed to change the name in the group table by hand.

wink

Linux is like a wigwam. No windows. No gates. Just an Apache inside.

Re: User Groups System

I've upgraded to 1.1.5, and I at least have DIFFERENT problems than what I have before. I get:

Warning: in_array(): Wrong datatype for second argument in /(path removed)/search.php on line 157

Warning: in_array(): Wrong datatype for second argument in /(path removed)/search.php on line 159

And in the actual page where I should see the search form:

Bad request. The link you followed is incorrect or outdated.

34

Re: User Groups System

CodeXP wrote:

When editing the "search.php" file, when you reach this point....

#
#---------[ 47. FIND ]-----------------------------------------------
#

// If a valid search_id was supplied we attempt to fetch the search results from the db


#
#---------[ 48. BEFORE, ADD ]-------------------------------------------------
#

if ($forum_list[$i][3] != '0') {
            $group_forums[$i] = $forum_list[$i][0];    // $group_forums contains the ID's of group only forums
                $groups[$i] = $forum_list[$i][3];
                 }

 }


#

It seems like there's one } to many. I just removed the last one, and now everything's working just fine smile


Thanks CodeXP!!! This one was raking my brains for hours!  I was looking for something more around the error code, not 500 lines up.  Good debugging skills man.  And  thanks for all your help Mediator!

35

Re: User Groups System

I have an issue with the User Groups System.  It still shows the forums on the index.html list even if it is restricted by group.  If the person is not in that group shouldnt that whole forum be hidden from them?  Rather than having them click on it then get the "you dont have permissions" message.  Just a suggestion for additional functionality.  If anyone finds a fix to support this type of functionality, let me know.

~Wildleaf

36

Re: User Groups System

This may be kludgy, but I found a solution for the above problem

#
#-----------[95. FIND ] -------------------------------------------------------------------
#


<?php

        $cur_category = $cur_forum['cid'];
    }

#
# --------[96.  AFTER, ADD ] ------------------------------------------------------------
#

  $show_this=1;
  if ($cur_forum['group'] != '0') {
      if(!is_groupmember($cur_user['username'],$cur_forum['group']))
      {
        $show_this=0;
      }
  }
    

#
# ------[97.  FIND ]-----------------------------------------------------
#

?>
    <tr class="puncon1">
        <td class="puncent"><?php echo $icon ?></td>
        <td>
            <?php echo $forum_field."\n" ?>
        </td>
        <td class="puncent"><?php echo $cur_forum['num_topics'] ?></td>
        <td class="puncent"><?php echo $cur_forum['num_posts'] ?></td>
        <td class="puncent"><?php echo $last_post ?></td>
        <td class="puncent"><?php echo $moderators ?></td>
    </tr>
<?php

#
# ------[98.  BEFORE, ADD ]-----------------------------------------------------
#

if($show_this)
{


#
# ------[98.  AFTER, ADD ]-----------------------------------------------------
#

}

Hope this helps anyone with the same issue.

37

Re: User Groups System

Whoopsie.  I missed a little information on the last post.  Make sure to edit your $result=

query to include f.group... Such as

$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, f.group, f.closed FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id'.$extra_sql.' ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

And all of the above changes should be applied to index.html.  Hope this helps some

38

Re: User Groups System

works for 1.1.5 ?

39

Re: User Groups System

I have installed it in 1.1.5 with no issues.  Pretty much any mod that works in 1.1.4 seems to work for 1.1.5.  Just add it to the coma seperated list in the install.php and go through the instructions for installing.

40 (edited by lebel 2004-08-28 22:36)

Re: User Groups System

Warning: in_array() [function.in-array]: Wrong datatype for second argument in xxx/forum/search.php on line 157

Warning: in_array() [function.in-array]: Wrong datatype for second argument in xxx/forum/search.php on line 159

I'm in 1.1.5
I don't find the problem ...

41 (edited by lebel 2004-07-31 16:44)

Re: User Groups System

n|oa wrote:

I get this error when I try to make a new post..

"Unable to fetch group info."

same thing

PLEASEEEE HELP

Re: User Groups System

lebel wrote:
n|oa wrote:

I get this error when I try to make a new post..
"Unable to fetch group info."

same thing
PLEASEEEE HELP

here too, but i installed it weeks ago and it was fine until today.

Re: User Groups System

Suggestion:

1. I think group_id is nicer than group in forum table.

2. Current mod has an array value in groups table(members), I think it is more faster when we have an array value in users table(maybe groups or sth like). because forum numbers might not be more than that of users. smile

anyway. thanks. I appreciate your labor!

Re: User Groups System

I think another thing that would be good (something I needed to change on my forums) is making sure that extern.php is not showing any forums that have group memberships.  This of course is only if you aren't showing topics from a private group.  Try this out:

----# FIND (212) #-----
        $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL AND '.$forum_sql.'f.admmod_only=0 ORDER BY '.$order_by.' DESC LIMIT 15') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

----# REPLACE WITH #----

        $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL AND '.$forum_sql.'f.admmod_only=0 AND f.group=0 ORDER BY '.$order_by.' DESC LIMIT 15') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());


----# FIND (239) #----

        $result = $db->query('SELECT t.id, t.subject FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL AND '.$forum_sql.'f.admmod_only=0 ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

----# REPLACE WITH #----
        $result = $db->query('SELECT t.id, t.subject FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL AND '.$forum_sql.'f.admmod_only=0 AND f.group=0 ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

Hope this helps those that are trying to use extern.php and keep user-group forums hidden.

Re: User Groups System

Hi all,

Is it possible that this mod does not apply to punbb 1.1.5?
Because several files that the howto requests aren't available

like "common_admin.php" -> it seems that this file has been split up into several files

and more like that

I can't apply the mod, though it's the thing that I need for my forums and I really love punbb (I was using phpbb before for all my forums, and I like punbb more)
Is there a way to apply this mod to 1.1.5?

Thanks in advance

Frogman

Re: User Groups System

It should work with 1.1.5 without any problems. In order to install it, you will have to open up mod_install.php and add 1.1.5 to the end of the line

$punbb_versions    = array('1.1', '1.1.1', '1.1.2', '1.1.3', '1.1.4');

Other than that, it shouldn't be a problem. No files were moved or renamed in 1.1.5. common_admin.php is located in the directory include.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: User Groups System

Rickard wrote:

It should work with 1.1.5 without any problems. In order to install it, you will have to open up mod_install.php and add 1.1.5 to the end of the line

$punbb_versions    = array('1.1', '1.1.1', '1.1.2', '1.1.3', '1.1.4');

Other than that, it shouldn't be a problem. No files were moved or renamed in 1.1.5. common_admin.php is located in the directory include.

You're completely right
Thanks for the info and bringing us these very nice forums!

48

Re: User Groups System

What's the use of this MOD?
I don't really understand the point.

Re: User Groups System

gyro wrote:

What's the use of this MOD?
I don't really understand the point.


You can group your members into certain groups and then give these groups access to certain forums.
So members that are not allowed to read a certain forum will get an error message like "you don't have permission to read here"

I hope this explains it.

Greets

Frogman

50 (edited by Zypher 2004-09-03 10:22)

Re: User Groups System

EDITTED

Cool mod! By the way I installed this mod on a version 1.1.5, even though it's not supporting that version, so far I have no problems with it! Anyway great work on the mod, infact the usergroup is a better mod than the one phpbb has designed! smile

~Beware of the Darkness Within~