This is a pretty cool module. Thanks for writing it.

I'd like to request a UI change for the og_aggregator tabs. On sites with various modules enabled (like book, nodeclone, og_vocab, devel, etc.), the og_aggregator tabs don't get shown. My OG home pages already have a bunch of tabs so I had to look at the module's code to see what the paths were for the og_aggregator tabs.

Can the tabs be consolidated into one?

Comments

rconstantine’s picture

Status: Active » Needs review
StatusFileSize
new30.63 KB

Sorry for not posting a proper patch.

else if (arg(0) == 'node' && is_numeric(arg(1))) {
      $node = node_load(arg(1));
      if (og_is_group_type($node->type)) {
        $items[] = array('path' => 'node/'. arg(1). '/aggregator',
            'title' => t('News feeds'), 
            'callback' => 'og_aggregator_page',
            'callback arguments' => array(arg(1)), 'access' =>TRUE,
            'type' => MENU_LOCAL_TASK,
            );
        $items[] = array('path' => 'node/'. arg(1). '/aggregator/overview',
        	  'title' => t('Overview'), 
        	  'type' => MENU_LOCAL_TASK,
        	  'weight' => 17);
        $items[] = array('path' => 'node/'. arg(1). '/aggregator/feed',
            'title' => t('Feed admin'),
            'callback' => 'og_aggregator_overview',
            'callback arguments' => array(arg(1)),
            'access' => node_access('update', $node),
            'type' => MENU_LOCAL_TASK, 'weight' => 18); 
        $items[] = array('path' => 'node/'. arg(1). '/aggregator/add',
            'title' => t('Add feed'),
            'callback' => 'og_aggregator_add_feed',
            'callback arguments' => array(null,arg(1)),
            'access' => node_access('update', $node),
            'type' => MENU_LOCAL_TASK, 'weight' => 19);
        $items[] = array('path' => 'node/'. arg(1). '/aggregator/feed/remove',
			'title' => t('remove items'),
			'callback' => 'og_aggregator_remove_feed',
			'access' => node_access('update', $node),
			'type' => MENU_CALLBACK);
		$items[] = array('path' => 'node/'. arg(1). '/aggregator/feed/update',
			'title' => t('update items'),
			'callback' => 'og_aggregator_refresh_feed',
			'access' => node_access('update', $node),
			'type' => MENU_CALLBACK);
		$items[] = array('path' => 'node/'. arg(1). '/aggregator/feed/edit',
			'title' => t('edit feed'),
			'callback' => 'og_aggregator_edit_feed',
			'callback arguments' => array(arg(4),arg(1)),
			'access' => node_access('update', $node),
			'type' => MENU_CALLBACK);
      }

The changes are slight. I changed some titles of the tab links and moved all but one tab to a second row. The 'News feeds' link is now the only tab on the group, and an 'Overview', 'Feeds admin' and 'Add feed' tab are underneath it. The only other changes were to the paths. They are now all under /aggregator. Calls to them in the rest of the code were all adjusted accordingly.

I'm attaching the total module file in case someone wants to roll a proper patch. I'd do it, but the tools I routinely use, while fine for me, have gotten complaints here at Drupal for not producing the exact same diff/patch files.

And anyway, I don't recall whether I have the latest version or not, so you'll have to check that. In any case, making the changes by hand took no more than ten minutes.

rconstantine’s picture

I should warn you that I made one other change to the above attached file. I changed the menu items (which precede the quoted ones) such that og_aggregator is under the Organic Groups menu in the admin menu.

Another change I made, which was not attached, was in the info file. I set package = "Organic groups" so that it's grouped with OG in the modules list.

Christefano-oldaccount’s picture

These are great changes. I'll review this and roll a patch when I get back to the office.

rconstantine’s picture

I made one mistake. The last menu item (the one for editing existing feeds) should have arg(5) now instead of arg(4).

Christefano-oldaccount’s picture

StatusFileSize
new0 bytes

Here's a patch. I'll begin reviewing it shortly.

Christefano-oldaccount’s picture

StatusFileSize
new8.81 KB

Hmm, the last attachment is zero bytes. Let's try again.

csc4’s picture

Did the reviewing happen?? Will it be committed soon?

christefano’s picture

csc4, please feel free to review the patch. (I rolled rconstantine's code into a patch so that others could review it, too.) It would be great to hear about your results.

Unfortunately, my time has been pulled in different directions since October and I haven't tested it thoroughly. It's not likely that I'll be able to any time soon.

Taz’s picture

Status: Needs review » Closed (fixed)

This has now been comitted and is a new release.