new feature: delayed posting

This commit is contained in:
redmatrix
2015-10-25 16:54:18 -07:00
parent 7f3df847a2
commit 917d0ced4a
5 changed files with 51 additions and 2 deletions

View File

@@ -1166,6 +1166,10 @@ function status_editor($a, $x, $popup = false) {
if($defexpire)
$defexpire = datetime_convert('UTC',date_default_timezone_get(),$defexpire,'Y-m-d H:i');
$defpublish = ((($z = get_pconfig($x['profile_uid'], 'system', 'default_post_publish')) && (! $webpage)) ? $z : '');
if($defpublish)
$defpublish = datetime_convert('UTC',date_default_timezone_get(),$defpublish,'Y-m-d H:i');
$cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher');
if(! $cipher)
$cipher = 'aes256';
@@ -1237,6 +1241,9 @@ function status_editor($a, $x, $popup = false) {
'$defexpire' => $defexpire,
'$feature_expire' => ((feature_enabled($x['profile_uid'], 'content_expire') && (! $webpage)) ? true : false),
'$expires' => t('Set expiration date'),
'$defpublish' => $defpublish,
'$feature_future' => ((feature_enabled($x['profile_uid'], 'delayed_posting') && (! $webpage)) ? true : false),
'$future_txt' => t('Set publish date'),
'$feature_encrypt' => ((feature_enabled($x['profile_uid'], 'content_encrypt') && (! $webpage)) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $cipher,

View File

@@ -58,7 +58,8 @@ function get_features() {
array('large_photos', t('Large Photos'), t('Include large (1024px) photo thumbnails in posts. If not enabled, use small (640px) 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('consensus_tools', t('Enable Voting Tools'), t('Provide a class of post which others can vote on'),false),
array('delayed_posting', t('Delayed Posting'), t('Allow posts to be published at a later date'),false),
),

View File

@@ -366,7 +366,7 @@ function notifier_run($argv, $argc){
logger('notifier: target item not forwardable: type ' . $target_item['item_type'], LOGGER_DEBUG);
return;
}
if(intval($target_item['item_unpublished']) || intval($target_item['item_delayed_publish'])) {
if(intval($target_item['item_unpublished']) || intval($target_item['item_delayed'])) {
logger('notifier: target item not published, so not forwardable', LOGGER_DEBUG);
return;
}