I found these directions in og.module:

// when you view a group, you really see some facts about the group in a block and then lists of nodes affiliated with that group.
// each of these lists is presented by default in a table, although that can be changed by the theme
function og_view(&$node, $teaser = FALSE, $page = FALSE) {
$node = theme('og_view', $node, $teaser, $page);
return $node;
}

// if you want a totally different group home page, you may redefine this function in your theme
// if you just want to change the presentation of a group home page section, redefine theme_og_list_generic()

Yes, I want to change from the default table view to a totally different homepage! But I can't figure these instructions out.

I tried pasting the og_view bit of code in my page.tpl.php file, but that didn't do anything.

Is there documentation somewhere that lays out the basic concepts of what I'm supposed to do here?

Comments

PeterLucas’s picture

I see this issue has been discussed here before, without any clear solutions...

Can anybody please explain how to achieve this pretty straightforward goal? Or give some more pointers?

This still like a foreign language to me and apparently people who know more about coding than me couldn't figure it out either...:

DaveNotik - July 19, 2005 - 20:01

Per Moshe Weitzman, the module's creator, the way to do this would be to theme/re-define the theme_og_view function, and do some work with node_view and node_access to redefine the group home page.

So, using the PHPtemplate engine, in the templates.php file, you'd have a function called phptemplate_og_view.

Moshe says the query his module already makes available will work, i.e. $sql = og_get_home_nodes_sql($type);

I had already begun doing this, but my limited abilities with the Drupal APIs are inhibiting me. Can others pitch in and see if we can get the answer to this?

(Again, I really think Drupal is in dire need of a better philosophy / architecture for defining content and views. Perhaps the CCK is it...)

--Dave

PeterLucas’s picture

Apparently an older version of the OG module produced group homepages that were more similar to the general homepage.

Can I get this older version somewhere? Can I replace pieces of code in the new version with code from the old version to get the view I'm looking for (headlines, teasers and other content instead of the administration-like table lists)?

zach harkey’s picture

I hear you man. The og module was so promising at one time, but it just seemed to evolve in the opposite direction of what I am looking for. The tabled output confuses my users and grouping nodes based on content type doesn't help me at all. I'd much prefer if it was just one giant book hierarchy that I could order as I please.

I think I might be giving up on it in favor of some kind of a mixture of taxonomy_access and custom pages. Over on drupaledu.org I found these guys who have put together a pre-configured class site available for download.

The site is designed to support a single class. It is based on 4.6.3, and comes with several contributed modules installed and configured for academic use. The site uses the Taxonomy Access Control module to limit access to specific areas of the site, and to prevent anonymous users from viewing any student-created content.

I've installed it on a test server and I'm very impressed with the results.

The distribution was conceived for a class site, but aside from changing the names of a few terms (e.g. student to client, or group member) and maybe a few other minor changes, it seems like a great fit for maintaining any kind of group.

I learned a lot of new ideas just by tinkering with a completely configured site with users, nodes, modules, categories, permissions, and even customized dynamic(snippetized) pages. I would definitely recommend taking a look at it.

-zach
------------------------
harkey design

: z

PeterLucas’s picture

Very interesting. That may be the future for Drupal!

I'm about to give up on Drupal and go back to Nucleus. I found out that Nucleus has some new plugins that will probably let me do what I needed after all.

Drupal may be better architecturally, but if I have to learn hardcore PHP first it's still no use to me.

Drupal developers don't seem very interested in packaging, layout and documentation. They should encourage "third parties" to put more of this kind of prepackaged offerings for specific audiences/tasks together.

That may be more fruitfull than trying to improve or streamline support on Drupal.org because that's not gonna happen...

jeepfreak’s picture

don't mind me.

emilyf’s picture

just in case anyone is still tracking this issue, i put up a post on one way to do this here: http://drupal.org/node/293906