[Home]WikiPatches/AIMlinks

UseModWiki | WikiPatches | RecentChanges | Preferences

Title: AIM Links
Supported Version: 0.92
Purpose: Used to make AIM links possible
Use: AIM screenname
Known Issues: screennames must be all lowercase and one word otherwise value will be wikified.

Author: Lee Isensee 2005-06-27

----

@@ -45,7 +45,7 @@
   $UrlProtocols $UrlPattern $ImageExtensions $RFCPattern $ISBNPattern
   $FS $FS1 $FS2 $FS3 $CookieName $SiteBase $StyleSheet $NotFoundPg
   $FooterNote $EditNote $MaxPost $NewText $NotifyDefault $HttpCharset
-  $UserGotoBar);
+  $UserGotoBar $AIMPattern);
 # Note: $NotifyDefault is kept because it was a config variable in 0.90
 # Other global variables:
 use vars qw(%Page %Section %Text %InterSite %SaveUrl %SaveNumUrl
@@ -235,6 +235,7 @@
   $ImageExtensions = "(gif|jpg|png|bmp|jpeg)";
   $RFCPattern = "RFC\\s?(\\d+)";
   $ISBNPattern = "ISBN:?([0-9- xX]{10,})";
+  $AIMPattern = "AIM\\s?(\\w+)";
 }

 # Simple HTML cache
@@ -1223,6 +1224,7 @@
     }
     s/$RFCPattern/&StoreRFC($1)/geo;
     s/$ISBNPattern/&StoreISBN($1)/geo;
+    s/$AIMPattern/&StoreAIM($1)/geo;
     if ($ThinLine) {
       s/----+/<hr noshade size=1>/g;
       s/====+/<hr noshade size=2>/g;
@@ -1493,6 +1495,19 @@
   return $html;
 }

+sub StoreAIM {
+  my ($aim) = @_;
+
+  return &StoreRaw(&AIMLink($aim));
+}
+
+sub AIMLink {
+  my ($aim) = @_;
+
+  return "<a href=\"aim:goim?screenname=${aim}\">$aim</a>";
+}
+
+
 sub SplitUrlPunct {
   my ($url) = @_;
   my ($punct);


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited June 27, 2005 5:20 pm by in.sane.com (diff)
Search: