mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:15:13 +00:00
bring back future posting
This commit is contained in:
parent
843fdff0a5
commit
eec30d23df
5 changed files with 32 additions and 5 deletions
|
@ -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
21
Zotlabs/Module/Future.php
Normal 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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -511,10 +511,9 @@ class Linkinfo extends Controller {
|
||||||
|
|
||||||
|
|
||||||
private static function arr_add_hashes(&$item,$k) {
|
private static function arr_add_hashes(&$item,$k) {
|
||||||
$item = '#' . $item;
|
if (substr($item,0,1) !== '#') {
|
||||||
|
$item = '#' . $item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
6
app/future.apd
Normal file
6
app/future.apd
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
version: 1
|
||||||
|
url: $baseurl/future
|
||||||
|
requires: local_channel
|
||||||
|
name: Future Posting
|
||||||
|
photo: icon:clock-o
|
||||||
|
categories: Networking
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue