Thanks for this, Florian, but I'm having one problem with it - it doesn't seem to get rid of punctuation. So if the update is:
@florian What links to #habari? What about http://habariproject.org? the links have the question marks in them. --mikelietz On Feb 12, 9:12 am, Florian Fiegel <[email protected]> wrote: > Hi out there, > > I am not so firm to the things of the repo/svn/trac, just learning to > work with it. When working on a page we made up the Linkify of the > Twitter-Plugin and fixed it. > > Here is the Snippet that someone should work into the code: > > // replace urls with links > $tweet->text = preg_replace("/(http:\/\/\S*)/", "<a href=\"$1\">$1</ > a>", $tweet->text); > // link twitter usernames > $tweet->text = preg_replace("/(@(\S*))/", "<a href=\"http:// > twitter.com/$2\">$1</a>", $tweet->text); > // link to hash tags (maaaan are web 2.0 or w00t?!) > $tweet->text = preg_replace("/(#(\S*))/", "<a href=\"http:// > hashtags.org/search?query=$2&submit=Search\">$1</a>", $tweet->text); > > regards > Florian --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/habari-dev -~----------~----~----~----~------~----~------~--~---
