This works well with GoogleGroups Beta service. This helps make links to GoogleGroups with text remotely extracted from usenet topic. {{{ * All rights reserved. Distributable under GPL. * * $Id: UsenetMacro,v 1.13 2005/02/05 03:23:51 root Exp root $ */ function macro_Usenet($formatter, $value) { global $DBInfo; list($group, $thread) = @explode(':', $value); $img = sprintf('GoogleGroups:', $DBInfo->imgs_dir); if ($group == 'http') { $url = $value; } else { $url = 'http://groups-beta.google.com/group/'.$group; if (preg_match('/[[:xdigit:]]+/', $thread)) $url .= '/browse_thread/thread/'.$thread; else $subj = $group; } if (!$subj) { $purl = parse_url($url); $fp = @fsockopen($purl['host'], 80, $errno, $errstr, 5); $out = "GET {$purl['path']} HTTP/1.0\nHost: {$purl['host']}\n\n"; @fwrite($fp, $out); $buf = @fgets($fp, 80); if (!preg_match('@200 OK@i', $buf)) return ' URL is not found '; while (strlen($buf) <= 25000) { $_ = @fread($fp, 1024); $buf .= $_; if (strlen($_) < 1024) break; } fclose($fp); $seek = strpos($buf, 'Subject: ') + 20; $offset = strpos($buf, '', $seek); $subj = substr($buf, $seek, $offset-$seek); if (!$subj) $subj = $group; } return sprintf('%s%s', $img, $url, $subj); } ?> }}} Write like this, {{{ [[Usenet(comp.lang.python)]] [[Usenet(comp.lang.python:fec2ae850574adf4)]] [[Usenet(http://groups-beta.google.com/group/comp.unix.programmer/browse_thread/thread/d302919d5af2b802)]] }}} then it will be displayed like... [[Usenet(comp.lang.python)]] [[Usenet(comp.lang.python:fec2ae850574adf4)]] [[Usenet(http://groups-beta.google.com/group/comp.unix.programmer/browse_thread/thread/d302919d5af2b802)]] [http://nohmad.sub-port.net/wiki/CodingLog/2003-09]