aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/editpost.php6
-rw-r--r--mod/item.php5
2 files changed, 10 insertions, 1 deletions
diff --git a/mod/editpost.php b/mod/editpost.php
index 1d9855c95..bdd3be450 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -74,7 +74,8 @@ function editpost_content(&$a) {
$channel = $a->get_channel();
//$tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
-
+
+ $voting = feature_enabled(local_channel(),'consensus_tools');
$category = '';
$catsenabled = ((feature_enabled(local_channel(),'categories')) ? 'categories' : '');
@@ -118,6 +119,9 @@ function editpost_content(&$a) {
'$audio' => t('Insert Vorbis [.ogg] audio'),
'$setloc' => t('Set your location'),
'$noloc' => t('Clear browser location'),
+ '$voting' => t('Toggle voting'),
+ '$feature_voting' => $voting,
+ '$consensus' => (($itm[0]['item_flags'] & ITEM_CONSENSUS) ? 1 : 0),
'$wait' => t('Please wait'),
'$permset' => t('Permission settings'),
'$ptyp' => $itm[0]['type'],
diff --git a/mod/item.php b/mod/item.php
index 6ae02b510..ef0491895 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -59,6 +59,8 @@ function item_post(&$a) {
$api_source = ((x($_REQUEST,'api_source') && $_REQUEST['api_source']) ? true : false);
+ $consensus = intval($_REQUEST['consensus']);
+
// 'origin' (if non-zero) indicates that this network is where the message originated,
// for the purpose of relaying comments to other conversation members.
// If using the API from a device (leaf node) you must set origin to 1 (default) or leave unset.
@@ -683,6 +685,9 @@ function item_post(&$a) {
$item_flags = $item_flags | ITEM_THREAD_TOP;
}
+ if($consensus)
+ $item_flags |= ITEM_CONSENSUS;
+
if ((! $plink) && ($item_flags & ITEM_THREAD_TOP)) {
$plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid;
}