Specify link indexes in og_forum_og_create_links
inqui - October 28, 2009 - 20:41
| Project: | OG Forum |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | paulbooker |
| Status: | closed |
Jump to:
Description
I'm using hook_og_links_alter in custom module to alter links in Group Details block.
OG generates links with named indexes which makes it easy to alter them.
OG Forum adds links with an empty index, which makes it impossible to alter the link, since the index can be anything (0, 1, 2, ...)
$links[] = l(t('Group forums'), "forum/$forum", array('attributes' => array('title' => t('View group forum discussions.'))));It will be more flexible to provide a named index instead:
$links['forums'] = l(t('Group forums'), "forum/$forum", array('attributes' => array('title' => t('View group forum discussions.'))));$links['manage_forums'] = l(t('Manage group forums'), 'og_forum/manage/' . $group->nid, array('attributes' => array('title' => t('Let you create, edit, delete group\'s forums.'))));
#1
I'll get that committed to the development branch later today.
Best,
Paul Booker
#2
Automatically closed -- issue fixed for 2 weeks with no activity.