bring back future posting

This commit is contained in:
zotlabs 2020-05-03 16:18:27 -07:00
parent 843fdff0a5
commit eec30d23df
5 changed files with 32 additions and 5 deletions

View file

@ -328,6 +328,7 @@ class Apps {
'Content Import' => t('Content Import'), 'Content Import' => t('Content Import'),
'Connections' => t('Connections'), 'Connections' => t('Connections'),
'Expire Posts' => t('Expire Posts'), 'Expire Posts' => t('Expire Posts'),
'Future Posting' => t('Future Posting'),
'Remote Diagnostics' => t('Remote Diagnostics'), 'Remote Diagnostics' => t('Remote Diagnostics'),
'Suggest Channels' => t('Suggest Channels'), 'Suggest Channels' => t('Suggest Channels'),
'Login' => t('Login'), 'Login' => t('Login'),

21
Zotlabs/Module/Future.php Normal file
View file

@ -0,0 +1,21 @@
<?php
namespace Zotlabs\Module;
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libsync;
use Zotlabs\Web\Controller;
class Future extends Controller {
function get() {
$desc = t('This app allows you to set an optional publish date/time for posts, which may be in the future. This must be at least ten minutes into the future to initiate delayed publishing. The posts will be published automatically after that time has passed. Once installed, a new button will appear in the post editor to set the date/time.');
$text = '<div class="section-content-info-wrapper">' . $desc . '</div>';
return $text;
}
}

View file

@ -511,10 +511,9 @@ class Linkinfo extends Controller {
private static function arr_add_hashes(&$item,$k) { private static function arr_add_hashes(&$item,$k) {
if (substr($item,0,1) !== '#') {
$item = '#' . $item; $item = '#' . $item;
} }
}
} }

6
app/future.apd Normal file
View file

@ -0,0 +1,6 @@
version: 1
url: $baseurl/future
requires: local_channel
name: Future Posting
photo: icon:clock-o
categories: Networking

View file

@ -1260,7 +1260,7 @@ function z_status_editor($a, $x, $popup = false) {
if(x($x, 'hide_expire')) if(x($x, 'hide_expire'))
$feature_expire = false; $feature_expire = false;
$feature_future = ((feature_enabled($x['profile_uid'], 'delayed_posting') && (! $webpage)) ? true : false); $feature_future = ((Apps::system_app_installed($x['profile_uid'], 'Future Posting') && (! $webpage)) ? true : false);
if(x($x, 'hide_future')) if(x($x, 'hide_future'))
$feature_future = false; $feature_future = false;