From 5ca352a6c362ac1b452460ebbb07fbf56bb76417 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 17 Jun 2021 12:10:54 +0000 Subject: allow to add a wrapper class to the hq_controls widget --- Zotlabs/Widget/Hq_controls.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Hq_controls.php b/Zotlabs/Widget/Hq_controls.php index 8c36b8d3a..8b532defe 100644 --- a/Zotlabs/Widget/Hq_controls.php +++ b/Zotlabs/Widget/Hq_controls.php @@ -7,7 +7,7 @@ use Zotlabs\Lib\Apps; class Hq_controls { - function widget($arr) { + function widget($options) { if (! local_channel()) return; @@ -38,7 +38,8 @@ class Hq_controls { return replace_macros(get_markup_template('hq_controls.tpl'), [ - '$entries' => $entries + '$entries' => $entries, + '$wrapper_class' => $options['class'] ] ); } -- cgit v1.2.3 From f4f9ccc3b234eaadf29b3f5c8bec6e19de0aa761 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 18 Jun 2021 08:55:49 +0000 Subject: css fixes --- Zotlabs/Widget/Hq_controls.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Hq_controls.php b/Zotlabs/Widget/Hq_controls.php index 8b532defe..9504b8f9e 100644 --- a/Zotlabs/Widget/Hq_controls.php +++ b/Zotlabs/Widget/Hq_controls.php @@ -17,7 +17,7 @@ class Hq_controls { 'label' => t('Toggle post editor'), 'id' => 'jot-toggle', 'href' => '#', - 'class' => 'btn btn-outline-primary', + 'class' => 'btn', 'type' => 'button', 'icon' => 'pencil', 'extra' => 'data-toggle="button"' @@ -29,7 +29,7 @@ class Hq_controls { 'label' => t('Toggle personal notes'), 'id' => 'notes-toggle', 'href' => '#', - 'class' => 'btn btn-outline-primary', + 'class' => 'btn', 'type' => 'button', 'icon' => 'sticky-note-o', 'extra' => 'data-toggle="button"' @@ -39,7 +39,8 @@ class Hq_controls { return replace_macros(get_markup_template('hq_controls.tpl'), [ '$entries' => $entries, - '$wrapper_class' => $options['class'] + '$wrapper_class' => $options['wrapper_class'], + '$entry_class' => $options['entry_class'] ] ); } -- cgit v1.2.3 From c42d8a81c729ff8441195371106e96d398210067 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 18 Jun 2021 09:51:20 +0000 Subject: bbcode: add option to drop media content --- Zotlabs/Widget/Messages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index a03238c9a..95f3d4eb6 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -95,7 +95,7 @@ class Messages { $summary = $item['summary']; } if (!$summary) { - $summary = htmlentities(html2plain(bbcode($item['body']), 75, true), ENT_QUOTES, 'UTF-8', false); + $summary = htmlentities(html2plain(bbcode($item['body'], ['drop_media' => true]), 75, true), ENT_QUOTES, 'UTF-8', false); } if (!$summary) { $summary = '...'; -- cgit v1.2.3