'salmon', 'href' => z_root() . '/salmon/' . $b['channel']['channel_address']);
}
function gnusoc_personal_xrd(&$a,&$b) {
$b['xml'] = str_replace('',
'' . "\r\n" . '', $b['xml']);
}
function gnusoc_follow_allow(&$a, &$b) {
if($b['xchan']['xchan_network'] !== 'gnusoc')
return;
$allowed = get_pconfig($b['channel_id'],'system','gnusoc_allowed');
if($allowed === false)
$allowed = 1;
$b['allowed'] = $allowed;
$b['singleton'] = 1; // this network does not support channel clones
}
function gnusoc_feature_settings_post(&$a,&$b) {
if($_POST['gnusoc-submit']) {
set_pconfig(local_channel(),'system','gnusoc_allowed',intval($_POST['gnusoc_allowed']));
info( t('GNU-Social Protocol Settings updated.') . EOL);
}
}
function gnusoc_feature_settings(&$a,&$s) {
$gnusoc_allowed = get_pconfig(local_channel(),'system','gnusoc_allowed');
if($gnusoc_allowed === false)
$gnus_allowed = get_config('gnusoc','allowed');
$sc .= replace_macros(get_markup_template('field_checkbox.tpl'), array(
'$field' => array('gnusoc_allowed', t('Enable the (experimental) GNU-Social protocol for this channel'), $gnusoc_allowed, '', $yes_no),
));
$s .= replace_macros(get_markup_template('generic_addon_settings.tpl'), array(
'$addon' => array('gnusoc', '' . t('GNU-Social Protocol Settings'), '', t('Submit')),
'$content' => $sc
));
return;
}