Drupal 6.8
I am having a difficulty controlling OG Details Block.
- I need to show OG Details Block shown to all the pages even the page is not OG content. - I need to control the OG Detail Block items, i.e., I don't want to show the member list link.
Any help would be appreciated.
-- - Hiro
Hiroaki Honshuku, A-NO-NE Music, Greater Boston http://a-no-ne.com http://anonemusic.com
To control the OG Detail Block items: make a small module (so just a .info and .module file, give it whatever name you like, I called it modulename in the example) and put inside: The following code has some commented out code, the drupal_set_message code gives you the names of all the $links so you know which ones to remove or change, then I changed the invite link text to blablabla and removed the subscribers and manger link.
/** * Implementation of hook_og_link_alter(). */ function modulename_og_links_alter(&$links, $group_node) { //drupal_set_message('<pre>'. var_export($group_node,TRUE) .'</pre>'); //drupal_set_message('<pre>'. var_export($links,TRUE) .'</pre>'); // Remove or change links from group details block. $links['invite'] = 'Blablabla'; unset ($links['subscribers']); unset ($links['manager']); //unset ($links['my_membership']); }
Good luck,
Hans
2009/2/1 A-NO-NE Music madflute@anonemusic.com
Drupal 6.8
I am having a difficulty controlling OG Details Block.
- I need to show OG Details Block shown to all the pages even the page
is not OG content.
- I need to control the OG Detail Block items, i.e., I don't want to
show the member list link.
Any help would be appreciated.
--
- Hiro
Hiroaki Honshuku, A-NO-NE Music, Greater Boston http://a-no-ne.com http://anonemusic.com
-- [ Drupal support list | http://lists.drupal.org/ ]
Thank you so much for your response. Since I saw this post, I opened the Drupal Dev book but this is beyond my head. I guess I need to study PHP first. The code example below, I assume I need to know all the variable names, but I couldn't figure them out from the book.
When you said 'put inside', what inside?
--- Hiro
Hiroaki Honshuku, A-NO-NE Music, Greater Boston http://a-no-ne.com http://anonemusic.com
On 09/02/01(日), at 17:35, KOBA | Hans Rossel wrote:
To control the OG Detail Block items: make a small module (so just a .info and .module file, give it whatever name you like, I called it modulename in the example) and put inside:
The following code has some commented out code, the drupal_set_message code gives you the names of all the $links so you know which ones to remove or change, then I changed the invite link text to blablabla and removed the subscribers and manger link.
/**
- Implementation of hook_og_link_alter().
*/ function modulename_og_links_alter(&$links, $group_node) { //drupal_set_message('<pre>'. var_export($group_node,TRUE) .'</pre>'); //drupal_set_message('<pre>'. var_export($links,TRUE) .'</pre>'); // Remove or change links from group details block. $links['invite'] = 'Blablabla'; unset ($links['subscribers']); unset ($links['manager']); //unset ($links['my_membership']); }
Good luck,
Hans
2009/2/1 A-NO-NE Music madflute@anonemusic.com Drupal 6.8
I am having a difficulty controlling OG Details Block.
- I need to show OG Details Block shown to all the pages even the page
is not OG content.
- I need to control the OG Detail Block items, i.e., I don't want to
show the member list link.
Any help would be appreciated.
--
- Hiro
Hiroaki Honshuku, A-NO-NE Music, Greater Boston http://a-no-ne.com http://anonemusic.com
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Hans Rossel KOBA Webdevelopment Kerkstraat 228 9050 Gent 09-334.52.60 0472-79.32.16 www.koba.be info@koba.be -- [ Drupal support list | http://lists.drupal.org/ ]