Event Module: iCalendar: How do I make icon go away in "upcoming events" block?

iambill - August 30, 2005 - 23:12

The icon leads to an error. I don't want or need it. The single group calendar is sufficient for my needs.

Thanks for the help.

iambill - August 31, 2005 - 15:25

I need to find a way to make the icon go away, or fix the redirect.

css

sepeck - August 31, 2005 - 17:18

I found the css that displayed it and added
display: none

and that made it go away visually at least.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mount

Concrete Removal

Fool2 - September 2, 2005 - 18:56

What I did was first in event.theme I searched for ical and found a block of code that formats the link. I got rid of it, and the thing went away.

You can also remove the CSS entry for it to save a few extra bytes of bandwidth

switch

sepeck - September 2, 2005 - 19:24

I was to lazy to do that. I think a switch to turn it on or off would be more useful. Lots of us don't use iCal. In any case, it's on my list of figure out and submit a patch to do someday in the nebulous future if it becomes actually annoying.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

ical will import into

LateNightDesigner - September 2, 2005 - 19:33

ical will import into outlook and the mozilla calendar. These are the only ones I've tested though. Just fyi :-)

assumes

sepeck - September 2, 2005 - 20:41

that I am remotely interested in the Mozilla calander. :P
In any case, if I actually want a switch then it is my responsibility to submit a patch. 'Till then css display: none is sufficient fo rthe lazy.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

Outlook

gtoddv - November 1, 2005 - 15:44

How did you get it to import to Outlook?

Thanks

Where is the code in the css?

michalska - October 6, 2005 - 21:16

If you can be more specific...

find

Fool2 - October 12, 2005 - 17:50

Find is a wonderful function in text editors. Look for ical.

+1 on ability to turn it off

DaveNotik - December 20, 2005 - 19:51

Came across this myself with latest cvs of Event module.

Would love ability to turn off, but editing manually works for now.

I will also try and allocate some time to figuring out a patch for it, but I still have yet to submit my first patch so don't count on it.

Oh, and a better way of removing the iCal icon without editing the module or any CSS... just rewrite the function in your theme!

In template.php (using PHPtemplate engine), you can do this:

<?php
function mytheme_event_ical_link($path) {
//  $ical_link = '<div class="ical-link">'. l('<img src="/'. drupal_get_path('module', 'event') .'/images/ical16x16.gif" alt="'.t('Add to iCalendar').'" />', $path, array('title' => t('Add this calendar to your iCalendar')), NULL, NULL, TRUE, TRUE) .'</div>';
//  return preg_replace("|http://|","webcal://", $ical_link);
}
?>

(Replace "mytheme" with the name of your theme.)

That essentially rewrites the function to nothing by commenting out its code (you can also just remove the code versus commenting it).

HTH,

--D

 
 

Drupal is a registered trademark of Dries Buytaert.