diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 42fd5280e..b64cefb34 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -65,7 +65,6 @@ class Apps { 'Channel Home', 'View Profile', 'Photos', -// 'Calendar', 'Directory', 'Events', 'Search', @@ -311,6 +310,7 @@ class Apps { 'Apps' => t('Apps'), 'Friend Zoom' => t('Friend Zoom'), 'Virtual Lists' => t('Virtual Lists'), + 'Markup' => t('Markup'), 'Articles' => t('Articles'), 'Cards' => t('Cards'), 'Calendar' => t('Calendar'), diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 5d8f17351..151540e21 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -916,6 +916,7 @@ class ThreadItem { '$indent' => $indent, '$can_upload' => (perm_is_allowed($conv->get_profile_owner(),get_observer_hash(),'write_storage') && $conv->is_uploadable()), '$feature_encrypt' => ((Apps::system_app_installed($conv->get_profile_owner(),'Secrets')) ? true : false), + '$feature_markup' => ((Apps::system_app_installed($conv->get_profile_owner(),'Markup')) ? true : false), '$encrypt' => t('Encrypt text'), '$cipher' => $conv->get_cipher(), '$sourceapp' => App::$sourcename, diff --git a/Zotlabs/Module/Markup.php b/Zotlabs/Module/Markup.php new file mode 100644 index 000000000..1f43697f1 --- /dev/null +++ b/Zotlabs/Module/Markup.php @@ -0,0 +1,22 @@ +' . $desc . ''; + + return $text; + + } + +} diff --git a/app/markup.apd b/app/markup.apd new file mode 100644 index 000000000..2f8d231eb --- /dev/null +++ b/app/markup.apd @@ -0,0 +1,6 @@ +version: 1 +url: $baseurl/markup +requires: local_channel +name: Markup +photo: icon:bold +categories: Productivity diff --git a/include/bbcode.php b/include/bbcode.php index 48e22b95d..0275d9153 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1154,6 +1154,9 @@ function bbcode($Text, $options = []) { call_hooks('bbcode_filter', $Text); + + + // Hide all [noparse] contained bbtags by spacefying them if (strpos($Text,'[noparse]') !== false) { $Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text); diff --git a/include/conversation.php b/include/conversation.php index 61ef744b5..c6588972c 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1262,6 +1262,11 @@ function z_status_editor($a, $x, $popup = false) { if(x($x, 'hide_future')) $feature_future = false; + $feature_markup = ((Apps::system_app_installed($x['profile_uid'], 'Markup') && (! $webpage)) ? true : false); + if(x($x, 'hide_markup')) + $feature_markup = false; + + $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); $setloc = t('Set your location'); $clearloc = ((get_pconfig($x['profile_uid'], 'system', 'use_browser_location')) ? t('Clear browser location') : ''); @@ -1462,6 +1467,7 @@ function z_status_editor($a, $x, $popup = false) { '$defpublish' => $defpublish, '$feature_future' => $feature_future, '$future_txt' => t('Set publish date'), + '$feature_markup' => $feature_markup, '$feature_encrypt' => ((Apps::system_app_installed($x['profile_uid'],'Secrets')) ? true : false), '$encrypt' => t('Encrypt text'), '$cipher' => $cipher, diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 790253a8d..fb959f043 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -25,6 +25,7 @@
+ {{if $feature_markup}}
+ {{/if}}
{{if $can_upload}}