Sometimes i`m posting long urls and when i`m using "show weblinks like url", my site stretchs and beats itself design.
So, will it be powerful to crop links if they are longer than 36 characters?
In such way for example:
http://www.somethingveryspec...

p.s.
why i`m not using "show weblinks by title or a word "visit""? My site almost on 95% consists of weblinks, and visitors has voted for "url" link instead of "title" link.

Thanks in advance.

Comments

arsart’s picture

Component: Code » User interface
Assigned: Unassigned » arsart
Category: feature » task

ok. If anybody is interesting with such feature we have done it (thanx to www.Drupal.RU user Basielienis)
Her it is/ You can change 83 line with this code (In "//Node links for a weblink"):

$trlink = substr($linktext,0,20);
$links[] = l("{$trlink}...", "weblink/goto/$node->nid", _weblink_attributes($node)) ." ({$node->click})";

And your very-very long urls will be cropped and shows only 20 symbols with "..."
Like this:
http://somethingspec...

NB!
It`s a minority feature.
Only for those who chose "show weblinks as url" in weblink.module settings.
Because this feature will crop "show weblinks as a title" too!

Bèr Kessels’s picture

we should add a themable function that handles this.

Bèr Kessels’s picture

Project: Weblink » Links Package
Version: » master
syscrusher’s picture

Title: croping urls (?) » cropping urls (?)
Status: Active » Fixed

The new Links Package for Drupal 4.7 already does this. :-)

Syscrusher

Anonymous’s picture

Status: Fixed » Closed (fixed)