]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Diabook - move pause icon.
[friendica.git] / include / conversation.php
index 7f4c5bc3d22050fd6ff7c06f76390d910fc299dc..1de77feb1b1aec9c14dd0281a83abd7ece7c4de3 100644 (file)
@@ -436,7 +436,11 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
        else if($mode === 'display') {
                $profile_owner = $a->profile['uid'];
                $page_writeable = can_write_wall($a,$profile_owner);
-               $live_update_div = '<div id="live-display"></div>' . "\r\n";
+               if(!$update) {
+                       $live_update_div = '<div id="live-display"></div>' . "\r\n"
+                               . "<script> var profile_uid = " . $_SESSION['uid'] . ";"
+                               . " var profile_page = 1; </script>";
+               }
        }
        else if($mode === 'community') {
                $profile_owner = 0;
@@ -861,11 +865,15 @@ function format_like($cnt,$arr,$type,$id) {
                $total = count($arr);
                if($total >= MAX_LIKERS)
                        $arr = array_slice($arr, 0, MAX_LIKERS - 1);
-               if($total < MAX_LIKERS)
-                       $arr[count($arr)-1] = t('and') . ' ' . $arr[count($arr)-1];
-               $str = implode(', ', $arr);
-               if($total >= MAX_LIKERS)
+               if($total < MAX_LIKERS) {
+                       $last = t('and') . ' ' . $arr[count($arr)-1];
+                       $arr2 = array_slice($arr, 0, -1);
+                       $str = implode(', ', $arr2) . ' ' . $last;
+               }
+               if($total >= MAX_LIKERS) {
+                       $str = implode(', ', $arr);
                        $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS );
+               }
                $str = (($type === 'like') ? sprintf( t('%s like this.'), $str) : sprintf( t('%s don\'t like this.'), $str));
                $o .= "\t" . '<div id="' . $type . 'list-' . $id . '" style="display: none;" >' . $str . '</div>';
        }
@@ -896,7 +904,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
                '$audurl' => t("Please enter an audio link/URL:"),
                '$term' => t('Tag term:'),
                '$fileas' => t('Save to Folder:'),
-               '$whereareu' => t('Where are you right now?')
+               '$whereareu' => t('Where are you right now?'),
+               '$delitems' => t('Delete item(s)?')
        ));
 
 
@@ -993,7 +1002,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
                '$profile_uid' => $x['profile_uid'],
                '$preview' => t('Preview'),
                '$sourceapp' => t($a->sourcename),
-               '$cancel' => t('Cancel')
+               '$cancel' => t('Cancel'),
+               '$rand_num' => random_digits(12)
        ));
 
 
@@ -1008,9 +1018,10 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
 
 function get_item_children($arr, $parent) {
        $children = array();
+       $a = get_app();
        foreach($arr as $item) {
                if($item['id'] != $item['parent']) {
-                       if(get_config('system','thread_allow')) {
+                       if(get_config('system','thread_allow') && $a->theme_thread_allow) {
                                // Fallback to parent-uri if thr-parent is not set
                                $thr_parent = $item['thr-parent'];
                                if($thr_parent == '')