Ignore:
Timestamp:
Apr 15, 2010, 6:45:17 AM (15 years ago)
Author:
george
Message:
  • Upraveno: V shoutboxu převádět textové html odkazy na aktivní.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global_function.php

    r462 r465  
    557557}
    558558
     559function MakeActiveLinks($Content)
     560{
     561  $Result = ''; 
     562  $I = 0;
     563  while(strpos($Content, 'http://') !== false)
     564  {
     565    $I = strpos($Content, 'http://');
     566    $Result .= substr($Content, 0, $I);
     567    $Content = substr($Content, $I);
     568    if(strpos($Content, ' ') !== false)
     569      $URL = substr($Content, 0, strpos($Content, ' '));
     570      else $URL = substr($Content, 0);
     571    $Result .= '<a href="'.$URL.'">'.$URL.'</a>';
     572    $Content = substr($Content, strlen($URL));
     573  }
     574  $Result .= $Content;
     575  return($Result);
     576}
     577
    559578?>
Note: See TracChangeset for help on using the changeset viewer.