Closed (works as designed)
Project:
OG Forum
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2007 at 16:40 UTC
Updated:
21 Feb 2007 at 23:03 UTC
~ Hello ~
Need some help hacking this abandoned og_forum.module file :) What I'm trying to do is probably common knowledge for most developers (unlike us hackers) so here goes:
All I want to do is change this URL so it uses my custom address, instead of the current one:
Default code:
>
/**
* Implementation of hook_og_create_links().
*/
function og_forum_og_create_links($group) {
global $user;
$links = array();
// Get group's forum
$forum = og_forum_get_forum($group->nid);
if ($forum) {
$links[] = l(t('Forums'), "og_forum/$forum/$group->nid", array('title' => t('View group forum discussions.')));
}
return $links;
}
I want to change "og_forum/$forum/$group->nid" to "forums/GROUP-NAME-HERE". I've tried to fetch the group name using everything I know:
Any help would be greatly appreciated, thanks in advance...
Comments
Comment #1
jrstmartin commentedBe advised that I'm using clean URLs and the Pathauto module. Again what I'm after here is just how to "call-up" or "fetch" the current group name the user is in.
Comment #2
darren ohUse $group->path.