@@ -30,10 +30,10 @@ public function init($host) {
30
30
return ;
31
31
}
32
32
33
- $ host ->add_hook ($ host ::HOOK_ARTICLE_FILTER , $ this );
33
+ $ host ->add_hook ($ host ::HOOK_ARTICLE_FILTER , $ this );
34
34
$ host ->add_hook ($ host ::HOOK_PREFS_EDIT_FEED , $ this );
35
35
$ host ->add_hook ($ host ::HOOK_PREFS_SAVE_FEED , $ this );
36
- $ host ->add_hook ($ host ::HOOK_PREFS_TAB , $ this );
36
+ $ host ->add_hook ($ host ::HOOK_PREFS_TAB , $ this );
37
37
38
38
$ host ->add_filter_action ($ this , "ntfy " , __ ("Send Notification " ));
39
39
}
@@ -54,6 +54,7 @@ public function hook_prefs_tab($args) {
54
54
<h2> <?= __ ('Send feed notification via Ntfy ' ) ?> </h2>
55
55
56
56
<form dojoType="dijit.form.Form">
57
+ <?= \Controls \pluginhandler_tags ($ this , "save " ) ?>
57
58
<script type="dojo/method" event="onSubmit" args="evt">
58
59
evt.preventDefault();
59
60
if (this.validate()) {
@@ -66,20 +67,20 @@ public function hook_prefs_tab($args) {
66
67
67
68
<div class="alert alert-info"><?= __ ("You can enable notification for specific feeds in the feed editor " ) ?> </div>
68
69
<input dojoType="dijit.form.ValidationTextBox" required="1" name="ntfy_server" value="<?= $ ntfy_server ?> "/>
69
- <label for="ntfy_server"><?= __ ("Your Ntfy server, including IP and port, e.g. http://ntfy.lan:8007 " ) ?> </label>
70
+ <label for="ntfy_server"><?= __ ("Your Ntfy server, including IP and port, e.g. http://ntfy.lan:8007. Alternatively, you can use the public server at https://ntfy.sh. " ) ?> </label>
70
71
<br/>
71
72
<input dojoType="dijit.form.ValidationTextBox" required="1" name="ntfy_topic" value="<?= $ ntfy_topic ?> "/>
72
73
<label for="ntfy_topic"><?= __ ("Your Ntfy topic, e.g. tt-rss " ) ?> </label>
73
74
<br/>
74
- <input dojoType="dijit.form.ValidationTextBox" required="1" name="ntfy_token" value="<?= $ ntfy_token ?> "/>
75
- <label for="ntfy_token"><?= __ ("Your Ntfy authentication token. Set it if you have enabled it " ) ?> </label>
75
+ <input dojoType="dijit.form.ValidationTextBox" name="ntfy_token" value="<?= $ ntfy_token ?> "/>
76
+ <label for="ntfy_token"><?= __ ("Your Ntfy authentication token. Set it if authentication is enabled. " ) ?> </label>
76
77
<br/>
77
78
78
79
<?= \Controls \submit_tag (__ ("Save " )) ?>
79
80
80
81
</form>
81
82
<hr />
82
- <?php
83
+ <?php
83
84
84
85
$ enabled_feeds = $ this ->host ->get_array ($ this , "enabled_feeds " );
85
86
$ enabled_feeds = $ this ->filter_unknown_feeds ($ enabled_feeds );
@@ -200,9 +201,9 @@ public function api_version() {
200
201
}
201
202
202
203
private function clean_html ($ html ) {
203
- $ html = str_replace (array ('<br> ' , '<br/> ' , '<br /> ' ), "\n" , $ html );
204
- $ cleaned_html = strip_tags ($ html );
205
- return $ cleaned_html ;
204
+ $ html = str_replace (array ('<br> ' , '<br/> ' , '<br /> ' ), "\n" , $ html );
205
+ $ cleaned_html = strip_tags ($ html );
206
+ return $ cleaned_html ;
206
207
}
207
208
208
209
private function filter_unknown_feeds ($ enabled_feeds ) {
0 commit comments