]> git.mxchange.org Git - friendica.git/commitdiff
Updates for community pages do work now
authorMichael <heluecht@pirati.ca>
Thu, 4 Jan 2018 15:46:56 +0000 (15:46 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 4 Jan 2018 15:46:56 +0000 (15:46 +0000)
include/conversation.php
mod/community.php
mod/update_community.php

index d6b6bd8eee1a0b05928499ddd773b8c2d66f8ce8..97630a65fb22633307b1397010bbce8310aded9d 100644 (file)
@@ -578,11 +578,11 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                        $items = community_add_items($items);
                }
                $profile_owner = 0;
-// Currently deactivated. Will be activated when we can comment on the community page
-//             if (!$update) {
-//                     $live_update_div = '<div id="live-community"></div>' . "\r\n"
-//                             . "<script> var profile_uid = -1; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
-//             }
+               if (!$update) {
+                       $live_update_div = '<div id="live-community"></div>' . "\r\n"
+                               . "<script> var profile_uid = -1; var netargs = '" . substr($a->cmd, 10)
+                               ."/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
+               }
        } elseif ($mode === 'search') {
                $live_update_div = '<div id="live-search"></div>' . "\r\n";
        }
index 00c4ada4e248ade841260eef67754e17de375f60..a75a3cf7dd449d06dd63b26cf99d40f80cb2dd02 100644 (file)
@@ -139,7 +139,9 @@ function community_content(App $a, $update = 0) {
 
        $o .= conversation($a, $s, 'community', $update);
 
-       $o .= alt_pager($a, count($r));
+       if (!$update) {
+               $o .= alt_pager($a, count($r));
+       }
 
        $t = get_markup_template("community.tpl");
        return replace_macros($t, array(
index c0e4c33238211f0f85311fc94c1a0627898d0446..1e90053267abdc2723e5741cb2ac287c7e0752cf 100644 (file)
@@ -8,12 +8,12 @@ use Friendica\Core\PConfig;
 require_once("mod/community.php");
 
 function update_community_content(App $a) {
-
        header("Content-type: text/html");
        echo "<!DOCTYPE html><html><body>\r\n";
        echo "<section>";
 
        $text = community_content($a, true);
+
        $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
        $replace = "<img\${1} dst=\"\${2}\"";
        $text = preg_replace($pattern, $replace, $text);
@@ -34,4 +34,4 @@ function update_community_content(App $a) {
        echo "</section>";
        echo "</body></html>\r\n";
        killme();
-}
\ No newline at end of file
+}