I have created a patch file that adds an additional option for hiding all organic forums/containers on the main forum display and also on the main select list when creating a new topic. My motivation was because the query which allows organic forums to work along normal forums is super slow when there are many organic groups on the site (each group equally at least 1 new term). For example on the project this patch was created on had about 4,100 groups and similar number of organic forums. The query consistently took over 2 minutes, with proper indexing setup. This was bench marked on 2xQuadCore (2.8GHz) with a 10,000RPM hard drive and 8GB of memory.
Please have a look over this, there are probably improvements that can be made. I appreciate any feedback as to the slow query matter as well.
Thanks,
Rob
| Comment | File | Size | Author |
|---|---|---|---|
| og_forum_main_display_patch1.patch | 7.57 KB | bobooon |
Comments
Comment #1
Anonymous (not verified) commentedThanks for the work done here Rob.
Very interesting , this is a priority for me tomorrow.
Best, Paul
Comment #2
Anonymous (not verified) commentedComment #3
Anonymous (not verified) commentedWith this patch installed if you go to node/add/forum to create a site wide forum post the forum select box list all of the group forums.
I think at the site wide level the forum select box should just show only site wide forums ?
Best, Paul
Comment #4
Anonymous (not verified) commentedIf we were to only show site wide forums outside of groups and continue to show only
group forums inside groups then it looks as though we can simplify
og_forum_db_rewrite_sql() as follows ...
Any feedback would be really appreciated ?
Best, Paul
Comment #5
bobooon commentedThat should work. However, sometimes users may assign a common container to put all the organic forums under. If that is the case you would also have to hide that using a little more code sense it does not have an entry {og_term}. For example:
This could probably be merged into your example above, like so:
Let me know if you think that makes sense.
Comment #6
Anonymous (not verified) commentedThanks Rob, altogether that feels like a much better solution.
Comment #7
Anonymous (not verified) commentedI think most people will not expect to to see their group forums when they are making a sitewide forum post. So what i think we should do is to only allow group forums to show up in a group context and later we can reintroduce group forums in a site wide context as a configuration alternative only when the SQL SUBSELECT's have all been rewritten as JOIN's
I'll commit these changes to the development branch
Best, Paul
Comment #8
Anonymous (not verified) commentedComment #10
highvoltage commentedUhh, I hate to sound dense here, but OG forums are still listed in the main forum index as of the latest release, and I don't see any option under admin/og/og_forum to set them to private. Bizarrely enough, there are options to set them to public, which they already are.
\o_O/
Comment #11
primus commentedGreetings
After applying the patch (og_forum_main_display_patch1.patch) it did as expected and hid the group forums from the public forums, but now when I goto post in any of the group forums the select box "Forums" does not show the group forum as an option, so I can only post to one of the public forums. Any suggestions on how to troubleshoot? Thanks.
Comment #12
Anonymous (not verified) commentedIt looks as though this work had been reversed. Investigating ..
Comment #13
Anonymous (not verified) commented"Uhh, I hate to sound dense here, but OG forums are still listed in the main forum index as of the latest release, and I don't see any option under admin/og/og_forum to set them to private. Bizarrely enough, there are options to set them to public, which they already are."
A user currently sees sitewide forums and the og forums for groups that the user is subscribed too on the forum/ page. Hope that helps
Comment #14
Breakerandi commentedWould be nice if this feature will be ported to drupal 6
Comment #15
Anonymous (not verified) commentedComment #16
optidel commentedThis patch is supposed to have been reversed as per #12 but in fact it is very much present in 6.x-2.0 the current recommended version. This is not allowing us to create topics in OG Forum. See #651672: Non-members unable to create new topics
Comment #17
Anonymous (not verified) commentedThe patch was never committed only the code under #5 and then some later improvements
Comment #18
optidel commentedThe code under #5 should not have been committed without the additional option for hiding all organic forums/containers on the main forum display.
Comment #19
kompressaur commentedHi Paul i am using og forum 6.x-2.2. When i go to the /forum page of my site i am seeing the sitewide forums and also any forum that has been made public. All my forums are public by default so i am getting all the forums even for groups that a user hasnt joined. I'm sure it's just my lack of understandment. As a work around for now im just linking to the top container which contains my sitewide forums but it would be nice for users to visit /forum and see just what you said. that would work well. Would you have any idea where i could be going wrong?
thanks
Comment #20
jeffschulerI appreciate that a site with thousands of OG Forums incurs a serious performance hit when loading them all in the select. However, the current functionality seems very counter-intuitive to admins who -- on a site with, for example, 20 OG forums and no site-wide forums -- go to Create content > Forum topic and see no options in the Forums drop-down select, (and therefore cannot post by this method.)
I second the original request in this issue: to offer, in OG Forum's configuration, to show (or not) all forums to which the user has permission to post (and/or belongs to.)
Comment #21
vegantriathlete