]> git.mxchange.org Git - friendica.git/blobdiff - mod/message.php
Frost-mobile: media query in css for tablets
[friendica.git] / mod / message.php
index 1e9d731a4502064c39f830150a601d967fd0bff2..83bad29d43647fea02fe1107e175a71dff5b59b4 100644 (file)
@@ -18,24 +18,17 @@ function message_init(&$a) {
        ));
        $base = $a->get_baseurl();
 
-       $a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
-       $a->page['htmlhead'] .= <<< EOT
-
-<script>$(document).ready(function() { 
-       var a; 
-       a = $("#recip").autocomplete({ 
-               serviceUrl: '$base/acl',
-               minChars: 2,
-               width: 350,
-               onSelect: function(value,data) {
-                       $("#recip-complete").val(data);
-               }                       
-       });
-
-}); 
-
-</script>
-EOT;
+       $head_tpl = get_markup_template('message-head.tpl');
+       $a->page['htmlhead'] .= replace_macros($head_tpl,array(
+               '$baseurl' => $a->get_baseurl(true),
+               '$base' => $base
+       ));
+
+       $end_tpl = get_markup_template('message-end.tpl');
+       $a->page['end'] .= replace_macros($end_tpl,array(
+               '$baseurl' => $a->get_baseurl(true),
+               '$base' => $base
+       ));
        
 }
 
@@ -242,7 +235,6 @@ function message_content(&$a) {
 
 
                $tpl = get_markup_template('msg-header.tpl');
-
                $a->page['htmlhead'] .= replace_macros($tpl, array(
                        '$baseurl' => $a->get_baseurl(true),
                        '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@@ -250,6 +242,14 @@ function message_content(&$a) {
                        '$linkurl' => t('Please enter a link URL:')
                ));
        
+               $tpl = get_markup_template('msg-end.tpl');
+               $a->page['end'] .= replace_macros($tpl, array(
+                       '$baseurl' => $a->get_baseurl(true),
+                       '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
+                       '$nickname' => $a->user['nickname'],
+                       '$linkurl' => t('Please enter a link URL:')
+               ));
+       
                $preselect = (isset($a->argv[2])?array($a->argv[2]):false);
                        
 
@@ -399,12 +399,17 @@ function message_content(&$a) {
                require_once("include/bbcode.php");
 
                $tpl = get_markup_template('msg-header.tpl');
-       
                $a->page['htmlhead'] .= replace_macros($tpl, array(
                        '$nickname' => $a->user['nickname'],
                        '$baseurl' => $a->get_baseurl(true)
                ));
 
+               $tpl = get_markup_template('msg-end.tpl');
+               $a->page['end'] .= replace_macros($tpl, array(
+                       '$nickname' => $a->user['nickname'],
+                       '$baseurl' => $a->get_baseurl(true)
+               ));
+
 
                $mails = array();
                $seen = 0;