item voting tools
This commit is contained in:
@@ -148,11 +148,13 @@ class Item extends BaseObject {
|
||||
$isevent = true;
|
||||
$attend = array( t('I will attend'), t('I will not attend'), t('I might attend'));
|
||||
}
|
||||
|
||||
$consensus = (($item['item_flags'] & ITEM_CONSENSUS)? true : false);
|
||||
if($consensus) {
|
||||
$response_verbs[] = 'agree';
|
||||
$response_verbs[] = 'disagree';
|
||||
$response_verbs[] = 'abstain';
|
||||
$conlabels = array( t('I agree'), t('I disagree'), t('I abstain'));
|
||||
}
|
||||
|
||||
$responses = get_responses($conv_responses,$response_verbs,$this,$item);
|
||||
@@ -280,6 +282,8 @@ class Item extends BaseObject {
|
||||
'id' => $this->get_id(),
|
||||
'isevent' => $isevent,
|
||||
'attend' => $attend,
|
||||
'consensus' => $consensus,
|
||||
'conlabels' => $conlabels,
|
||||
'linktitle' => sprintf( t('View %s\'s profile - %s'), $profile_name, $item['author']['xchan_addr']),
|
||||
'olinktitle' => sprintf( t('View %s\'s profile - %s'), $this->get_owner_name(), $item['owner']['xchan_addr']),
|
||||
'llink' => $item['llink'],
|
||||
|
||||
@@ -1085,6 +1085,8 @@ function status_editor($a,$x,$popup=false) {
|
||||
// if(feature_enabled(local_channel(),'richtext'))
|
||||
// $plaintext = false;
|
||||
|
||||
$voting = feature_enabled(local_channel(),'consensus_tools');
|
||||
|
||||
$mimeselect = '';
|
||||
if(array_key_exists('mimetype',$x) && $x['mimetype']) {
|
||||
if($x['mimetype'] != 'text/bbcode')
|
||||
@@ -1176,6 +1178,9 @@ function status_editor($a,$x,$popup=false) {
|
||||
'$shortaudio' => t('audio link'),
|
||||
'$setloc' => t('Set your location'),
|
||||
'$shortsetloc' => t('set location'),
|
||||
'$voting' => t('Toggle voting'),
|
||||
'$feature_voting' => $voting,
|
||||
'$consensus' => 0,
|
||||
'$noloc' => ((get_pconfig($x['profile_uid'],'system','use_browser_location')) ? t('Clear browser location') : ''),
|
||||
'$shortnoloc' => t('clear location'),
|
||||
'$title' => ((x($x,'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''),
|
||||
|
||||
@@ -60,6 +60,7 @@ function get_features() {
|
||||
array('large_photos', t('Large Photos'), t('Include large (640px) photo thumbnails in posts. If not enabled, use small (320px) photo thumbnails'),false),
|
||||
array('channel_sources', t('Channel Sources'), t('Automatically import channel content from other channels or feeds'),false),
|
||||
array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false),
|
||||
array('consensus_tools', t('Enable voting tools'), t('Provide a class of post which others can vote on'),false),
|
||||
array('adult_photo_flagging', t('Flag Adult Photos'), t('Provide photo edit option to hide adult photos from default album view'),false),
|
||||
),
|
||||
|
||||
|
||||
@@ -843,9 +843,9 @@ function get_item_elements($x) {
|
||||
|
||||
|
||||
if(array_key_exists('flags',$x) && in_array('deleted',$x['flags']))
|
||||
$arr['item_restrict'] = ITEM_DELETED;
|
||||
$arr['item_restrict'] |= ITEM_DELETED;
|
||||
if(array_key_exists('flags',$x) && in_array('hidden',$x['flags']))
|
||||
$arr['item_restrict'] = ITEM_HIDDEN;
|
||||
$arr['item_restrict'] |= ITEM_HIDDEN;
|
||||
|
||||
// Here's the deal - the site might be down or whatever but if there's a new person you've never
|
||||
// seen before sending stuff to your stream, we MUST be able to look them up and import their data from their
|
||||
|
||||
Reference in New Issue
Block a user