I've interpreted this question as asking how to set up a View which displays all content published by the current user in the groups he or she belongs to.
Assuming that you have your group set up correctly and a group content type (content that belongs to the group), you should be able to filter by group membership in the following manner:
- Create a node View
- Add a Node group membership relationship
- Add a Group membership: Node group membership contextual filter (argument in D6)
- While setting up the contextual filter, select "Provide default value" under the fieldset titled "when the filter value is NOT in the URL."
Insert the following code:
global $user;
$all_groups = db_query('SELECT gid FROM {og_membership} WHERE etid = :uid', array(':uid' => $user->uid));
$groups_array = array();
foreach($all_groups as $group){
$groups_array[] = $group->gid;
}
$groups_string = implode('+', $groups_array);
return $groups_string;
Make sure that you don't provide a way for users to supply their own contextual filter through the URL, otherwise your default contextual filter won't be used.
Under the "Extra" fieldset at the bottom (click to expand), check "Allow Multiple Values." Save the contextual filter.
Create a normal filter for "User:Current" to limit results to those authored by the current user.
Something along those lines should do the trick.