use head_add_link() for feed discovery
This commit is contained in:
parent
bbacfbdd6a
commit
6644dc4861
@ -41,12 +41,20 @@ class Channel extends \Zotlabs\Web\Controller {
|
|||||||
$profile = argv(1);
|
$profile = argv(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Posts and comments') . '" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n" ;
|
head_add_link( [
|
||||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Only posts') . '" href="' . z_root() . '/feed/' . $which . '?top=1" />' . "\r\n" ;
|
'rel' => 'alternate',
|
||||||
|
'type' => 'application/atom+xml',
|
||||||
|
'title' => t('Posts and comments'),
|
||||||
|
'href' => z_root() . '/feed/' . $which
|
||||||
|
]);
|
||||||
|
|
||||||
|
head_add_link( [
|
||||||
|
'rel' => 'alternate',
|
||||||
|
'type' => 'application/atom+xml',
|
||||||
|
'title' => t('Only posts'),
|
||||||
|
'href' => z_root() . '/feed/' . $which . '?f=&top=1'
|
||||||
|
]);
|
||||||
|
|
||||||
// Not yet ready for prime time
|
|
||||||
// \App::$page['htmlhead'] .= '<link rel="openid.server" href="' . z_root() . '/id/' . $which .'?f=" />' . "\r\n" ;
|
|
||||||
// \App::$page['htmlhead'] .= '<link rel="openid.delegate" href="' . z_root() . '/channel/' . $which .'" />' . "\r\n" ;
|
|
||||||
|
|
||||||
// Run profile_load() here to make sure the theme is set before
|
// Run profile_load() here to make sure the theme is set before
|
||||||
// we start loading content
|
// we start loading content
|
||||||
|
@ -34,8 +34,6 @@ class Chat extends \Zotlabs\Web\Controller {
|
|||||||
$profile = argv(1);
|
$profile = argv(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which .'" />' . "\r\n" ;
|
|
||||||
|
|
||||||
// Run profile_load() here to make sure the theme is set before
|
// Run profile_load() here to make sure the theme is set before
|
||||||
// we start loading content
|
// we start loading content
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ class Cloud extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$profile = 0;
|
$profile = 0;
|
||||||
|
|
||||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n";
|
|
||||||
|
|
||||||
if ($which)
|
if ($which)
|
||||||
profile_load( $which, $profile);
|
profile_load( $which, $profile);
|
||||||
|
|
||||||
|
@ -29,7 +29,20 @@ class Hcard extends \Zotlabs\Web\Controller {
|
|||||||
$profile = $r[0]['profile_guid'];
|
$profile = $r[0]['profile_guid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which .'" />' . "\r\n" ;
|
head_add_link( [
|
||||||
|
'rel' => 'alternate',
|
||||||
|
'type' => 'application/atom+xml',
|
||||||
|
'title' => t('Posts and comments'),
|
||||||
|
'href' => z_root() . '/feed/' . $which
|
||||||
|
]);
|
||||||
|
|
||||||
|
head_add_link( [
|
||||||
|
'rel' => 'alternate',
|
||||||
|
'type' => 'application/atom+xml',
|
||||||
|
'title' => t('Only posts'),
|
||||||
|
'href' => z_root() . '/feed/' . $which . '?f=&top=1'
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
if(! $profile) {
|
if(! $profile) {
|
||||||
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
|
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
|
||||||
|
@ -37,7 +37,20 @@ class Profile extends \Zotlabs\Web\Controller {
|
|||||||
$profile = $r[0]['profile_guid'];
|
$profile = $r[0]['profile_guid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which .'" />' . "\r\n" ;
|
head_add_link( [
|
||||||
|
'rel' => 'alternate',
|
||||||
|
'type' => 'application/atom+xml',
|
||||||
|
'title' => t('Posts and comments'),
|
||||||
|
'href' => z_root() . '/feed/' . $which
|
||||||
|
]);
|
||||||
|
|
||||||
|
head_add_link( [
|
||||||
|
'rel' => 'alternate',
|
||||||
|
'type' => 'application/atom+xml',
|
||||||
|
'title' => t('Only posts'),
|
||||||
|
'href' => z_root() . '/feed/' . $which . '?f=&top=1'
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
if(! $profile) {
|
if(! $profile) {
|
||||||
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
|
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
|
||||||
|
@ -21,26 +21,10 @@ class Update_display extends \Zotlabs\Web\Controller {
|
|||||||
$mod = new Display();
|
$mod = new Display();
|
||||||
$text = $mod->get($profile_uid, $load);
|
$text = $mod->get($profile_uid, $load);
|
||||||
|
|
||||||
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
|
|
||||||
$replace = "<img\${1} dst=\"\${2}\"";
|
|
||||||
// $text = preg_replace($pattern, $replace, $text);
|
|
||||||
/*
|
|
||||||
if(! $load) {
|
|
||||||
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
|
|
||||||
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
|
|
||||||
$text = preg_replace($pattern, $replace, $text);
|
|
||||||
$pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
|
|
||||||
$text = preg_replace($pattern, $replace, $text);
|
|
||||||
$pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
|
|
||||||
$text = preg_replace($pattern, $replace, $text);
|
|
||||||
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
|
|
||||||
$text = preg_replace($pattern, $replace, $text);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
echo str_replace("\t",' ',$text);
|
echo str_replace("\t",' ',$text);
|
||||||
echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
|
echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
|
||||||
echo "</body></html>\r\n";
|
echo "</body></html>\r\n";
|
||||||
// logger('update_display: ' . $text);
|
|
||||||
killme();
|
killme();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1976,9 +1976,7 @@ function channel_manual_conv_update($channel_id) {
|
|||||||
|
|
||||||
$x = get_pconfig($channel_id, 'system','manual_conversation_update');
|
$x = get_pconfig($channel_id, 'system','manual_conversation_update');
|
||||||
if($x === false)
|
if($x === false)
|
||||||
$x = get_config('system','manual_conversation_update');
|
$x = get_config('system','manual_conversation_update', 1);
|
||||||
if($x === false)
|
|
||||||
$x = 1;
|
|
||||||
|
|
||||||
return intval($x);
|
return intval($x);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user