I am not sure this is 100% solved. Indeed if I enter a link, complete with <a> tag and href if will work, but if I only enter link.com nothing happens.
Can you have a look how this could be made compatible i.e. with autohyperlink urls plugin or any other plugin?
I guess tehre are not many visitors, who will know by heart how to write a hyperlink properly…
Vladimir’s WordPress Forum
links too long
17:34
14 August, 2008
Soop
Hi Vladimir. Thank you very much for a great addon. Wall is fab.
However, when we post a URL in the Wall, the long URLs mess up the Wall and a horizontal scroll is shown.
Is there a way to auto parse these URLs to show "link" when someone adds a URL? It would make the Wall look SO much nicer.
Thanks again.
Soop
19:24
14 August, 2008
Soop
I have found an add-on called wp-chunk that shortens links in comments.
However, while this works for comments, it does not run on the wp-wall comments.
Is there a way thaat I can use the wp-chunk add_filter option to change the wp-wall text for links too?
7:59
15 August, 2008
Ovidiu
I tried somethign similar with a plugin from coffeee2code called autohyperlink urls but it doesn't work in wp wall either :-(
10:11
15 August, 2008
Vladimir
posts 707
This will be the first thing I will attend to, I promise!
20:40
16 August, 2008
Soop
Thanks Vladimir.
If it helps, I used to use wordspew and they do it in their shout box. Just in case you need some inspiration ;)
23:01
20 August, 2008
Vladimir
posts 707
Solution now exists in version 1.0.
10:38
21 August, 2008
Ovidiu
I am not sure this is 100% solved. Indeed if I enter a link, complete with <a> tag and href if will work, but if I only enter link.com nothing happens.
Can you have a look how this could be made compatible i.e. with autohyperlink urls plugin or any other plugin?
I guess tehre are not many visitors, who will know by heart how to write a hyperlink properly…
11:11
21 August, 2008
Vladimir
posts 707
It needs to have www before to recognize it is actually a link. Eh. :)
12:16
21 August, 2008
Ovidiu
thx, thats just fine then, I was so used to skip over the www part that I never tried with www.
but shouldn't it auto link if I just pasted a link like http://couchsurfing.com into the wp wall? I just tried in your wp wall and it doesn't work…
12:30
21 August, 2008
Vladimir
posts 707
I have disabled HTML on my wall as I dont want someone to write <h1>SPAM</h1>
12:56
21 August, 2008
Ovidiu
sorry, indeed it works now on my own wall.
do you happen to know why plugins like the one I mentioned, autohyperlink urls do not pick up comments in the wall? I can still post huge links.
12:20
22 August, 2008
Soop
Thanks VERY much for adding that Vladimir.
If it helps anyone else, I like the links to be shortened so if someone enters a long link, it doesnt skew the page.
So, I edited wp-wall.php and changed lines 305 & 306 from:
$ret = preg_replace("#(^|[\\n ])((www|ftp)\\.[\\w\\#$%&~/.\\-:=?@\\[\\]+]*)#is", "\\\\1<a href=\\"http://\\\\2\\">\\\\2</a>", $ret);
to:
$ret = preg_replace("#(^|[\\n ])((www|ftp)\\.[\\w\\#$%&~/.\\-:=?@\\[\\]+]*)#is", "\\\\1<a href=\\"http://\\\\2\\">«clicky»</a>", $ret);
Now, when a user adds a link, the whole link is shown as "<clicky>" instead of http://….
Hope you dont mind mne adding this here Vladimir.