Like I was impressed by ’s clever decision to differentiate outgoing and internal links with colour using CSS.
Mark posted a MT macro that takes care of this automatically in Perl. Here’s a PHP function that does the same. All that’s needed is:
-
$text: some text to be scanned for links
-
$outclass: the CSS class created for outgoing links
-
$imgurl: optional image, i.e., "/images/globe.gif"
The function:
Example usage:
* * *
← Patriotism |
Home
| Canal Moins →
San Diego
Las Vegas
Cancun
Bar Harbor
Lake Buena Vista
Myrtle Beach
Chicago
Lake George
Taneytown
Williamsburg
New York
Sea Bright
Santa Paula
Miramar Beach
Athens
Washington
Palm Beach
Garden Grove
Adairsville
Negril
Jackson
Jensen Beach
Omaha
Atlanta
Tokyo
Rosemont
Dallas
Hawley
Cocoa Beach
Antwerp
New Braunfels
Xpu Ha
Boston
Los Angeles
Fort Myers Beach
Asheville
Eau Claire
Pittsburgh
Jersey City
Key Largo
Waukesha
Ocean City