Updates for community pages do work now
This commit is contained in:
parent
b677bdd4ff
commit
ade987db47
3 changed files with 10 additions and 8 deletions
|
@ -578,11 +578,11 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
|
||||||
$items = community_add_items($items);
|
$items = community_add_items($items);
|
||||||
}
|
}
|
||||||
$profile_owner = 0;
|
$profile_owner = 0;
|
||||||
// Currently deactivated. Will be activated when we can comment on the community page
|
if (!$update) {
|
||||||
// if (!$update) {
|
$live_update_div = '<div id="live-community"></div>' . "\r\n"
|
||||||
// $live_update_div = '<div id="live-community"></div>' . "\r\n"
|
. "<script> var profile_uid = -1; var netargs = '" . substr($a->cmd, 10)
|
||||||
// . "<script> var profile_uid = -1; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
|
."/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
|
||||||
// }
|
}
|
||||||
} elseif ($mode === 'search') {
|
} elseif ($mode === 'search') {
|
||||||
$live_update_div = '<div id="live-search"></div>' . "\r\n";
|
$live_update_div = '<div id="live-search"></div>' . "\r\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,9 @@ function community_content(App $a, $update = 0) {
|
||||||
|
|
||||||
$o .= conversation($a, $s, 'community', $update);
|
$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");
|
$t = get_markup_template("community.tpl");
|
||||||
return replace_macros($t, array(
|
return replace_macros($t, array(
|
||||||
|
|
|
@ -8,12 +8,12 @@ use Friendica\Core\PConfig;
|
||||||
require_once("mod/community.php");
|
require_once("mod/community.php");
|
||||||
|
|
||||||
function update_community_content(App $a) {
|
function update_community_content(App $a) {
|
||||||
|
|
||||||
header("Content-type: text/html");
|
header("Content-type: text/html");
|
||||||
echo "<!DOCTYPE html><html><body>\r\n";
|
echo "<!DOCTYPE html><html><body>\r\n";
|
||||||
echo "<section>";
|
echo "<section>";
|
||||||
|
|
||||||
$text = community_content($a, true);
|
$text = community_content($a, true);
|
||||||
|
|
||||||
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
|
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
|
||||||
$replace = "<img\${1} dst=\"\${2}\"";
|
$replace = "<img\${1} dst=\"\${2}\"";
|
||||||
$text = preg_replace($pattern, $replace, $text);
|
$text = preg_replace($pattern, $replace, $text);
|
||||||
|
@ -34,4 +34,4 @@ function update_community_content(App $a) {
|
||||||
echo "</section>";
|
echo "</section>";
|
||||||
echo "</body></html>\r\n";
|
echo "</body></html>\r\n";
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue