Vladimir’s WordPress Forum


 
Current User: Guest
Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

links too long

Add a New Topic Reply to Post
UserPost

17:34
14 August, 2008


Soop

Guest

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

Guest

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

Guest

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

Admin

posts 707

This will be the first thing I will attend to, I promise!

20:40
16 August, 2008


Soop

Guest

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

Admin

posts 707

Solution now exists in version 1.0.

10:38
21 August, 2008


Ovidiu

Guest

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

Admin

posts 707

It needs to have www before to recognize it is actually a link. Eh. :)

12:16
21 August, 2008


Ovidiu

Guest

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

Admin

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

Guest

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

Guest

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 ])([\\w]+?://[\\w\\#$%&~/.\\-:=?@\\[\\]+]*)#is", "\\\\1<a href=\\"\\\\2\\">\\\\2</a>", $ret);
$ret = preg_replace("#(^|[\\n ])((www|ftp)\\.[\\w\\#$%&~/.\\-:=?@\\[\\]+]*)#is", "\\\\1<a href=\\"http://\\\\2\\">\\\\2</a>", $ret);

to:

$ret = preg_replace("#(^|[\\n ])([\\w]+?://[\\w\\#$%&~/.\\-:=?@\\[\\]+]*)#is", "\\\\1<a href=\\"\\\\2\\">&laquo;clicky&raquo;</a>", $ret);
$ret = preg_replace("#(^|[\\n ])((www|ftp)\\.[\\w\\#$%&~/.\\-:=?@\\[\\]+]*)#is", "\\\\1<a href=\\"http://\\\\2\\">&laquo;clicky&raquo;</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.

Reply to Post

Reply to Topic:
links too long

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
12 + 6