In table views there is currently no way to have a column that shows the full url as a link. The attached patch adds such a formatter.

Comments

quicksketch’s picture

Status: Active » Fixed

Not sure why this issue wasn't ever closed, link module has supported "Plain, as text URL" since 2.0.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

mlncn’s picture

StatusFileSize
new14.79 KB
  1. If you look at the patch, the author's intention is to have a linked URL, which is not yet an option (see image)
  2. The output is not truly plain, in any case. New issue opened: http://drupal.org/node/233304
gugrim’s picture

StatusFileSize
new914 bytes

After upgrading to version 5.x-2.1 I found that this feature is still not available. Since I really need it I had to add my changes to the latest version. A new patch is attached.

gugrim’s picture

Version: 5.x-1.5 » 5.x-2.1
Status: Closed (fixed) » Active

Changing version and status.

gugrim’s picture

StatusFileSize
new914 bytes

Not sure why my comment and updated patch isn't shown. Trying again:

After upgrading to version 5.x-2.1 I found that this feature is still not available. Since I really need it I had to add my changes to the latest version. A new patch is attached.

quicksketch’s picture

Ah, maybe a more appropriate label for the formatter would be "URL, as link" then? "Plain" indicates plain text, with no HTML.

gugrim’s picture

Absolutely, much better!

sun’s picture

Status: Active » Needs review
StatusFileSize
new761 bytes

+1 for replacing check_plain() in "plain" with

l(check_plain($item['url']), check_url($item['url']));

I doubt that the current plain formatter is of any use for anyone. If someone needs such an useless formatter, then it can be implemented in a custom module.

smk-ka’s picture

StatusFileSize
new748 bytes

@sun:
l() already passes the $text to check_plain(). Thus, your code should be similar to

l($item['url'], check_url($item['url']));

Updated patch attached.

quicksketch’s picture

Breaking the current plain formatter is not a good option. I'm the one getting support requests ;)

The current plain formatter is quite helpful in many situations where you're parsing data and just want URLs, no wrapping tags.

quicksketch’s picture

Title: Add field formatter 'Plain, as link'. » Add field formatter 'URL, as link'.
Status: Needs review » Fixed

I renamed to "URL, as link" and ported a version for use in 6 as well. It'll be included in 2.2.

D5: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/link/link.mod...
D6: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/link/link.mod...

Anonymous’s picture

Status: Fixed » Closed (fixed)

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