turn star into a feature
This commit is contained in:
parent
22841e1566
commit
517c05700d
@ -256,7 +256,7 @@ class Item extends BaseObject {
|
|||||||
'share' => $share,
|
'share' => $share,
|
||||||
'plink' => get_plink($item),
|
'plink' => get_plink($item),
|
||||||
'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
|
'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
|
||||||
'star' => $star,
|
'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''),
|
||||||
'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''),
|
'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''),
|
||||||
'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
|
'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
|
||||||
'drop' => $drop,
|
'drop' => $drop,
|
||||||
|
@ -16,18 +16,19 @@ function get_features() {
|
|||||||
|
|
||||||
$arr = array(
|
$arr = array(
|
||||||
|
|
||||||
array('multi_delete', t('Multiple Deletion'), t('Select and delete multiple posts/comments at once')),
|
array('multi_delete', t('Multiple Deletion'), t('Select and delete multiple posts/comments at once')),
|
||||||
array('expire', t('Content Expiration'), t('Remove old posts/comments after a period of time')),
|
array('expire', t('Content Expiration'), t('Remove old posts/comments after a period of time')),
|
||||||
array('commtag', t('Community Tagging'), t('Tag existing posts and share the links')),
|
array('commtag', t('Community Tagging'), t('Tag existing posts and share the links')),
|
||||||
array('categories', t('Post Categories'), t('Add categories to your channel postings')),
|
array('categories', t('Post Categories'), t('Add categories to your channel postings')),
|
||||||
array('filing', t('Saved Folders'), t('Ability to file posts under easily remembered names')),
|
array('filing', t('Saved Folders'), t('Ability to file posts under easily remembered names')),
|
||||||
array('archives', t('Search by Date'), t('Select posts by date ranges')),
|
array('archives', t('Search by Date'), t('Select posts by date ranges')),
|
||||||
array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments')),
|
array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments')),
|
||||||
array('savedsearch', t('Saved Searches'), t('Save search terms for re-use')),
|
array('savedsearch', t('Saved Searches'), t('Save search terms for re-use')),
|
||||||
array('preview', t('Post Preview'), t('Preview posts and comments before publishing them')),
|
array('preview', t('Post Preview'), t('Preview posts and comments before publishing them')),
|
||||||
array('edit_posts', t('Edit Sent Posts'), t('Edit and correct posts and comments after sending')),
|
array('edit_posts', t('Edit Sent Posts'), t('Edit and correct posts and comments after sending')),
|
||||||
array('richtext', t('Richtext Editor'), t('Use richtext/visual editor where applicable')),
|
array('star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator')),
|
||||||
array('multi_profiles', t('Multiple Profiles'), t('Show different profiles to different connections/collections')),
|
array('richtext', t('Richtext Editor'), t('Use richtext/visual editor where applicable')),
|
||||||
|
array('multi_profiles', t('Multiple Profiles'), t('Show different profiles to different connections/collections')),
|
||||||
);
|
);
|
||||||
|
|
||||||
call_hooks('get_features',$arr);
|
call_hooks('get_features',$arr);
|
||||||
|
@ -310,20 +310,29 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
'sel' => $new_active,
|
'sel' => $new_active,
|
||||||
'title' => t('Activity Stream - by date'),
|
'title' => t('Activity Stream - by date'),
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
|
);
|
||||||
|
|
||||||
|
if(feature_enabled(local_user(),'star_posts'))
|
||||||
|
$tabs[] = array(
|
||||||
'label' => t('Starred'),
|
'label' => t('Starred'),
|
||||||
'url'=>$a->get_baseurl(true) . '/' . $cmd . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
|
'url'=>$a->get_baseurl(true) . '/' . $cmd . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
|
||||||
'sel'=>$starred_active,
|
'sel'=>$starred_active,
|
||||||
'title' => t('Favourite Posts'),
|
'title' => t('Favourite Posts'),
|
||||||
),
|
);
|
||||||
// array(
|
|
||||||
// 'label' => t('Spam'),
|
// Not yet implemented
|
||||||
// 'url'=>$a->get_baseurl(true) . '/network?f=&spam=1'
|
|
||||||
// 'sel'=> $spam_active,
|
if(feature_enabled(local_user(),'spam_filter'))
|
||||||
// 'title' => t('Posts flagged as SPAM'),
|
$tabs[] = array(
|
||||||
// ),
|
'label' => t('Spam'),
|
||||||
|
'url'=>$a->get_baseurl(true) . '/network?f=&spam=1',
|
||||||
|
'sel'=> $spam_active,
|
||||||
|
'title' => t('Posts flagged as SPAM'),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
// save selected tab, but only if not in search or file mode
|
// save selected tab, but only if not in search or file mode
|
||||||
if(!x($_GET,'search') && !x($_GET,'file')) {
|
if(!x($_GET,'search') && !x($_GET,'file')) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<ul class="tabs">
|
<ul class="tabs">
|
||||||
{{ for $tabs as $tab }}
|
{{ for $tabs as $tab }}
|
||||||
<li id="$tab.id"><a href="$tab.url" class="tab button $tab.sel"{{ if $tab.title }} title="$tab.title"{{ endif }}>$tab.label</a></li>
|
<li {{ if $tab.id }}id="$tab.id"{{ endif }}><a href="$tab.url" class="tab button $tab.sel"{{ if $tab.title }} title="$tab.title"{{ endif }}>$tab.label</a></li>
|
||||||
{{ endfor }}
|
{{ endfor }}
|
||||||
</ul>
|
</ul>
|
||||||
|
Reference in New Issue
Block a user