You can just set the general permissions for the suforum to deny read access. Shouldn't that make it private?
At the moment, you can't access the general permissions on game forums.
I made an executive decision and instead of having the public/private game toggle change subforum permissions, I added the ability to change the read permissions on game subforums (you can't change the game's root forum general permissions, as that's still controlled by the private/public flag). Anyone interested, please test it out on staging.
If you give people tools they will find a way to use them, but it's a matter of how much effort it is for you. On another platform(RPOL), there are more granular visibility controls and some games use them heavily while others just use a more global approach. One use case is that you want the Lore and Character Creation type threads to be visible to all if you are recruiting new players but otherwise want to keep the roleplay forums private. With the finer granularity people run games where players in the game can't see threads their characters are not in (I wouldn't do that, but it is used.)
I can image there'll be games where folks don't want their subforums to be public, or at least not all of them? Or should toggling do both, and a GM can toggle each one individually? I kind of lean to the last.
I suspect it would depend on what the GM was using the subforums for. I can think of no reason I would want to hide one of my subforums, although I would want to be able to restrict editing and posting privileges of some to myself, and others to my player group.
e.g.
* Campaign Wiki: GM only posting and editing, public viewing.
* The Tavern: Player group posting and editing, public viewing.
* Player Introductions: Player group posting and editing, public viewing.
I can think of no reason I would want to hide one of my subforums
A common use case I have for this is when it's a split party and I don't want the different groups to see what each other is up to.
With mega games (10+ players) sub-forums can be used as "sub-games" to improve the player experience and avoid spamming their inbox with posts from other groups.
I can think of no reason I would want to hide one of my subforums
A common use case I have for this is when it's a split party and I don't want the different groups to see what each other is up to.
With mega games (10+ players) sub-forums can be used as "sub-games" to improve the player experience and avoid spamming their inbox with posts from other groups.
Yes! I can see how that might be useful.
Although I usually just create separate session logs for each group.
So, for example, back in 2021 when my game started, we had six Session 0 threads (one for each character) and then gradually merged them as the characters met and began working together.
... Instead, should I make a feature were you can set individual subforums as publicly private/public, instead of in sync with the main game forum? ...
That does seem like it would be useful. You already have the permission separate, so it is just about adding a UI element in the ACP to change them.
It could just be another section like the existing Group and User, with a single [ Edit ] button.
Possibly this needs fewer presented permissions? I can't see why one would want to allow the public (any member of GP) to Delete Threads/Post, or Moderate, but the permissions are there in the database, so offering them to the user (in an advanced section?) in case they want them might be fine?
As a simple start, just another ACP line with 'Visible to the Public? ' which sets the base needed permissions could be the way to go?
If the game is set to private, presumably the Subforums should all be Private as well? We might want to enforce that (the old 'toggles with the game state' system we had working before?) So maybe this does need to be fixed to as it was, and then we can work on the new options?
I don't have a date when this broke, but I have games where the subforum general permissions are set based on the other factors. Now changing the permissions does not change the general ones anymore. The OP lists examples of two games that behave differently as well.
That bit of PHP is complicated, will many checks if it is group or user or general and special handling of the general case. I can not see any obvious errors, but it is hard to parse in my head.No matter what changes I make, the general permissions remain unchanged.
After creating the subforum's base game 'group', everything default:
SELECT * FROM forums_permissions_groups WHERE forumID = 12282;
(4813, 12282, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0)
SELECT * FROM forums_permissions_general WHERE forumID = 12282;
(12282, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
Changing read permission to yes, sets it for the player, but does not change the general permissions.
SELECT * FROM forums_permissions_groups WHERE forumID = 12282;
(4813, 12282, 2, 0, 0, 0, 0, 0, -2, 0, 0, 0)
SELECT * FROM forums_permissions_general WHERE forumID = 12282;
(12282, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
An old game where the general permissions did change:
SELECT * FROM forums_permissions_groups WHERE forumID = 7944;
(3431, 7944, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2)
SELECT * FROM forums_permissions_general WHERE forumID = 7944;
(7944, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1)
(I can easily include field names if they might help, but they made the lines long and wrappy.)
Was there a point where this actually "worked"? Because I went back through the old code, and I can't see how. The change happened when we dropped Mongo, but I realize I never intended on subforums to be public. There's code on staging right now with the new functionality, but it'll probably disappear through the day as I work on the bbcode issue first.
'Before' the mongo change it did. Quite likely it never did since then.
Bowl showed me there's a flag on threads to allow public posting. I wonder if that conflated things. And yah, there's no way it's worked since. I know I never intended subforums to be accessible; it seems likely this was a modification by Adam. As it's now a feature that's in use, I'll have to figure out how to make it work properly. We have to reassess the "allow public posting" part though.
It seems that the subforums were in fact all readable by everyone, even if the players in the game had been forbidden from reading them. This is opposite to 'never intended subforums to be accessible', they were being left in a readable state for the pubilc.
Adam's patch worked (up till the mongo excision). Hopefully you can work out what the code does ... or, more to the point, why it is not working, the logic there seems valid: 'if the GM changes the group permissions, also change the general READ permissions to match'.
That's a per thread thing, allowing people not in the game to post on those threads in games.
That is not related to forum permissions at all.
Uh... that's exactly a forum permissions thing. Threads don't have permissions. So it has to override the permissions of the forum it's in to work, which means we're adding a new permission layer, but one that's a modifier.
vagueGM says:
Surely, if they can see the thread, this will keep working as it already is?
If the game is private, or the subforum is not visible, then allowing public posting does nothing since people can't see the thread to post in.
This part is working fine. There is no problem here.
I'm not saying I'm going to remove it, but it's related, so whatever changes I make to allowing permissions at the general level of forums will have an effect on this. And likewise, as it's an override, it's likely to create bugs.
vagueGM says:
It seems that the subforums were in fact all readable by everyone, even if the players in the game had been forbidden from reading them. This is opposite to 'never intended subforums to be accessible', they were being left in a readable state for the pubilc.
Adam's patch worked (up till the mongo excision). Hopefully you can work out what the code does ... or, more to the point, why it is not working, the logic there seems valid: 'if the GM changes the group permissions, also change the general READ permissions to match'.
Yah, and that's the weird part... why is a general permission matched to a group's permission? They shouldn't be tied together. They may often align, but aren't directly linked. I'm fine with having general read permissions modifiable, but I had entirely missed that changing the group permissions affects the general permissions, because from a UX and code perspective, it doesn't fit. As always, not blaming Adam for the changes he made, but this one is problematic.
This is based off the `publicPosting` field in the `threads` table. It is just about the thread it is set on. The forum permission affect who can see the thread, `publicPosting` says if people outside the game can post (but only if they can see it in the first place:).
Keleth says:
... why is a general permission matched to a group's permission? ...
I think just the `read` permissions need to bound together. If people can't read the forum, none of the other permissions matter? The fact that they are not in the game prevented most of the other permission from mattering because non-players could not do things like creating or deleting threads and such.
This is based off the `publicPosting` field in the `threads` table. It is just about the thread it is set on. The forum permission affect who can see the thread, `publicPosting` says if people outside the game can post (but only if they can see it in the first place:).
Right, but that's what I'm saying. Threads, in general, don't have their own permissions. This is adding a new permission layer, but just specifically for one use case. Permissions in general have their own mechanisms and logic, and then this just breaks out and does it's own thing. I'm not trying to say it's a bad idea or bad code, but architecturally it is an override, and overrides like this rarely pan out well.
vagueGM says:
I think just the `read` permissions need to bound together. If people can't read the forum, none of the other permissions matter? The fact that they are not in the game prevented most of the other permission from mattering because non-players could not do things like creating or deleting threads and such.
I disagree that any should be bound together. One, it limits GMs in the sense that then they only have the choice of everyone read or no one read. What if they want private info in their public game, for one reason or another? Second, there's no logical connection between the two. As I said, yes, they'll likely be the same all the time, but that just means 2 clicks instead of 1.
... I disagree that any should be bound together. ...
Absolutely. But, at a minimum we could get it back to working the way it did before? Then we can look into giving the GM more finegrained control.
As a test, if you want to set 'read' to 0 (inherit) in forum 12282 we can see if that is sufficient for people to be able to see that Roleplay Archive. I think keeping that at 0, or tied to the group 'read' permission if that is less than 0, is good enough for now?