Over at http://lists.drupal.org/pipermail/development/2011-June/038244.html I'm attempting to make the case for an "announcement only" group: basically, an aggregation of important posts from *other* groups to act as a meta broadcast signal so that people can follow just one group and get important, curated information from multiple groups without so much noise. The documentation team has a similar need.

The problem with this is that the only way to have curation within a group is to restrict people who can create top-level posts in that group, and to do that you have to make the group "invite-only." This prevents people from joining the group, which means the posts don't show up under the "my unread" view and you don't get email, so it falls off the radar—exactly opposite from its intent! (It also gives off the totally wrong impression to have an "invite only" group. Ugh.)

So what would be cool is if there was a way to let anyone join a group, but limit creation of content to only the group managers.

I dug around in OG module for awhile, then I washed myself with steel wool afterwards, but then I came up with this spec that I think would get us "good enough" of the way there:

1. Make a new "Group type" (I think this is a vocabulary) called "Announcement only".

2. Implement hook_og_links_alter() to strip out the "Create $foo" permissions for non-managers if the group type is set to that.

You could still be tricky and create content by URL manipulation, but simply removing the presence of the links would be absolutely fine for 99% of cases. It's just to deter people from starting off-topic discussions, posting job posts, and other things that would encourage others who need the info from unsubscribing from the group.

Thoughts?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Seems like a good plan to me. One more step - adding a hook_nodeapi validation to further enforce being "announcement only" - could make this even more complete.

I believe with OG for D7 this will be possible "out of the box" but in D7 we are missing a lot of features like mail integration.

webchick’s picture

Assigned: Unassigned » webchick

Yoink! Thanks!!

And I think hook_menu_alter() on node/add/og to set its access callback would be the complete way to solve this.

greggles’s picture

Yes,

* hook_og_links_alter to hide links they shouldn't see
* hook_menu_alter to complain if they manually set gids[] set which they shouldn't
* hook_form_alter/hook_nodeapi to remove groups from the audience selector they shouldn't see
* hook_nodeapi validate to complain if they choose an audience they shouldn't have even seen in the first place

?

Is that really the full set? Maybe this should be a feature in OG rather than altering a bucket of stuff?

webchick’s picture

Assigned: webchick » Unassigned

AFAIK OG 6 is closed for new features. :(

And as laid out, this sounds like too much for me to handle.

greggles’s picture

Since this is mainly to make your life easier...how about you work on whichever pieces of this feel worthwhile and skip the parts beyond it. You'd have to deal with any fallout (announcements to the group) so you're the most motivated to make it work properly.

webchick’s picture

Well, it's not to make my life easier. The "single curated place to go for major D8 initiative discussions" part is already done (which doesn't just make my life easier, but everyone else who doesn't have time to follow every discussion in every initiative). But this would definitely make the lives of people who want to follow that one place the same way they follow other discussions on g.d.o much easier.

I already have a pretty full plate with #1036132: Provide a mechanism for issue summaries atm, but I'll see about getting back to this when that is done. In the meantime, anyone else who feels passionate about this is more than encouraged to work on it!

dmitrig01’s picture

webchick’s picture

Status: Active » Needs review

OMG!!!!!! YAY! :D

greggles’s picture

I took a quick look at the code and it seems to work. Next time we deploy stuff (which needs to be soon) we should do a further review/deploy of this.

Thanks, dmitrig01!

seandunaway’s picture

Hi I've been messing with this, trying to get it ready for #1236280: We need a central place for core contributors broadcast their business.

The create links were hiding as desired... However, the form still showed the options for me and I could still hax0r it and post to the group by supplying gids[] in the url.

I reworked some of the form stuff, but I might have broken something you intended because I didn't understand some of it.

This patch hides the options on the form if:
1) the node can post to the group that is an announcement only.
2) the user is not an admin of said announcement.

Additionally I've added a validation check for the gids[]= tricksters.

Is this the right idea?

Patch attached,

seandunaway’s picture

Rerolled with comment from catch on irc to avoid as many selects as we can, specifically for the users who have permission to post to *every* group.

catch’s picture

I haven't done anything with OG for a while, but I reviewed the patch in irc with rump, and the latest re-roll looks fine visually to me.

greggles’s picture

Status: Needs review » Needs work

Maybe post that to dmitrig01's queue?

This issue is "needs work" until that module is "ready." Thanks for your work on this!

seandunaway’s picture

plach’s picture

joshk’s picture

Do we need to do anything more than set up and configure the og_announce module on g.d.o. to resolve this?

greggles’s picture

@joshk - the comments on #1241748: Not hiding form options and still allowing posting when using gids in the url to announcement only groups. don't make me super confident about just doing that. I think we need a review first and then, yes, deployment.

joshk’s picture

Ok cool. I can handle reviewing it from a "does it stop pernicious url manipulation or form use" standpoint.

seandunaway’s picture

I don't think that patch is relevant anymore but dev needs a proper look! I re-wrote it and did the best I could at the time but I'm just a hobbyist. :)

seandunaway’s picture

I put in a fix for #1298256: Incorrect validation test in og_is_group_admin(). using potentially many node_loads, but have been meaning to integrate the dummy node object idea in #1 of that issue.