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);
|
||||
}
|
||||
|
||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Posts and comments') . '" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n" ;
|
||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" title="' . t('Only posts') . '" href="' . z_root() . '/feed/' . $which . '?top=1" />' . "\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'
|
||||
]);
|
||||
|
||||
// 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
|
||||
// we start loading content
|
||||
|
@ -33,9 +33,7 @@ class Chat extends \Zotlabs\Web\Controller {
|
||||
$which = $channel['channel_address'];
|
||||
$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
|
||||
// we start loading content
|
||||
|
||||
|
@ -37,8 +37,6 @@ class Cloud extends \Zotlabs\Web\Controller {
|
||||
|
||||
$profile = 0;
|
||||
|
||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n";
|
||||
|
||||
if ($which)
|
||||
profile_load( $which, $profile);
|
||||
|
||||
|
@ -29,7 +29,20 @@ class Hcard extends \Zotlabs\Web\Controller {
|
||||
$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) {
|
||||
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
|
||||
|
@ -37,8 +37,21 @@ class Profile extends \Zotlabs\Web\Controller {
|
||||
$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) {
|
||||
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
|
||||
dbesc(argv(1))
|
||||
|
@ -21,26 +21,10 @@ class Update_display extends \Zotlabs\Web\Controller {
|
||||
$mod = new Display();
|
||||
$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 (($_GET['msie'] == 1) ? '</div>' : '</section>');
|
||||
echo "</body></html>\r\n";
|
||||
// logger('update_display: ' . $text);
|
||||
|
||||
killme();
|
||||
|
||||
}
|
||||
|
@ -1976,9 +1976,7 @@ function channel_manual_conv_update($channel_id) {
|
||||
|
||||
$x = get_pconfig($channel_id, 'system','manual_conversation_update');
|
||||
if($x === false)
|
||||
$x = get_config('system','manual_conversation_update');
|
||||
if($x === false)
|
||||
$x = 1;
|
||||
$x = get_config('system','manual_conversation_update', 1);
|
||||
|
||||
return intval($x);
|
||||
|
||||
|
Reference in New Issue
Block a user