2020-11-29 01:55:31 +01:00
|
|
|
<?php
|
|
|
|
include "../common/config.inc.php";
|
|
|
|
|
2023-08-27 16:05:53 +02:00
|
|
|
ini_set('memory_limit', '1536M');
|
2020-11-29 01:55:31 +01:00
|
|
|
|
2023-08-27 16:05:53 +02:00
|
|
|
/*
|
|
|
|
* Config file name should be the basename
|
2020-11-29 01:55:31 +01:00
|
|
|
* of your path where you installed rslight
|
|
|
|
* plus .inc.php.
|
|
|
|
* So if installed in /var/www/html/rocksolid
|
|
|
|
* it's rocksolid.inc.php in $config_dir
|
|
|
|
*/
|
|
|
|
$config_name = basename(getcwd());
|
2023-08-27 16:05:53 +02:00
|
|
|
if (file_exists($config_dir . $config_name . '.inc.php')) {
|
|
|
|
$config_file = $config_dir . $config_name . '.inc.php';
|
2020-11-29 01:55:31 +01:00
|
|
|
} else {
|
2023-08-27 16:05:53 +02:00
|
|
|
$config_file = $config_dir . 'rslight.inc.php';
|
2020-11-29 01:55:31 +01:00
|
|
|
}
|
|
|
|
$installed_path = getcwd();
|
|
|
|
|
2023-08-27 16:05:53 +02:00
|
|
|
/*
|
|
|
|
* $config_path is a directory off the $config_dir
|
2020-11-29 01:55:31 +01:00
|
|
|
* where specific files such as groups.txt
|
|
|
|
* are located
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$config_path = $config_dir . $config_name . "/";
|
|
|
|
$script_path = $config_dir . "/scripts/";
|
|
|
|
$CONFIG = include ($config_file);
|
|
|
|
$OVERRIDES = include ($config_dir . '/overrides.inc.php');
|
2020-11-29 01:55:31 +01:00
|
|
|
|
2023-12-24 12:12:25 +01:00
|
|
|
// Spool directory size and minimum in Gigabytes
|
2023-12-24 14:49:34 +01:00
|
|
|
if ($OVERRIDES['min_spool_disk_space'] > 0) {
|
|
|
|
$min_spool_disk_space = $OVERRIDES['min_spool_disk_space'];
|
|
|
|
} else {
|
|
|
|
$min_spool_disk_space = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
$free_spool_disk_space = disk_free_space($spooldir) * 9.313E-10;
|
|
|
|
if ($free_spool_disk_space < $min_spool_disk_space) {
|
2023-12-24 12:12:25 +01:00
|
|
|
$low_spool_disk_space = true;
|
|
|
|
} else {
|
|
|
|
$low_spool_disk_space = false;
|
|
|
|
}
|
|
|
|
|
2023-08-27 16:05:53 +02:00
|
|
|
$logdir = $spooldir . '/log';
|
2023-09-16 18:54:46 +02:00
|
|
|
$debug_log = $logdir . '/debug.log';
|
2023-08-27 16:05:53 +02:00
|
|
|
$lockdir = $spooldir . '/lock';
|
|
|
|
$ssldir = $spooldir . '/ssl/';
|
|
|
|
$user_ban_file = $config_dir . '/banned_names.conf';
|
2020-11-29 01:55:31 +01:00
|
|
|
|
2024-03-08 18:27:35 +01:00
|
|
|
$grouplist_cache_filename = $spooldir . '/grouplist-cache.txt';
|
|
|
|
$grouplist_cache_time = 14400;
|
|
|
|
|
2020-11-29 01:55:31 +01:00
|
|
|
/* Permanent configuration changes */
|
2023-08-27 16:05:53 +02:00
|
|
|
@mkdir($logdir, 0755, 'recursive');
|
|
|
|
@mkdir($spooldir . '/upload', 0755, 'recursive');
|
|
|
|
chown($logdir, $CONFIG['webserver_user']);
|
|
|
|
chown($spooldir . '/upload', $CONFIG['webserver_user']);
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
date_default_timezone_set('UTC');
|
2023-08-27 16:05:53 +02:00
|
|
|
$overboard = true;
|
|
|
|
$spoolnews = true;
|
|
|
|
if (isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true) {
|
|
|
|
$server = $CONFIG['local_server'];
|
|
|
|
$port = $CONFIG['local_port'];
|
2020-11-29 01:55:31 +01:00
|
|
|
} else {
|
2023-08-27 16:05:53 +02:00
|
|
|
$server = $CONFIG['remote_server'];
|
|
|
|
$port = $CONFIG['remote_port'];
|
|
|
|
$CONFIG['server_auth_user'] = $CONFIG['remote_auth_user'];
|
|
|
|
$CONFIG['server_auth_pass'] = $CONFIG['remote_auth_pass'];
|
2020-11-29 01:55:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Frames (frames is not up to date and probably not so great)
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Set to true to use framed version of rslight
|
2023-08-27 16:05:53 +02:00
|
|
|
$frames_on = false;
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
// The default content for the left side 'menu' frame
|
2023-08-27 16:05:53 +02:00
|
|
|
$default_menu = "/rocksolid/index.php";
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
if (isset($frames_on) && $frames_on === true) {
|
2023-08-27 16:05:53 +02:00
|
|
|
$style_css = "style-frames.css";
|
|
|
|
$frame['content'] = "content";
|
|
|
|
$frame['menu'] = "menu";
|
|
|
|
$frame['header'] = "header";
|
2020-11-29 01:55:31 +01:00
|
|
|
} else {
|
2023-08-27 16:05:53 +02:00
|
|
|
$style_css = "style.css";
|
|
|
|
$frame['content'] = "_self";
|
|
|
|
$frame['menu'] = "_self";
|
|
|
|
$frame['header'] = "_self";
|
2020-11-29 01:55:31 +01:00
|
|
|
}
|
2023-08-27 16:05:53 +02:00
|
|
|
$frame_externallink = "_blank";
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* directories and files
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$imgdir = "img";
|
2020-11-29 01:55:31 +01:00
|
|
|
|
2023-08-27 16:05:53 +02:00
|
|
|
$file_newsportal = "newsportal.php";
|
|
|
|
$file_index = "index.php";
|
|
|
|
$file_thread = "thread.php";
|
|
|
|
$file_article = "article-flat.php";
|
|
|
|
$file_article_full = "article.php";
|
|
|
|
$file_attachment = "attachment.php";
|
|
|
|
$file_post = "post.php";
|
|
|
|
$file_cancel = "cancel.php";
|
|
|
|
$file_language = "lang/english.lang";
|
|
|
|
$file_footer = "footer.inc";
|
|
|
|
$file_groups = $config_path . "groups.txt";
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
$title = $CONFIG['title_full'];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Grouplist Layout
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$gl_age = true;
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Thread layout
|
|
|
|
*/
|
|
|
|
# When viewing a thread should the articles be sorted by subthreads, or
|
|
|
|
# simply by date, oldest to newest?
|
|
|
|
# Set to false to sort by date, true to sort into subthreads.
|
|
|
|
# Generally, false makes it easier to find the latest posts at the bottom.
|
2023-08-27 16:05:53 +02:00
|
|
|
$thread_articles = false;
|
|
|
|
|
|
|
|
$thread_treestyle = 7;
|
|
|
|
$thread_show["date"] = false;
|
|
|
|
$thread_show["subject"] = true;
|
|
|
|
$thread_show["author"] = true;
|
|
|
|
$thread_show["authorlink"] = false;
|
|
|
|
$thread_show["replies"] = false;
|
|
|
|
$thread_show["lastdate"] = true; // makes only sense with $thread_show["replies"]=false
|
|
|
|
$thread_show["threadsize"] = true;
|
|
|
|
$thread_show["latest"] = true;
|
2023-12-30 13:06:56 +01:00
|
|
|
$thread_maxSubject = 80;
|
2023-08-27 16:05:53 +02:00
|
|
|
$maxfetch = 1000;
|
|
|
|
$maxarticles = 0;
|
|
|
|
$maxarticles_extra = 0;
|
|
|
|
$age_count = 3;
|
|
|
|
$age_time[1] = 86400; // 24 hours
|
|
|
|
$age_color[1] = "red";
|
|
|
|
$age_time[2] = 259200; // 3 days
|
|
|
|
$age_color[2] = "darkgoldenrod";
|
|
|
|
$age_time[3] = 604800; // 7 days
|
|
|
|
$age_color[3] = "darkgreen";
|
|
|
|
$thread_sort_order = - 1;
|
|
|
|
$thread_sort_type = "thread";
|
|
|
|
$articles_per_page = 200;
|
|
|
|
$startpage = "first";
|
|
|
|
|
|
|
|
/*
|
|
|
|
* article layout
|
|
|
|
*/
|
|
|
|
$article_show["Subject"] = true;
|
|
|
|
$article_show["From"] = true;
|
|
|
|
$article_show["Newsgroups"] = true;
|
|
|
|
$article_show["Followup"] = true;
|
|
|
|
$article_show["Organization"] = true;
|
|
|
|
$article_show["Date"] = true;
|
|
|
|
$article_show["Message-ID"] = false;
|
|
|
|
$article_show["User-Agent"] = false;
|
|
|
|
$article_show["References"] = true;
|
|
|
|
$article_show["From_link"] = false;
|
|
|
|
$article_show["trigger_headers"] = true;
|
|
|
|
// $article_show["From_rewrite"]=array('@',' (at) ');
|
|
|
|
$article_showthread = true;
|
|
|
|
$article_graphicquotes = true;
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* settings for the article flat view, if used
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$articleflat_articles_per_page = 25;
|
|
|
|
$articleflat_chars_per_articles = 10000;
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Message posting
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$send_poster_host = false;
|
|
|
|
$testgroup = true; // don't disable unless you really know what you are doing!
|
|
|
|
$validate_email = 1;
|
|
|
|
$setcookies = true;
|
|
|
|
$anonym_address = "AnonUser@retrobbs.rocksolidbbs.com";
|
|
|
|
$msgid_generate = "md5";
|
|
|
|
$msgid_fqdn = $_SERVER["HTTP_HOST"];
|
|
|
|
$post_autoquote = false;
|
|
|
|
$post_captcha = false;
|
|
|
|
|
|
|
|
/*
|
2020-11-29 01:55:31 +01:00
|
|
|
* Attachments
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$attachment_show = true;
|
|
|
|
$attachment_delete_alternative = true; // delete non-text mutipart/alternative
|
|
|
|
$attachment_uudecode = true; // experimental!
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Security settings
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$block_xnoarchive = false;
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* User registration and database
|
|
|
|
*/
|
|
|
|
// $npreg_lib="lib/npreg.inc.php";
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Cache
|
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$cache_articles = false; // article cache, experimental!
|
|
|
|
$cache_index = 600; // cache the group index for ten minutes before reloading
|
|
|
|
$cache_thread = 60; // cache the thread for one minute reloading
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
2023-08-27 16:05:53 +02:00
|
|
|
* Misc
|
2020-11-29 01:55:31 +01:00
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
$cutsignature = true;
|
|
|
|
$compress_spoolfiles = false;
|
2020-11-29 01:55:31 +01:00
|
|
|
|
2023-08-27 16:05:53 +02:00
|
|
|
if (isset($spoolnews) && ($spoolnews === true)) {
|
|
|
|
$spoolpath = $spooldir . "/articles/";
|
|
|
|
$localeol = PHP_EOL . PHP_EOL;
|
2020-11-29 01:55:31 +01:00
|
|
|
} else {
|
|
|
|
$spoolpath = "/var/spool/news/articles/";
|
2023-08-27 16:05:53 +02:00
|
|
|
$localeol = "\r\n\r\n";
|
2020-11-29 01:55:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// website charset, "koi8-r" for example
|
2023-08-27 16:05:53 +02:00
|
|
|
// $www_charset = "iso-8859-15";
|
2020-11-29 01:55:31 +01:00
|
|
|
$www_charset = "utf-8";
|
|
|
|
// Use the iconv extension for improved charset conversions
|
2023-08-27 16:05:53 +02:00
|
|
|
$iconv_enable = true;
|
2020-11-29 01:55:31 +01:00
|
|
|
/*
|
2023-08-27 16:05:53 +02:00
|
|
|
* Group specific config
|
2020-11-29 01:55:31 +01:00
|
|
|
*/
|
2023-08-27 16:05:53 +02:00
|
|
|
// $group_config=array(
|
|
|
|
// '^de\.alt\.fan\.aldi$' => "aldi.inc",
|
|
|
|
// '^de\.' => "german.inc"
|
|
|
|
// );
|
2020-11-29 01:55:31 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Do not edit anything below this line
|
|
|
|
*/
|
|
|
|
// Load group specifig config files
|
2023-08-27 16:05:53 +02:00
|
|
|
if ((isset($group)) && (isset($group_config))) {
|
|
|
|
foreach ($group_config as $key => $value) {
|
|
|
|
if (ereg($key, $group)) {
|
|
|
|
include $value;
|
|
|
|
break;
|
|
|
|
}
|
2020-11-29 01:55:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// load the english language definitions first because some of the other
|
|
|
|
// definitions are incomplete
|
2023-08-27 16:05:53 +02:00
|
|
|
include ("lang/english.lang");
|
2024-03-02 04:03:16 +01:00
|
|
|
include ($file_language);
|