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
Description

How do I disable the opml link and icon seen on the My Groups tab?

#1

chintu84 - March 13, 2009 - 23:48

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

Amitaibu - March 16, 2009 - 15:09
Status:active» fixed

You can delete it from inside the View itself (i.e. edit the OG view).

#3

chintu84 - March 17, 2009 - 01:54

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

chintu84 - March 17, 2009 - 01:57
Status:fixed» postponed (maintainer needs more info)

#5

chintu84 - March 18, 2009 - 18:02
Status:postponed (maintainer needs more info)» active

oops.. sorry selected wrong status

#6

askibinski - April 28, 2009 - 13:28

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

peggys mouse - April 28, 2009 - 17:48

you can hide it by adding this to your theme's style.css:

.opml-icon {
display:none;
}

#8

Plazmus - April 28, 2009 - 18:26

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

scottrigby - April 30, 2009 - 20:30

Commenting out OG code is not ideal.

Hiding with CSS is not so nice.

@Plazmus -- this is a nice & quick workable solution :)

#10

TechnoBuddhist - June 30, 2009 - 12:27

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

Plazmus - June 30, 2009 - 18:25

You posted space so we can't see the result ;)

That should be:

<p>&nbsp;</p>

Glad that I could help :)

#12

TechnoBuddhist - July 3, 2009 - 06:14

DOH!!! Thx!

#13

highvoltage - July 4, 2009 - 15:01

Just out of curiosity... Why is that there in the first place, let alone hard coded?

#14

alextronic - August 19, 2009 - 20:46

#15

peted - September 26, 2009 - 11:12

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

alextronic - September 26, 2009 - 18:48

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'

 
 

Drupal is a registered trademark of Dries Buytaert.