From dda0b2e89c96e54d3a82149d5c3b276432f9e971 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 11 Nov 2015 18:25:40 +0000 Subject: [PATCH] 98_weblink.pm: add disable attributes (Forum #43857) git-svn-id: https://svn.fhem.de/fhem/trunk@9861 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_weblink.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_weblink.pm b/fhem/FHEM/98_weblink.pm index 7d163009f..5f690f356 100755 --- a/fhem/FHEM/98_weblink.pm +++ b/fhem/FHEM/98_weblink.pm @@ -14,7 +14,8 @@ weblink_Initialize($) my ($hash) = @_; $hash->{DefFn} = "weblink_Define"; - $hash->{AttrList} = "htmlattr nodetaillink:1,0"; + $hash->{AttrList} = + "disable:0,1 disabledForIntervals htmlattr nodetaillink:1,0"; $hash->{FW_summaryFn} = "weblink_FwFn"; $hash->{FW_detailFn} = "weblink_FwFn"; $hash->{FW_atPageEnd} = 1; @@ -90,6 +91,7 @@ weblink_FwFn($$$$) my $wltype = $hash->{WLTYPE}; my $ret = ""; + return "" if(IsDisabled($d)); my $attr = AttrVal($d, "htmlattr", ""); if($wltype eq "htmlCode") { $link = AnalyzePerlCommand(undef, $link) if($link =~ m/^{(.*)}$/s); @@ -186,7 +188,7 @@ weblink_FwFn($$$$) E.g.:
@@ -195,6 +197,9 @@ weblink_FwFn($$$$)
  • nodetaillink
    Show no detail link for the types image and iframe.
  • + +
  • disable
  • +
  • disabledForIntervals