nixos-config/hosts/france/forum-config/config.php.nix

105 lines
6.8 KiB
Nix

{ config }:
''
<?php if (!defined("APPLICATION")) exit();
// Database defaults.
$Configuration["Database"]["Engine"] = "MySQL";
$Configuration["Database"]["Host"] = "${config.database-host}";
$Configuration["Database"]["Name"] = "${config.database-name}";
$Configuration["Database"]["User"] = "${config.database-user}";
$Configuration["Database"]["Password"] = readfile("${config.database-password-file}");
// Site specifics.
$Configuration["Garden"]["Installed"] = false; // Has Garden been installed yet? This blocks setup when true.
$Configuration["Garden"]["Title"] = "${config.site-name}";
$Configuration["Garden"]["Domain"] = "${config.site-domain}";
$Configuration["Garden"]["PrivateCommunity"] = true;
// User registration & authentication.
$Configuration["Garden"]["Session"]["Length"] = "60 minutes";
$Configuration["Garden"]["Cookie"]["Name"] = "Selby Forum";
$Configuration["Garden"]["Registration"]["Method"] = "Approval"; // Options are: Basic, Captcha, Approval, Invitatino
$Configuration["Garden"]["Registration"]["ConfirmEmail"] = true;
$Configuration["Garden"]["Registration"]["MinPasswordLength"] = 8;
$Configuration["Garden"]["Registration"]["NameUnique"] = true;
$Configuration["Garden"]["Password"]["MinLength"] = 6;
// Outgoing email.
$Configuration["Garden"]["Email"]["UseSmtp"] = true;
$Configuration["Garden"]["Email"]["SmtpHost"] = "${config.smtp-host}";
$Configuration["Garden"]["Email"]["SmtpUser"] = "${config.smtp-user}";
$Configuration["Garden"]["Email"]["SmtpPassword"] = readfile("${config.smtp-password-file}");
$Configuration["Garden"]["Email"]["SmtpPort"] = "25";
$Configuration["Garden"]["Email"]["SmtpSecurity"] = "tls"; // ssl/tls
$Configuration["Garden"]["Email"]["MimeType"] = "text/plain";
$Configuration["Garden"]["Email"]["SupportName"] = "Selby Forum";
$Configuration["Garden"]["Email"]["SupportAddress"] = "forum@selby.ca";
// File handling.
$Configuration["Garden"]["CanProcessImages"] = true;
$Configuration["Garden"]["Upload"]["MaxFileSize"] = "50M";
$Configuration["Garden"]["Upload"]["AllowedFileExtensions"] = [
"txt", "jpg", "jpeg", "gif", "png", "bmp", "tiff", "ico", "zip", "gz", "tar.gz", "tgz", "psd", "ai", "pdf", "doc", "xls", "ppt", "docx", "xlsx", "pptx", "log", "rar", "7z"
];
$Configuration["Garden"]["Profile"]["MaxHeight"] = 560;
$Configuration["Garden"]["Profile"]["MaxWidth"] = 560;
$Configuration["Garden"]["Thumbnail"]["Size"] = 200;
// Appearance.
$Configuration["Garden"]["Theme"] = "keystone";
$Configuration["Garden"]["MobileTheme"] = "mobile";
$Configuration["Garden"]["Menu"]["Sort"] = ["Dashboard", "Discussions", "Questions", "Activity", "Applicants", "Conversations", "User"];
$Configuration["Garden"]["ThemeOptions"]["Styles"]["Key"] = "Default";
$Configuration["Garden"]["ThemeOptions"]["Styles"]["Value"] = "%s_default";
// Profiles.
$Configuration["Garden"]["Profile"]["Public"]= true;
$Configuration["Garden"]["Profile"]["ShowAbout"] = true;
$Configuration["Garden"]["Profile"]["EditPhotos"] = true; // false to disable user photo editing
$Configuration["Garden"]["Profile"]["EditUsernames"] = false;
$Configuration["Garden"]["BannedPhoto"] = "https://images.v-cdn.net/banned_large.png";
// Embedding forum & comments.
$Configuration["Garden"]["Embed"]["CommentsPerPage"] = 50;
$Configuration["Garden"]["Embed"]["SortComments"] = "desc";
$Configuration["Garden"]["Embed"]["PageToForum"] = true;
$Configuration["Garden"]["SignIn"]["Popup"] = true; // Should the sign-in link pop up or go to it"s own page? (SSO requires going to it"s own external page)
// User experience & formatting.
$Configuration["Garden"]["InputFormatter"] = "Rich"; // Html, BBCode, Markdown, Text, Rich
$Configuration["Garden"]["MobileInputFormatter"] = "Rich";
$Configuration["Garden"]["Html"]["AllowedElements"] = "a, abbr, acronym, address, area, audio, b, bdi, bdo, big, blockquote, br, caption, center, cite, code, col, colgroup, dd, del, details, dfn, div, dl, dt, em, figure, figcaption, font, h1, h2, h3, h4, h5, h6, hgroup, hr, i, img, ins, kbd, li, map, mark, menu, meter, ol, p, pre, q, s, samp, small, span, strike, strong, sub, sup, summary, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video, wbr";
$Configuration["Garden"]["Search"]["Mode"] = "boolean"; // matchboolean, match, boolean, like
$Configuration["Garden"]["EditContentTimeout"] = 3600; // -1 means no timeout. 0 means immediate timeout. > 0 is in seconds. 60 * 60 = 3600 (aka 1hr)
$Configuration["Garden"]["Format"]["Mentions"] = true;
$Configuration["Garden"]["Format"]["Hashtags"] = false;
$Configuration["Garden"]["Format"]["YouTube"] = true;
$Configuration["Garden"]["Format"]["Vimeo"] = true;
$Configuration["Garden"]["Format"]["EmbedSize"] = "normal"; // tiny/small/normal/big/huge or WIDTHxHEIGHT
// Module visibility and sorting.
$Configuration["Garden"]["Modules"]["ShowGuestModule"] = true;
$Configuration["Garden"]["Modules"]["ShowSignedInModule"] = false;
$Configuration["Garden"]["Modules"]["ShowRecentUserModule"] = false;
$Configuration["Modules"]["Dashboard"]["Panel"] = ["MeModule", "UserBoxModule", "ActivityFilterModule", "UserPhotoModule", "ProfileFilterModule", "SideMenuModule", "UserInfoModule", "GuestModule", "Ads"];
$Configuration["Modules"]["Dashboard"]["Content"] = ["MessageModule", "MeModule", "UserBoxModule", "ProfileOptionsModule", "Notices", "ActivityFilterModule", "ProfileFilterModule", "Content", "Ads"];
$Configuration["Modules"]["Vanilla"]["Panel"] = ["MeModule", "UserBoxModule", "GuestModule", "NewDiscussionModule", "DiscussionFilterModule", "SignedInModule", "Ads"];
$Configuration["Modules"]["Vanilla"]["Content"] = ["MessageModule", "MeModule", "UserBoxModule", "NewDiscussionModule", "ProfileOptionsModule", "Notices", "NewConversationModule", "NewDiscussionModule", "DiscussionFilterModule", "CategoryModeratorsModule", "Content", "Ads"];
$Configuration["Modules"]["Conversations"]["Panel"] = ["MeModule", "UserBoxModule", "NewConversationModule", "SignedInModule", "GuestModule", "Ads"];
$Configuration["Modules"]["Conversations"]["Content"] = ["MessageModule", "MeModule", "UserBoxModule", "NewConversationModule", "Notices", "Content", "Ads"];
// Routes.
$Configuration["Routes"]["DefaultController"] = "discussions";
$Configuration["Routes"]["DefaultForumRoot"] = "discussions";
$Configuration["Routes"]["Default404"] = ["dashboard/home/filenotfound", "NotFound"];
$Configuration["Routes"]["DefaultPermission"] = ["dashboard/home/unauthorized", "NotAuthorized"];
$Configuration["Routes"]["UpdateMode"] = "dashboard/home/updatemode";
// Cache.
$Configuration['Cache']['Enabled'] = true;
$Configuration['Cache']['Method'] = 'memcached';
$Configuration['Cache']['Filecache']['Store'] = PATH_CACHE.'/Filecache';
$Configuration['memcached']['Store'] = '${config.memcached-server}';
''