is it possible to get a mailto link using email field formatter?

CommentFileSizeAuthor
#5 mailto_no_tabs.patch1.43 KBvinmassaro
#3 mailto.patch1.42 KBvinmassaro
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marvil07’s picture

Title: mailto link on email field formatter? » mailto link on email field formatter
Category: support » feature

well, it seems like it could be a feature request.

It's kind of duplicate functionality I've seen on gtspam(take a look at its demo)

If maintainers are ok, I could start working on a patch based on that module functionality.

Crell’s picture

Version: 6.x-1.2 » 7.x-1.x-dev

I'd consider such a patch, after the Drupal 7 port is completed.

vinmassaro’s picture

FileSize
1.42 KB

I just created a quick Drupal 6 patch for this because I needed this functionality. Can someone review and make this better? I think there is probably a way to use one theme function with a condition inside to handle both the unlinked and linked options. Thanks in advance.

Crell’s picture

Status: Active » Needs work

Well first off it looks like you've got some tabs in your file. Please fix those first. :-)

vinmassaro’s picture

FileSize
1.43 KB

Sorry about that - new patch attached.

Crell’s picture

Two problems with #5:

1) It's a Drupal 6 patch, and this thread is marked for Drupal 7. :-) I'm not accepting new features for D6 at this point, just D7, unless a thread provides both. D7 is the focus.

2) I don't see a reason for the theme function to check if invisimail is enabled. If it's not enabled then the formatter won't exist anyway, including that theme function, so that code couldn't be called in the first place.

Sorry I didn't notice those earlier. My brain saw the tabs and stopped parsing. :-) (Also, remember to set the status to "needs review" if you submit a new patch so people know it needs reviewing.)

vinmassaro’s picture

I just copied what was there already and modified it to add the mailto, so the business of checking if invisimail is enabled was already part of the D6 module. I think this is a useful feature (I was surprised when I couldn't output an email link using the included formatters?) and if I can get some help cleaning up the patch for D6, I'd be more than happy to get one rolling for the D7 version.

pvhee’s picture

Seems to be integrated in 7.x now.

marvil07’s picture

Status: Needs work » Fixed

As mentioned, this is now a feature added to current 7.x-1.x branch, marking accordingly.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.