Closed (works as designed)
Project:
Organic Groups
Version:
6.x-1.0-rc3
Component:
og.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Jul 2008 at 19:55 UTC
Updated:
26 Sep 2008 at 22:49 UTC
I want to add a link to the group's rss feed (/node/nid/rss.xml) to the group details block. The readme file directed me to this code in the og.module file:
// Modify these links by reference. If you want control of the whole block, see og_block_details().
drupal_alter('og_links', $links);
So I know I have to do something here. But I don't know what to do. Couls someone explain this in more detail.
Thank you.
Comments
Comment #1
moshe weitzman commentedfunction [yourmodulename]_og_links_alter(&$links) {
// change $links as desired.
}
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
attheshow commentedI had the same issue here. Moshe's suggestion worked for me in D5 version of OG, but not D6. I had to patch my OG module file (line 2375 of current HEAD version) to:
// Modify these links by reference. If you want control of the whole block, see og_block_details().
foreach (module_implements('og_link_alter') AS $module) {
$function = $module .'_og_link_alter';
$function($links, $node);
}
(back to the way it was in D5 version of OG.)
Comment #4
moshe weitzman commentedThe mechanism is slightly different in 6. look for drupal_alter() in the source code.
Comment #5
kirikintha commentedIs this for 5.10?
function [your_module_name]_og_link_alter(&$links) { (not og_links_alter)
//your links
}
I am trying to take away links and put in new ones, but no matter what I do to the the array, the same links populate the same in the block
-Thanks for the point in the right direction!