aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-02-07 19:54:07 -0800
committerzotlabs <mike@macgirvin.com>2019-02-07 19:54:07 -0800
commit4837f9cdad47b6709b8b5cefac821d28435d6783 (patch)
treea423148e097d1f9b651730876342b8916ae0c350 /include
parent317c53acf6b74a4f92284074017985fb09662a46 (diff)
parent2b7a60522394d87eb3362829497e7a1a2542ca55 (diff)
downloadvolse-hubzilla-4837f9cdad47b6709b8b5cefac821d28435d6783.tar.gz
volse-hubzilla-4837f9cdad47b6709b8b5cefac821d28435d6783.tar.bz2
volse-hubzilla-4837f9cdad47b6709b8b5cefac821d28435d6783.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php19
-rw-r--r--include/text.php2
2 files changed, 15 insertions, 6 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 041994b90..e2dd02ffc 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1328,7 +1328,7 @@ function hz_status_editor($a, $x, $popup = false) {
$tpl = get_markup_template('jot-header.tpl');
- App::$page['htmlhead'] .= replace_macros($tpl, array(
+ $tplmacros = [
'$baseurl' => z_root(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''),
@@ -1349,7 +1349,10 @@ function hz_status_editor($a, $x, $popup = false) {
'$nocomment_disabled' => t('Comments disabled'),
'$auto_save_draft' => $feature_auto_save_draft,
'$reset' => $reset
- ));
+ ];
+
+ call_hooks('jot_header_tpl_filter',$tplmacros);
+ App::$page['htmlhead'] .= replace_macros($tpl, $tplmacros);
$tpl = get_markup_template('jot.tpl');
@@ -1389,7 +1392,7 @@ function hz_status_editor($a, $x, $popup = false) {
$sharebutton = (x($x,'button') ? $x['button'] : t('Share'));
$placeholdtext = (x($x,'content_label') ? $x['content_label'] : $sharebutton);
- $o .= replace_macros($tpl, array(
+ $tplmacros = [
'$return_path' => ((x($x, 'return_path')) ? $x['return_path'] : App::$query_string),
'$action' => z_root() . '/item',
'$share' => $sharebutton,
@@ -1463,9 +1466,15 @@ function hz_status_editor($a, $x, $popup = false) {
'$bbcode' => ((x($x, 'bbcode')) ? $x['bbcode'] : false),
'$parent' => ((array_key_exists('parent',$x) && $x['parent']) ? $x['parent'] : 0),
'$reset' => $reset,
- '$is_owner' => ((local_channel() && (local_channel() == $x['profile_uid'])) ? true : false)
- ));
+ '$is_owner' => ((local_channel() && (local_channel() == $x['profile_uid'])) ? true : false),
+ '$custommoretoolsdropdown' => '',
+ '$custommoretoolsbuttons' => '',
+ '$customsubmitright' => []
+ ];
+
+ call_hooks('jot_tpl_filter',$tplmacros);
+ $o .= replace_macros($tpl, $tplmacros);
if ($popup === true) {
$o = '<div id="jot-popup" style="display:none">' . $o . '</div>';
}
diff --git a/include/text.php b/include/text.php
index d94196662..b017b038a 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1107,7 +1107,7 @@ function searchbox($s,$id='search-box',$url='/search',$save = false) {
* @return string
*/
function linkify($s, $me = false) {
- $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\@\~\#\'\%\$\!\+\,\@]*)/u", (($me) ? ' <a href="$1" rel="me" >$1</a>' : ' <a href="$1" >$1</a>'), $s);
+ $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\@\~\#\'\%\$\!\+\,\@]*)/u", (($me) ? ' <a href="$1" rel="me nofollow" >$1</a>' : ' <a href="$1" >$1</a>'), $s);
$s = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$s);
return($s);