To change the char limit of 128 for links to 256 you need to change the following:

Replace

$form['url'] = array('#type' => 'textfield', '#title' => t('URL'), '#required' => TRUE, '#default_value' => $node->url ? $node->url

with

$form['url'] = array('#type' => 'textfield', '#maxlength' => 256, '#title' => t('URL'), '#required' => TRUE, '#default_value' => $node->url ? $node->url

Make sure that the database field allows 256 chars too.

Comments

nancydru’s picture

Status: Needs review » Needs work

URLs can be much longer than 256. IE doesn't even complain until they get to 2032.

marcp’s picture

Do folks have an opinion on what the length should be?

The direction that all of these modules should be heading is towards providing a CCK node type that [probably] uses the Link field type. I think that module is providing a 255 char field -- can anyone confirm?

My long term vision for userlink is to make it go away and/or be as small as possible to leverage other modules.

nancydru’s picture

funana’s picture

Thx for the link!

Yes, full ack generally. I was surprised to find out that is was limited to 128.
In our case 256 seem to fit, but you may want to use more.
It would be nice to know some statistics about URL length "in the wild".

@marcp: Yeah, the code needs some love. It would be very nice if you would continue this project. My php knowledge is very small, but I will definitely try to support you. I'll send you a msg.

pomliane’s picture

Status: Needs work » Closed (won't fix)

This version of userlink is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.