this is another interesting discussion "Relocalization Network beta launch, fork of organic groups"
http://drupal.org/node/22902

also some work towards "Show all content for a particular group (Organic Groups)?"
http://drupal.org/node/26559

this might be of some use "OG - Tweaking the UI for very large numbers of groups"
http://drupal.org/node/28224

For replacing default UI messages in Organic Groups, the String Overrides module works well. To get it to kick in, be sure to include the entire t() statement you are replacing including string parameters like %title.

Comments

tobyspark’s picture

just worked out something that wasn't intuitive to me - to change the owner of a group, change the author of the group homepage. requires administer node permissions.

toby

lias’s picture

This may have been answered somewhere else, I can't find it though, but is there a disable feature in groups that can hide this message? I see it in the module itself - line 1075 - but didn't want to comment it out unless I absolutely had to (for fear I'd forget the next time I updated).

*****edited June 12 07 ****
Didn't find anything after searching the forums/issues areas so I ended up commenting out the message text output in og.module here lines 1080-1085:

From this:

    $msg = t('No posts in this group.');
  }
  else {
    $msg = t('No public posts in this group.');
    if (!$user->uid) {
      $msg .= ' '. t('You must <a href="!register">register</a> or <a href="!login">login</a> and become a subscriber in order to post messages, and view any private posts.', array('!register' => url("user/register", $dest), '!login' => url("user/login", $dest)));

to this:

 /**    $msg = t('No posts in this group.'); **/
  }
  else {
/**    $msg = t('No public posts in this group.'); **/
    if (!$user->uid) {
/**      $msg .= ' '. t('You must <a href="!register">register</a> or <a href="!login">login</a> and become a subscriber in order to post messages, and view any private posts.', array('!register' => url("user/register", $dest), '!login' => url("user/login", $dest))); **/
mikemccaffrey’s picture

I wish there was a good way to handle this problem. I chose to make string replace statements in my page.tpl.php file:


	$messages = str_replace("<div class=\"messages status\">\nNo posts in this group.</div>", '', $messages);
	$messages = str_replace("<div class=\"messages status\">\nNo public posts in this group.</div>", '', $messages);
	$messages = ereg_replace("<div class=\"messages status\">\nNo public posts in this group. You must <a href=\"/register\?destination=node\%2F".arg(1)."\">register</a> or <a href=\"/user/login\?destination=node\%2F".arg(1)."\">login</a> and become a subscriber in order to post messages, and view any private posts.</div>", "", $messages);


Messy, but at least it does not involve hacking module code.

gcassie’s picture

if you have a custom module with a heavier system weight than OG, you can affect the messages it created with drupal_set_message.

this is in drupal 5, but it (or something very similar) should work in 6:

function example_nodeapi(&$node, $op, $arg = 0, $arg2 = 0) {
  // let's say we don't want a message for agency groups
  if ($op == 'view' && is_array($_SESSION['messages']['status']) && $node->type == 'agency') {
    $search = t('No public posts in this group.');
    foreach ($_SESSION['messages']['status'] as $index => $message) {
      if (strpos($message, $search) === 0) {
        unset($_SESSION['messages']['status'][$index]);
      }
    }
    // otherwise we get an empty message box
    if (!count($_SESSION['messages']['status'])) {
      unset($_SESSION['messages']['status']);
    }
  }
}
chaloalvarezj’s picture

Thank you for the tip. I have used this inside and action to set a message when the business is going to be viewed, and worked beautifully!

dugh’s picture

See also the string overrides module.

You can override any t("...") string with a different message, or blank I assume.

Les Lim’s picture

You could set the number of items displayed to 1 and set the record offset to an extremely high number. You can do this in Views 2; I don't remember if that's part of the interface in Views 1.

jackbravo’s picture

I think the easiest way to solve this is modifying the og_ghp_ron view (or the view that you set for group homepages). You have to set the empty text and this is what would be shown instead. This text can be just a blank line if you don't want to show anything ;-)

bravo’s picture

Thanks for this tip. I had ignored this as the Empty Text on og_php_ron was already empty. Your solution made me look at the og views code, it is showing a default empty text from og code, if the view's empty-text is not defined. The trick was to set the empty text to one space (' ').

Pseudothink’s picture

Even though I'm sure this will seem very obvious to Drupal admins, I spent a while figuring this out, and I'd like to save other newbies the trouble.

In order to enable a content type for use with the Organic Groups module (as a Group node, Group post, etc.), your user account (if not using the site administrator account) must have the "administer organic groups" right (listed under "OG module" in admin/user/permissions). I installed the OG module using an account I'd added to an "administrator" role, but hadn't added the new "administer organic groups" right to the role after installing the module. It took me a while to figure out why I couldn't set any of my content types to be used as Group nodes, since the Organic groups usage settings widget was not visible in the content types section, and the new permission wasn't mentioned in the module installation document.

williamjh’s picture

In working with some of the 6.x user contrib dev modules (I think it was the resume mod that was the culprit), I was getting errors that prevented the posting of new content to group nodes. Just a reminder that dev mods are for testing on non-production sites. It took me awhile to figure out since I forgot I had installed the dev mod. The exact error was "you must select a client".

allynn’s picture

I'm a newbie too but I managed to install and config OG okay (I think). The trouble is that I want private groups (class rosters). But my "members" link isn't a link! Even if I make the Groups totally public I still can't add members myself as an administrator.

I have all the correct permissions; I, as admin, have permissions for **everything** on the site.

I created a new content type for Group node and everything seems to work as it should. It's just that I can't add members. I would like to try the OG Subscriber Manager but it's only for 5.x and I'm using 6.x

Anyone have any ideas?

tryitonce’s picture

http://drupal.org/node/54979#comment-103998?

Well this refers to a little hidden thing to get OG going.

then you have to be in the organic groups and the block "'Group details' block" (under http://www.example.com/admin/build/block/) has to be activated (add it to the left - or right- sidebar and make sure it is configured either for all or your specific role to be visible - it should be visible to all of your group members actually).

You also have to be aware that if you move to an admin page you will leave the group and might lose most or all the blocks you might have activated in respect of OG.
That is rather confusing and one idea is to have one window / tab or browser open remaining in the group and switching to another window / tab / browser for the administration tasks. When returning to the "group" view you need to refresh (reload) the window / tab of course for the changes to register. You might have to clear that "group" views cache before refreshing. Safari offer a "Develop" tab to check to disable cache. But I still prefer to work in FireFox.

If you set groups to private they will not even show up on the various OG blocks and you will have to access them via your "Groups" link and then the "My Groups" tab.

For testing you should also add test posts and topics to your group and group forums so more references will show up in the various blocks related to OG.

And - finally - with my early attempts on groups - start to set the groups public.
In my case I needed the groups to be private and thus configured it all "hush, hush" James Bond like. Of course all the secrets and non public settings won't show unless you know where to look. So it is better to start according to the rules of the Public Information Act and make all transparent. Then step back and make thing private that need to be protected.

I hope this helps.

tryitonce’s picture

I have all the correct permissions; I, as admin, have permissions for **everything** on the site.

I guess with admin you are reffering to the superuser - "0".

Well, yes - when I started with Nancy's tutorial some 4 months ago (here under Drupal somewhere or at - http://nanwich.info/). I learned to set up the superuser "0" as an administrator and to give this person the relevant permissions.

I am not quite sure about the allynn's assumption that you can do everything as the superuser - well, of course you can ultimately, but I found that once you set certain things to be visible by certain roles user "0" can't necessarily see them because user "0" has no role.

So, without having studied it, my assumption is that giving user "0" an administrator role makes sense. But following Gaucho Marx - if this is right the opposite must also be true.
If my assumption is right, though this then means that you need to go through the permission settings every time you are installing a new model. That's at least what I do. And it works (most of the time).

Good luck

davidcgutman’s picture

If you need an admin role with all permissions, you can do what I did and set up a bookmark to automatically click all permission boxes for your admin role. Just go to Users --> Roles --> whichever role is your admin and then enter this text into your browser (where you would normally enter a URL):

"javascript: var x = document.getElementsByClassName('form-checkbox'); for(i = 0; i < x.length; i++) {x[i].checked = true;}"

I know you can do this on Safari & Firefox, have to assume you can do it on IE as well, and then you can save it as a bookmark so whenever you add a new model just go to the permissions page for your admin role and click the bookmark. Saves sooo much time. As long as Drupal keeps the same class name for those checkboxes it should work.

PS If you can't get this to work, make sure you get an alert when you type in "javascript: alert('ok');", I have to assume some browsers don't let you run scripts on a page and that's a quick test to make sure your browser can...

oerpli’s picture

Hehe, exactly the problem I had. I seem to be made of fail =)

petednz’s picture

(Dang - should have been a reply to http://drupal.org/node/38949#comment-1093861) while your suggestion would work in many instance, in my experience og_ghp_ron is not 'normal' and the 'no posts in this group' message is not being delivered through the Empty Text setting. (For us this is using an og_ghp_ron that is basically there to be blank sheet for a stack of Blocks that give a summary of latest content of various types that are also available via a Tab)

i would be v happy to be told what i am missing ;-)

peter davis : fuzion : connect.campaign.communicate : www.fuzion.co.nz