I would be interested if anybody would take up this issue, to create a default theme for new group types:
http://drupal.org/node/202442

Code should be committed back into the community og.module.

We're a UK charity with a small web development budget so if this is a lot of work, and hence a lot of money, we'll have to pass.

Thanks.

Comments

I have setup a demo site at http://demo11.codesetter.com . There are two groups at the site with their own themes. Please have a look at the groups and tell me if this is what you are after. Good night.

Yes - this is the end result I am looking for.

THEMES:
Overall Site Theme
Group Theme 1
Group Theme 2
Group Theme ...

Users can create a new group, but by default it always set to Group Theme 1 and NOT the overall site theme.
The user should be able to choose from the other group themes (but this is not so important).

If you don't want to spend a single penny, then run these queries on your (MySQL) database:
ALTER TABLE og modify column theme varchar(255) default 'theme_name';
UPDATE og SET theme = 'theme_name';
Make sure that the 'theme_name' theme is already enabled.

If, yes if, OTOH you want lots of bells-n-whistles like -

  • Admin decides whether groups get any default theme or not.
  • If default theme is enabled, then which theme.
  • Admin decides whether group admins can choose their favourite theme or not.
  • etc

- then we'll have to write a module. But at the heart of everything, it'll be just the second query :-)

Perfect! Thank you so much! I'll leave any more than this to the og experts!

(Neat solutions like this makes me, even more so, want to get to know drupal better, especially the underlying db structures. )

thanks

subscribe...

subscribe

Eduardo

will this querie interfere with future og upgrades? Will it have to be run each time og is updated? Just to verify, theme change is enabled only for group admin and theme change applies on group by group basis, it won't affect the overall site theme?

I've yet to try this on a dev site so wanted so clarification. thanks progga.

> will this querie interfere with future og upgrades?
If OG's database schema changes such that og.theme is no longer used to determine the theme of a group, then this feature will become ineffective. But it shouldn't prevent any og upgrade. The "ALTER TABLE" query is only setting a default value for the column instead of modifying datatypes or length.

> Will it have to be run each time og is updated?
I don't think so.

> Just to verify, theme change is enabled only for group admin
Anybody who can run this query on the database will be able to change the theme.

> theme change applies on group by group basis, it won't affect the overall site theme?
As you have noticed, there are two queries. The first one sets the default site theme. The second query
sets the group theme.

I am away from OG-related programming for nearly 10 months. So please be extra careful while testing this.

HTH