phpbb3 如何知道论坛是否是私有的?

发布于 2024-10-12 06:32:29 字数 186 浏览 5 评论 0原文

我安装了一个 phpbb3 留言板,其中有 2 个论坛 -

  • 公共讨论
  • 私人讨论

每个人都可以看到公共论坛,但只有特定组可以看到私人论坛。

phpbb 用于区分私人论坛和公共论坛的存储变量是什么以及在哪里

谢谢!

I have a phpbb3 message board installed with 2 forums -

  • Public Discussion
  • Private Discussion

Everyone can see the public forum, but only a specific group can see the private forum.

What is and where is the variable stored that phpbb uses to distinguish between the private and public forum?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ㄖ落Θ余辉 2024-10-19 06:32:29

一般来说,论坛可见性基于两件事:

  • 属于特定用户组的用户
  • 该组有权查看该论坛。

您将在管理界面中找到此控件。在“论坛权限”中,您将看到具有某种角色的组列表,这些角色至少允许他们查看论坛(右上角的框)。在“管理组”或个人用户管理下,您可以将能够看到哪个用户属于哪个组。

尽管如有必要,可以更精细地控制事情,但这只是正常的基本设置。如果用户位于某个组中,并且该组有权查看该论坛(该组具有可以查看该论坛的“角色”),则该用户可以查看该论坛。

没有一个变量可以控制这一点。组和论坛权限位于数据库中。

虽然有很多不同的设置方法,但我猜测您正在查找的“变量”可能是数据库表phpbb_acl_groups,其中一行可以关联一个论坛(由 phpbb_forums 中的 forum_id 标识),具有角色(phpbb_acl_roles 中的 auth_role_id)和群组(< code>group_id 来自 phpbb_groups。)

我认为这是我能给出的最佳答案,除非您能给我们更多详细信息(例如实际问题是什么......)

Generally, forum visibility is based on two things:

  • A user being in a particular user group
  • That group having permission to see that forum.

You'll find the controls for this in the admin interface. In "Forum Permissions" you'll see a list of the groups who have some kind of role that will allow them to at least see the forum (top-right box.) In "Manage Groups" or under the individual user management, you'll be able to see which user belongs to which group.

Although things can be controlled at a much finer grain if necessary, that's the normal basic setup. If a user is in a group, and that group has permission to see the forum (the group has a "role" that can see it), then the user can see the forum.

There's no one variable to control this. The groups and forum permissions live in the database.

While there's lots of different ways of setting things up, I'm guessing the "variable" you're looking is probably the database table phpbb_acl_groups, where a row can associate a forum (identified by a forum_id from phpbb_forums) with a role (auth_role_id from phpbb_acl_roles) and a group (group_id from phpbb_groups.)

I think that's the best answer I can give unless you can give us some more detail (e.g. what the actual problem is...)

不…忘初心 2024-10-19 06:32:29

根据 Matt 的回答,我提出了这个查询:

SELECT f.forum_id, f.forum_name
FROM forums f
WHERE f.forum_type = 1 AND f.forum_id IN (
    SELECT a.forum_id
    FROM acl_groups a
    WHERE a.group_id = 1 AND (a.auth_role_id <> 16)
)

这将选择不属于类别的论坛 (f.forum_type = 1),并且访问者没有 ROLE_FORUM_NOACCESS代码> (a.auth_role_id <> 16) 设置。

我考虑过添加 f_read 选项 (a.auth_option_id <> 20),但这并没有改变我的情况。

我想知道这是否是一个坏主意:p

Working on Matt's answer, I've come up with this query:

SELECT f.forum_id, f.forum_name
FROM forums f
WHERE f.forum_type = 1 AND f.forum_id IN (
    SELECT a.forum_id
    FROM acl_groups a
    WHERE a.group_id = 1 AND (a.auth_role_id <> 16)
)

This will select the forums which are not categories (f.forum_type = 1) and a visitor does not have the ROLE_FORUM_NOACCESS (a.auth_role_id <> 16) set.

I've considered to add the f_read option (a.auth_option_id <> 20), but this didn't change anything in my case.

I'd like to know if this is a bad idea :p

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文