diff --git a/include/controls.php b/include/controls.php
index 78ff75572..4c60d94f3 100755
--- a/include/controls.php
+++ b/include/controls.php
@@ -19,6 +19,10 @@
return button_tag($value, "submit", array_merge(["class" => "alt-primary"], $attributes));
}
+ function cancel_dialog_tag(string $value, array $attributes = []) {
+ return button_tag($value, "", array_merge(["onclick" => "App.dialogOf(this).hide()"], $attributes));
+ }
+
function select_tag(string $name, $value, array $values, array $attributes = [], string $id = "") {
$attributes_str = attributes_to_string($attributes);
$dojo_type = strpos($attributes_str, "dojoType") === false ? "dojoType='fox.form.Select'" : "";
diff --git a/plugins/note/init.php b/plugins/note/init.php
index 0634d4c57..12c56f7ad 100644
--- a/plugins/note/init.php
+++ b/plugins/note/init.php
@@ -42,19 +42,18 @@ class Note extends Plugin {
print \Controls\hidden_tag("method", "setNote");
print \Controls\hidden_tag("plugin", "note");
- print "
+ ";
- print " ";
- print "";
- print "";
-
+ ?>
+
+ 0) {
- $article["content"] = "
-
".$article["content"]."
";
+ $article["content"] = "".
+ \Controls\button_tag(__("Not work safe (click to toggle)"), '', ['onclick' => 'Plugins.NSFW.toggle(this)']).
+ "
".$article["content"]."
+
";
}
return $article;
}
function hook_render_article_cdm($article) {
- $tags = array_map("trim", explode(",", $this->host->get($this, "tags")));
- $a_tags = array_map("trim", explode(",", $article["tag_cache"]));
-
- if (count(array_intersect($tags, $a_tags)) > 0) {
- $article["content"] = "
-
".$article["content"]."
";
- }
-
- return $article;
+ return $this->hook_render_article($article);
}
function hook_prefs_tab($args) {
if ($args != "prefPrefs") return;
- print "extension ".__("NSFW Plugin")."\">";
-
- print "
";
-
$tags = $this->host->get($this, "tags");
- print "
+
+ host->set($this, "tags", $tags);
diff --git a/plugins/share/init.php b/plugins/share/init.php
index 42923ed8a..846e1f39c 100644
--- a/plugins/share/init.php
+++ b/plugins/share/init.php
@@ -41,14 +41,14 @@ class Share extends Plugin {
function hook_prefs_tab_section($id) {
if ($id == "prefFeedsPublishedGenerated") {
+ ?>
+
- print "
";
-
- print "" . __("You can disable all articles shared by unique URLs here.") . "
";
-
- print " ";
+ = __("You can disable all articles shared by unique URLs here.") ?>
+
+ execute([$uuid, $param, $_SESSION['uid']]);
}
- print "" . __("You can share this article by the following unique URL:") . "";
+ $url_path = htmlspecialchars(get_self_url_prefix() . "/public.php?op=share&key=$uuid");
- $url_path = get_self_url_prefix();
- $url_path .= "/public.php?op=share&key=$uuid";
+ ?>
- print "
+ = __("You can share this article by the following unique URL:") ?>
+
+
+ ";
-
- /* if (!label_find_id(__('Shared'), $_SESSION["uid"]))
- label_create(__('Shared'), $_SESSION["uid"]);
-
- label_add_article($ref_id, __('Shared'), $_SESSION['uid']); */
+
+ ";
-
- print "";
-
- print "";
-
- print "";
-
- print "";
+ ?>
+
+