Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you want to let users have an unlimited list of links, rather than creating many link fields, just use a free-form list field and use this code in your user-profile.tpl.php.
<?php
$links = explode("\n", trim(_filter_url(str_replace(',', "\n",$account->profile_yourlinksfieldname), 1)));
print theme('item_list', $links);
?>
This snippet lets you use commas and/or line breaks to separate the links. It will shorten the url to the length set in the filter format you choose. In this case, the 1 in the first line tells _filter_url() to use the default format.
The second line themes the links as a list.
This also works for ftp, mailto, file, etc. as specified in _filter_url().