This patch enables the new google tags. The codebase has been updated with this.
Add four lines to sub makelinks (adjacent the cpan lines):
Add this subroutine after sub makelinks:$content=~s/\[google:\/\/([^|\]]+)\|([^\]]+)\]/&google('G',$1,$2)/eig; + # [google://keyword(s)|text] $content=~s/\[google:\/\/([^|\]]+)\]/&google('G',$1)/eig; + # [google://keyword(s)] $content=~s/\[lucky:\/\/([^|\]]+)\|([^\]]+)\]/&google('L',$1,$2)/eig; + # [lucky://keyword(s)|text] $content=~s/\[lucky:\/\/([^|\]]+)\]/&google('L',$1)/eig; + # [lucky://keyword(s)]
sub google { # [google://] and [lucky://] my$google = 'http://www.google.com/search?q='; my$luck = '&btnI=lucky'; my($fu,$g,$n) = shift; if($fu eq 'G'){ undef($luck) } $n = CGI::escape($_[0]); if(@_ == 2){ $g = qq~<a href="$google$n$luck"$trgt>$_[1]<\/a>~; } if(@_ == 1){ $g = qq~<a href="$google$n$luck"$trgt>$_[0]<\/a>~; } return $g; }
In reply to framechat google tag patch
by epoptai
in thread framechat private messaging update
by epoptai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |