make premium channels a feature

This commit is contained in:
friendica 2013-08-22 01:00:54 -07:00
parent 22b6ddef94
commit af72f40759
2 changed files with 14 additions and 2 deletions

View File

@ -27,8 +27,7 @@ function get_features() {
//FIXME - needs a description, but how the hell do we explain this to normals? //FIXME - needs a description, but how the hell do we explain this to normals?
array('sendzid', t('Extended Identity Sharing'), t(' ')), array('sendzid', t('Extended Identity Sharing'), t(' ')),
array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options')), array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options')),
array('premium_channel', t('Premium Channel'), t('Allows you to set restrictions and terms on those that connect with your channel')),
), ),
// Post composition // Post composition

View File

@ -31,6 +31,8 @@ function settings_aside(&$a) {
$a->argv[] = 'channel'; $a->argv[] = 'channel';
} }
$channel = $a->get_channel();
$abook_self_id = 0; $abook_self_id = 0;
// Retrieve the 'self' address book entry for use in the auto-permissions link // Retrieve the 'self' address book entry for use in the auto-permissions link
@ -101,6 +103,17 @@ function settings_aside(&$a) {
); );
if(feature_enabled(local_user(),'premium_channel')) {
$tabs[] = array(
'label' => t('Premium Channel Settings'),
'url' => $a->get_baseurl(true) . '/connect/' . $channel['channel_address'],
'selected' => ''
);
}
$tabtpl = get_markup_template("generic_links_widget.tpl"); $tabtpl = get_markup_template("generic_links_widget.tpl");
$a->page['aside'] = replace_macros($tabtpl, array( $a->page['aside'] = replace_macros($tabtpl, array(