2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00
fhem-mirror/fhem/webfrontend/pgm2/98_weblink.pm
rudolfkoenig 54d422e956 WebPgm2 gnuplot scrolling
git-svn-id: https://svn.fhem.de/fhem/trunk@198 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2008-06-12 07:22:59 +00:00

36 lines
691 B
Perl
Executable File

##############################################
package main;
use strict;
use warnings;
#####################################
sub
weblink_Initialize($)
{
my ($hash) = @_;
$hash->{DefFn} = "weblink_Define";
$hash->{AttrList}= "fixedrange noscroll";
}
#####################################
sub
weblink_Define($$)
{
my ($hash, $def) = @_;
my ($type, $name, $wltype, $link) = split("[ \t]+", $def, 4);
my %thash = ( link=>1, fileplot=>1 );
if(!$link || !$thash{$wltype}) {
return "Usage: define <name> weblink [" . join("|",sort keys %thash) . "] <httplink>";
}
$hash->{WLTYPE} = $wltype;
$hash->{LINK} = $link;
$hash->{STATE} = "initial";
return undef;
}
1;