diff options
author | Arno Richter <oelna@oelna.de> | 2023-08-16 14:52:58 +0200 |
---|---|---|
committer | Arno Richter <oelna@oelna.de> | 2023-08-16 14:52:58 +0200 |
commit | 66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5 (patch) | |
tree | fa54ab21d4c6122df124459030dd5c6af723f1af /config-dist.php | |
parent | ff2858b6ea8f586daa95e51ae21315f86cc5ded5 (diff) | |
download | microblog-66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5.tar.gz microblog-66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5.tar.bz2 microblog-66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5.zip |
huge update to implement first version of activitypub support. closes #16. AP and subdir hosting are incompatible!
Diffstat (limited to 'config-dist.php')
-rw-r--r-- | config-dist.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/config-dist.php b/config-dist.php index 2036e72..095eadb 100644 --- a/config-dist.php +++ b/config-dist.php @@ -11,9 +11,12 @@ DEFINE('NOW', time()); date_default_timezone_set('Europe/Berlin'); /* make the path easier to read */ -$path_fragments = (parse_url(str_replace(dirname($_SERVER['SCRIPT_NAME']), '', $_SERVER['REQUEST_URI']), PHP_URL_PATH)); -$path = explode('/', trim($path_fragments, '/')); -if(mb_strlen($path[0]) == 0) $path = array(); +$dir = dirname($_SERVER['SCRIPT_NAME']); +$uri = $_SERVER['REQUEST_URI']; +$uri = substr($uri, mb_strlen($dir)); // handle subdir installs +$path_fragments = parse_url($uri, PHP_URL_PATH); +$path = (empty($path_fragments)) ? [''] : explode('/', trim($path_fragments, '/')); +if(mb_strlen($path[0]) == 0) { $path = []; } // (mostly) user settings $config = array( @@ -22,12 +25,16 @@ $config = array( 'language' => 'en', 'max_characters' => 280, 'posts_per_page' => 10, - 'microblog_account' => '', // fill in a @username if you like + 'theme' => 'microblog', // filename of the CSS to use + 'microblog_account' => '@username', // fill in a @username if you like (is also the ActivityPub actor preferredUsername) + 'site_title' => "username's Microblog", // is also the ActivityPub actor name + 'site_claim' => "This is an automated account. Don't mention or reply please.", // is also the ActivityPub actor summary 'admin_user' => 'admin', 'admin_pass' => 'dove-life-bird-lust', 'app_token' => '3e83b13d99bf0de6c6bde5ac5ca4ae687a3d46db', // random secret used as auth with XMLRPC 'cookie_life' => 60*60*24*7*4, // cookie life in seconds 'ping' => true, // enable automatic pinging of the micro.blog service + 'activitypub' => true, 'crosspost_to_twitter' => false, // set this to true to automatically crosspost to a twitter account (requires app credentials, see below) 'twitter' => array( // get your tokens over at https://dev.twitter.com/apps 'oauth_access_token' => '', @@ -36,8 +43,11 @@ $config = array( 'consumer_secret' => '' ), 'show_edits' => true, // displays the modification time of posts + 'subdir_install' => ($dir === '/') ? false : true, ); +unset($dir, $uri, $path_fragments, $path); + $config['xmlrpc'] = function_exists('xmlrpc_server_create'); $config['local_time_offset'] = date('P'); |