| Kwiki-DMOZLink documentation | Contained in the Kwiki-DMOZLink distribution. |
Kwiki::DMOZLink - Create a link to DMOZ.org from your Kwiki
Version 0.01
Creates a link to search DMOZ.org for the term.
For example:
Search DMOZ for: (dmoz:Kwiki)
Steve Peters, <steve@fisharerojo.org>
Michael Gray's useful Kwiki::GoogleLink gave me much of the inspiration (and
code) for this module. See http://www.kwiki.org/index.cgi?KwikiGoogleLinkPlugin
This needs more tests for me to feel really comfortable with.
Please report any bugs or feature requests to
bug-kwiki-dmozlink@rt.cpan.org, or through the web interface at
http://rt.cpan.org. I will be notified, and then you'll automatically
be notified of progress on your bug as I make changes.
Copyright 2004 Steve Peters, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Kwiki-DMOZLink documentation | Contained in the Kwiki-DMOZLink distribution. |
package Kwiki::DMOZLink; use warnings; use strict; use Kwiki::Plugin '-Base'; our $VERSION = 0.01; const class_title => 'DMOZ Search Link'; const class_id => 'dmoz_link'; sub register { my $registry = shift; $registry->add(wafl => dmoz => 'Kwiki::DMOZLink::Wafl'); } package Kwiki::DMOZLink::Wafl; use Spoon::Formatter; use base qw(Spoon::Formatter::WaflPhrase); const dmoz_search => 'http://search.dmoz.org/cgi-bin/search?search='; sub html { my $search = $self->arguments; join('', '<a href="', $self->dmoz_search, $self->uri_escape($search), '">', $self->html_escape($search), '</a>' ); } 1;