Closed (fixed)
Project:
Organic Groups
Version:
6.x-1.1
Component:
Og Views
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2009 at 09:06 UTC
Updated:
4 Mar 2011 at 19:20 UTC
How do I disable the opml link and icon seen on the My Groups tab?
Comments
Comment #1
zd370 commentedHi
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
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.
Comment #2
amitaibuYou can delete it from inside the View itself (i.e. edit the OG view).
Comment #3
zd370 commentedyou 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..
Comment #4
zd370 commentedComment #5
zd370 commentedoops.. sorry selected wrong status
Comment #6
askibinski commentedIf 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.
Comment #7
ron collins commentedyou can hide it by adding this to your theme's style.css:
.opml-icon {
display:none;
}
Comment #8
Plazmus commentedI 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.
Comment #9
scottrigbyCommenting out OG code is not ideal.
Hiding with CSS is not so nice.
@Plazmus -- this is a nice & quick workable solution :)
Comment #10
TechnoBuddhist commentedThx 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.
Comment #11
Plazmus commentedYou posted space so we can't see the result ;)
That should be:
Glad that I could help :)
Comment #12
TechnoBuddhist commentedDOH!!! Thx!
Comment #13
highvoltage commentedJust out of curiosity... Why is that there in the first place, let alone hard coded?
Comment #14
alextronic commentedhttp://drupal.org/node/371027#comment-1278082
Comment #15
petednz commentedcertainly 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
Comment #16
alextronic commentedwell 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'Comment #17
aleada commentedMy solution was to add a custom footer using php input filter ....
So the code inside the if does not executed .... ;)
if (!$view->display_handler->get_option('footer')) {
$view->attachment_after = theme('opml_icon', url('community/opml'));
}
It is not very nice practice to change the modules code even the hardcoded parts....
Comment #18
mrgavindb commentedNice fix Plazmus. Very quick and easy.
Comment #19
joelstein commentedThe best solution I've found is to override theme_opml_icon() in your theme's template.php file:
No hacks, no weird Views work-arounds, no CSS, and no empty tags.
Comment #21
kevstev01 commentedI've been using Artisteer to generate my theme, and appended the [mytheme]_opml_icon($url) function to the generated template.php file but it's not being called (though the theme is enabled and working). I have created a development site and added logging into the og module, but can't seem to trace the call stack.
I have used the "footer" fudge by adding an HTML "more" link in the block content (I'm happy for the opml icon to appear on the page output, so this is good enough for now) but the purist in me wants a "proper" fix :o) Anyone able to help please?
(Drupal 6 installation)
Comment #22
zd370 commented@#21, kevstev01
did you clear your cache?
Comment #23
kevstev01 commentedDoh! Thanks chintu84 - although I have caching disabled on my dev site, so I'm still a little confused, but it's all working now and my yin and yang are back in alignment again ;-)
Comment #24
zd370 commentedIn Drupal 6 & 7, your theme functions are cached, so each time you add/remove a function from your template files, you have to clear your cache.