Closed (cannot reproduce)
Project:
Link
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2009 at 22:19 UTC
Updated:
1 Sep 2024 at 16:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jmarkantes commentedYou can override the link theme. This is the original theme function for the basic "url" link:
I put this function within my theme's template.php file:
replacing THEMENAME with your theme's name.
Good luck,
Jason
Comment #2
mjpg commentedThanks very much for this - it set me on the right path. In the end I used the following because of the way I have my title and url (static title set to [field_website-url]) set up and to allow for https urls:
Comment #3
summit commentedBookmarking, seems the way to go! Greetings, Martijn
Comment #4
eL commentedin contemplate or tpl.php or in other php code, we can use simple and exactly what we need function:
http://php.net/manual/en/function.parse-url.php
But, Link module definitively should have this function build in and admin only choose - output only HOST name.
Comment #5
ntg commentedThank you mjpg. I was looking around for hours till I found your solution which worked perfectly for me.
Comment #6
David D commentedI am trying to achieve this with Link 7.x-1.0, and neither of the function codes above seem to do anything. Is there some change needed for this to work with D7?
Thank you!
Comment #7
Hess commentedAbsolutely not the nicest or best solution, but I needed same thing really fast.
link.module file and i changed this:
Around line 475
$item['title'] = empty($title) ? str_replace('http://', '', $item['display_url']) : $title;
Comment #8
dqdDavid D, in D7 a link stored as
'www.domain.org.uk'appears as:so I don't know what you try to achieve?
Comment #9
adam_b commentedNot in my experience with 7.x-1.0 - see attached example.
Comment #10
Sinan Erdem commentedI can confirm I have the same results with adam_b.
I am using 7.x-1.1.
Comment #11
dqdStill not sure what this issue is about. Even after 12 years. The link field has the option to take different input for title and link which can be used when link and display needs to be different. Apart from that: Link module is in Drupal core now. I'll close this issue due to inactivity for 12 years and upcoming EOL of Drupal 7 in January 2025. While the project version for Drupal 7 will keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. Thanks for the report and all the efforts in here. Feel free to re-open if you can provide a fix or found an additional related problem which increases the issue priority to "Critical" here.