Disable OPML link
ririzarry - January 25, 2009 - 09:06
| Project: | Organic groups |
| Version: | 6.x-1.1 |
| Component: | Og Views |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
How do I disable the opml link and icon seen on the My Groups tab?

#1
Hi
You have to comment out these lines of code from the og_view.module file:
These lines should be inside the function named
og_views_views_pre_view(&$view, &$display_id, &$args)Starting at line 206
if ($view->name == 'og_my') {
if (!$view->display_handler->get_option('header')) {
$txt = t('You might be interested in an <a href="!url" rel="nofollow">OPML feed containing feeds from all your subscribed groups</a>.', array('!url' => url('community/opml')));
$view->attachment_before = $txt;
}
if (!$view->display_handler->get_option('footer')) {
$view->attachment_after = theme('opml_icon', url('community/opml'));
}
}
Ending at line 215
og_view.module file is located under og/modules/og_views
Sorry, there isn't any easier way to turn it off.
#2
You can delete it from inside the View itself (i.e. edit the OG view).
#3
you can't actually... i tried it already.. this thing is hard coded in the module..
if there is a way.. could you point out where in the views..
#4
#5
oops.. sorry selected wrong status
#6
If you clone the view the OPML icon will be gone.
But I still think it's a bad thing this is hardcoded in the module.
#7
you can hide it by adding this to your theme's style.css:
.opml-icon {
display:none;
}
#8
I found somewhere on drupal.org maybe not the best but quite easy solution.
Edit view and under 'Basic Setting' for Header and Footer insert:
<p></p>That will do the job icon will disappear.
#9
Commenting out OG code is not ideal.
Hiding with CSS is not so nice.
@Plazmus -- this is a nice & quick workable solution :)
#10
Thx Plazmus - I found I only had to change the Footer insert to make it disappear.
I also used
to be fully compatible with xhtml standards I think I remember somewhere finding out that you shouldn't have an empty block, hence the non breaking space.
#11
You posted space so we can't see the result ;)
That should be:
<p> </p>Glad that I could help :)
#12
DOH!!! Thx!
#13
Just out of curiosity... Why is that there in the first place, let alone hard coded?
#14
http://drupal.org/node/371027#comment-1278082
#15
certainly makes it disappear but also adds extra space under the block which makes it stand out. does seem odd that this isn't supplied as a 'feed display' that can then be dropped
#16
well then instead of
<p></p>you could use<span></span>, but you're right, seems odd that this isn't supplied as a 'feed display'