If you click on the link from the "Group Details" block, (the link says "Create forum post") it loads the page http://mywebsite.com/node/add/forum/23
but this fails to set the og_audience select box at the bottom of that page. The og_forum post can be submitted with out any group attached to it. I think the group audience select box should be set after the forum post is submitted, i.e not settable by the user.
But the private/public check box should be set by the user.
This could also occur in the case where a forum post is moved from one group forum to another. Moving from group A to group B, should also deselect the A group and add the B group to the og audience select box.
Comments
Comment #1
rconstantine commentedWould changing this path to be similar to the other one you tweaked do the trick for setting the audience default value? If so, then I favor either disabling or hiding the audience checkboxes altogether to prevent the user changing it. I don't think we have to set it at submit.
Is there currently a mechanism for moving posts from one group to another? If so, how does it work?
Comment #2
rconstantine commentedAs an alternative, I just noticed that on my test site, I have my forum topic node type on the og "Omitted content types:" list so it doesn't participate in the audience junk. This ensures that only the group it's in is where it's seen, right? What if we simply added the "Forum topic" content type to this list programmatically at the install of og_forum? Then we'd place a note in the README that this shouldn't be changed manually.
Comment #3
rconstantine commentedNevermind. I'm a dummy. I see that not using the audience field makes those posts automatically 'public' posts. So it's better to set the audience and not let the user change it.
Comment #4
rconstantine commentedOkay. One more comment. I see that the current behavior is that the selector box chooses the current forum and the audience is correctly set to the current group. Is this latter part due to the addition of gids[]=$gid in the url?
Anyway, if you log in as a regular user, you will notice a note next to the forum selector which tells them that changing it does nothing. This is due to my lameness in not being able to figure out how to hide/disable the selector. Instead I set #value, rather than #default_value. So the user cannot post to a group other than the one they selected in the first place. Those with the 'administer forums' permission are not stuck with this limitation. They can post to any forum they belong to.
As for the audience, the user can currently change that as I recall. Obviously, this doesn't make sense if the forum is auto-set. I would imagine that viewability would get screwed up somehow, so the audience should match the forum.
I think this issue is therefore related to this one: http://drupal.org/node/123268
So if you guys can confirm that the audience is correctly being set, we should throw around ideas to deal with all of this.
My current idea is this:
1) reduce the forum selector to show only forums within the current group unless:
a) the user is user == 1/has the 'administer forums' permission (?)
b) the user is a group manager, in which case all forums for groups this person manages should be shown
2) set the audience via #value and hide the interface from the user unless:
a) the user is admin == 1/has the '???' permission; then we use #default value, but still hide the interface and use validation to properly set the audience based on forum selected
b) the user is a group manager; then we use #default value, but still hide the interface and use validation to properly set the audience based on forum selected
Why not validate for the general case in 2)? I think it would be faster in validation to check isset(blah[#value]) than to do some kind of look up which was presumably done already in limiting the selector in the first place and which could set #value at that time.
In 1), what should be done with the site-wide forums? Only add them to the selector for the admins unless that's the forum the user is in? Or rather, when inside the site-wide forums, limit the selector to those inside the current container?
Let me know what you think.
Comment #5
darren ohTo keep it simple, I would recommend the following:
#access => 0to hide the audience selection.Comment #6
markDrupal commentedI think Darron's ideas should be put into the module before an official 2.0 module is released.
Comment #7
markDrupal commentedSorry, I should have written Darren, not Darron
Comment #8
rconstantine commentedOkay, I now agree that the audience should be hidden at all times, no matter the permissions and that it should be set at submit.
However, I think my points under 1) in post #4 are still good. How else can an admin move a post from one forum to another? I'm also thinking it might be nice to allow admins to cross-post into forums/groups they belong to. Is that a bad idea? What are the implications I'm not considering? To implement it, I would show the forums per 1)a) and 1)b), but make the selectors multi-select instead of single-select.
Comments?
Oh, BTW, that's a fine idea to get this worked out before an official release.
Comment #9
rconstantine commentedJust finished this stuff. How it is now:
When there is a group context, the forum drop down selector is limited to the forums for that group unless the user has the 'administer forums' permission. This works whether the user clicks the 'Create forum topic' from the group menu, or browses to the forum and adds a post that way. The container is not shown since the group is the container and you can't post to a container anyway.
Default value for the drop down is set correctly in the group context for all cases.
If a user clicks 'Forum topic' under the main menu's 'Create content' submenu, The drop down is populated with all site-wide forums/containers and also those belonging to groups to which the user belongs.
If a user browses to the site-wide forums and begins a post that way, the drop down is restricted to site-wide forums. Likewise, if a user browses to a group forum through the site-wide listing, the group context as described above still applies.
The audience is automatically set if a group context exists and the user is not presented the interface to change it.
NOTE: If you have forum topics as part of the audience system and you require an audience, then anonymous users cannot post forum topics and they get a message from OG stating that they need to join a group. Likewise (I think) for site members that don't belong to a group. I think this affects posting to the site-wide forums as well. I'm not sure of a good way to make an exception.
I think that's it. Will be in the next release.
Comment #10
(not verified) commentedComment #11
neurojavi commentedPlease read this forum post http://drupal.org/node/183245 for a discussion about Audience improvement.
Comment #12
rconstantine commentedI will make it so the users can post to a group forum by way of the site-wide forum list if this isn't working already. I'm reopening this to make sure.
Comment #13
gracearoha commentedHas this been fixed as mentioned in #9? I am still having problems. I am using D5.7, OG 5.54 and OG Forum 5x -2dev (latest).
In all cases, public forums or private group forums, the forum drop-down menu shows all forums for public and for every group.
I would like for all my posts (except the public forums) to be set to private.
I therefore set my og visibility settings to “Visibility chosen, default to private”. nonetheless, all anonymous users and authenticated users – whether they belong to a group or not can access all group and public forums if they enter into /forum. Authenticated users can post a new topic into any of the group forums listed in the “public forum” at /forum. However, this post will not show in the forum view in that group's portal if it has been made by a non-member. And also, if anonymous users or authenticated users who don't belong to a group enter into the group portals, they cannot access the forum if it is in a private group.
I have my audience checkbox on and the audience required set to optional. I would prefer not to have the audience checkbox at all and for all my group posts to automatically default to the group in which they are being posted into, but if i uncheck the audience checkbox, it still shows.
I made the change to the og_forum (=) code as mentioned in node/156661 since before all my forums were marked as private. Now none of them are marked as either public or private including the group forums that are private.
OG Forum settings:
all group forums are placed in the same container
allow public choice (have also tried with this unchecked)
I have been going round and round for days trying every combination of settings possible and can't find a suitable solution.
Comment #14
gracearoha commentedokay, so i uninstalled og_forum and then uninstalled og and re-installed og 5.50 (since it looks like 5.4 wasn't out yet when you last updated og-forum). I edited the og.module according to the og_forum README and then re-installed og_forum 5x-2xdev.
Now if i go into a group homepage to post a forum topic, the correct group audience box is checked by default if i enter into the forum via the "group forum" link in the group details block. However, if i try to add a topic by using the link made in my group forum view, the group context is not maintained. See my code below:
In neither case, however is the group context maintained in the forum drop-down list which also contains a list of all the public forums.
What am i missing here?
And has anyone tried this with og 5x-5.4?
any suggestions welcomed
Comment #15
Anonymous (not verified) commentedComment #16
Anonymous (not verified) commentedFrom the original description ..
". I think the group audience select box should be set after the forum post is submitted, i.e not settable by the user."
This looks to me to be the way to go for submitting / editing forum posts .
I will see if i can implement this now / over the weekend prior to working on migrating OG Forum to D6...
@Ryan
Any thoughts ?
Comment #17
Anonymous (not verified) commented@Ryan
I am working on this problem today .
I have taken out the audience for forum forms and looking to write some code that will attibute the forum post to the correct group ..
If your around to offer any insights , please feel free to advise
Best, Paul
Comment #18
Anonymous (not verified) commented@Ryan
Looks as though i need to get a "node_access" record written was probably handled by OG when the audience checkboxes were around . Investigating ...
Comment #19
Anonymous (not verified) commented@Ryan ..
Further update ....
It looks as though we need to so something like the following ..
Getting there slowly .
found it ...
Comment #20
Anonymous (not verified) commentedHeres a patch which looks to be working . If anyone has any time please test .
Comment #21
Anonymous (not verified) commentedThe patch above is not working. If someones want to have a look at this over the weekend , please feel free.
Comment #22
Anonymous (not verified) commentedHere is a working patch . Ill get this out in the next development release.
Comment #23
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.