2020-08-30 23:35:42 +00:00
< ? php
/*
* Instance Configuration
* ----------------------
* Edit this file and not config . php for imageboard configuration .
*
* You can copy values from config . php ( defaults ) and paste them here .
2020-12-24 00:16:53 +00:00
*/
2020-08-30 23:35:42 +00:00
2020-12-24 00:16:53 +00:00
/*
* Front page configurations .
*/
2020-12-30 08:39:19 +00:00
$config [ 'boards' ] = array (
2023-09-21 19:19:03 +00:00
array (
'leftypol' ,
'b' ,
'WRK' ,
'hobby' ,
'tech' ,
'edu' ,
'ga' ,
'ent' ,
'777' ,
'posad' ,
'i' ,
'a' ,
'R9K' ,
'dead'
),
array ( 'meta' )
2020-12-30 08:39:19 +00:00
);
2021-01-09 23:01:44 +00:00
$config [ 'prepended_foreign_boards' ] = array (
2021-01-11 16:36:29 +00:00
'overboard' => '/overboard/' ,
2021-06-20 17:40:00 +00:00
'sfw' => '/sfw/' ,
'alt' => '/alt/' ,
2021-08-18 05:40:01 +00:00
'cytube' => 'https://tv.leftychan.net/'
2021-01-09 23:01:44 +00:00
);
2020-12-30 08:39:19 +00:00
// Board categories. Only used in the "Categories" theme.
$config [ 'categories' ] = array (
2024-03-17 21:39:59 +00:00
'Boards' => array (
2023-09-21 19:19:03 +00:00
'leftypol' ,
'b' ,
'WRK' ,
'hobby' ,
'tech' ,
'edu' ,
'ga' ,
'ent' ,
'777' ,
'posad' ,
'i' ,
'a' ,
'R9K' ,
'dead'
),
'Meta' => array ( 'meta' )
2020-12-30 08:39:19 +00:00
);
// Optional for the Categories theme. This is an array of name => (title, url) groups for categories
// with non-board links.
$config [ 'custom_categories' ] = array (
'Links' => array (
'New Multitude' => 'https://newmultitude.org/' ,
'Booru image repository' => 'https://lefty.booru.org/' ,
'Leftypedia' => 'https://leftypedia.org/' ,
2024-01-24 18:23:52 +00:00
'Official chat room' => 'https://talk.leftychan.net/#/room/#welcome:matrix.leftychan.net' ,
2023-12-14 21:44:24 +00:00
'Gitea instance' => 'https://git.leftychan.net' ,
2024-02-12 11:27:06 +00:00
'Rules' => 'rules.html' ,
'Search' => 'search.php' ,
2020-12-30 08:39:19 +00:00
),
'Learning resources and blogs' => array (
'Michael Roberts\' blog' => 'https://thenextrecession.wordpress.com/' ,
'A Critique Of Crisis Theory blog' => 'https://critiqueofcrisistheory.wordpress.com/' ,
'Leftypedia' => 'https://leftypedia.org/' ,
2021-01-18 02:42:23 +00:00
'Marxist Internet Archive' => 'https://www.marxists.org/'
2020-12-30 08:39:19 +00:00
),
);
2020-12-24 00:16:53 +00:00
/*
* Database and site wide configurations
*/
2020-08-30 23:35:42 +00:00
2020-12-24 19:51:44 +00:00
$config [ 'db' ][ 'server' ] = 'localhost' ;
$config [ 'db' ][ 'database' ] = 'lainchan' ;
$config [ 'db' ][ 'prefix' ] = '' ;
$config [ 'db' ][ 'user' ] = 'lainchan' ;
$config [ 'db' ][ 'password' ] = '' ;
$config [ 'cookies' ][ 'mod' ] = 'mod' ;
$config [ 'cookies' ][ 'salt' ] = 'MGYwNjhlNjU5Y2QxNWU3YjQ3MzQ1Yj' ;
2021-04-15 02:55:10 +00:00
$config [ 'search' ][ 'enable' ] = true ;
2023-09-21 19:19:03 +00:00
$config [ 'flood_cache' ] = 60 * 15 ; // 15 minutes. The oldest a post can be in the flood table
2024-01-28 16:41:29 +00:00
$config [ 'flood_time_any' ] = 120 ; // time between thread creation
2023-09-25 17:49:33 +00:00
$config [ 'flood_time' ] = 1 ;
2023-09-21 19:19:03 +00:00
$config [ 'flood_time_ip' ] = 10 ;
$config [ 'flood_time_same' ] = 60 ;
2021-08-26 21:12:17 +00:00
$config [ 'max_body' ] = 80000 ;
$config [ 'reply_limit' ] = 600 ;
2020-12-24 19:51:44 +00:00
$config [ 'max_links' ] = 40 ;
$config [ 'max_filesize' ] = 52428800 ;
$config [ 'thumb_width' ] = 255 ;
$config [ 'thumb_height' ] = 255 ;
$config [ 'max_width' ] = 10000 ;
$config [ 'max_height' ] = 10000 ;
$config [ 'threads_per_page' ] = 10 ;
$config [ 'max_pages' ] = 36 ;
$config [ 'threads_preview' ] = 5 ;
$config [ 'root' ] = '/' ;
$config [ 'secure_trip_salt' ] = 'ODQ2NDM0ODlmMmRhNzk2M2EyNjJlOW' ;
2020-12-27 22:50:31 +00:00
2021-07-10 03:37:31 +00:00
$config [ 'strip_combining_chars' ] = true ;
// Maximum number of combining characters in a row allowed so that they can still be used in moderation.
$config [ 'max_combining_chars' ] = 3 ;
2021-01-09 22:11:28 +00:00
//Banners
$config [ 'url_banner' ] = '/banners.php' ;
2021-07-10 23:30:02 +00:00
// Fixed size prevents things moving as page loads
$config [ 'banner_width' ] = 300 ;
$config [ 'banner_height' ] = 100 ;
2021-01-09 22:11:28 +00:00
2021-06-30 06:42:49 +00:00
//Logo location for themes
$config [ 'logo' ] = 'static/leftypol_logo.png' ;
2021-06-23 05:53:51 +00:00
//Date format
$config [ 'post_date' ] = '%F (%a) %T' ;
2021-06-23 22:46:23 +00:00
$config [ 'thread_subject_in_title' ] = true ;
2024-06-11 22:44:18 +00:00
$config [ 'spam' ][ 'enabled' ] = true ;
2023-09-25 02:21:24 +00:00
$config [ 'spam_noticer' ][ 'enabled' ] = true ;
2023-08-31 14:11:52 +00:00
$config [ 'spam_noticer' ][ 'base_url' ] = 'http://localhost:8300' ;
2023-09-21 19:19:03 +00:00
$config [ 'spam_noticer' ][ 'ui_url' ] = 'https://spamnoticer.leftychan.net/static/index.html' ;
$config [ 'spam_noticer' ][ 'imageboard_root' ] = 'http://leftychan.net/' ;
$config [ 'spam_noticer' ][ 'website_name' ] = " leftychan " ;
2021-01-04 06:12:42 +00:00
2021-05-05 12:29:06 +00:00
/*
* Basic captcha . See also : captchaconfig . php
*/
2024-05-08 21:15:48 +00:00
$config [ 'securimage' ] = true ;
$config [ 'captcha_tor_only' ] = true ;
2021-05-05 12:29:06 +00:00
2020-12-27 23:23:33 +00:00
/*
* Permissions
*/
2020-12-27 20:43:50 +00:00
$config [ 'mod' ][ 'move' ] = MOD ;
2020-12-27 22:50:31 +00:00
$config [ 'mod' ][ 'editpost' ] = MOD ;
2020-12-27 23:23:33 +00:00
// Raw HTML posting
$config [ 'mod' ][ 'rawhtml' ] = MOD ;
2021-01-10 00:14:33 +00:00
$config [ 'mod' ][ 'mod_board_log' ] = MOD ;
2021-01-18 02:42:23 +00:00
$config [ 'mod' ][ 'ip_recentposts' ] = 350 ;
2020-12-24 19:51:44 +00:00
2021-04-01 04:07:01 +00:00
// Post news entries
$config [ 'mod' ][ 'news' ] = MOD ;
// Custom name when posting news
$config [ 'mod' ][ 'news_custom' ] = MOD ;
// Delete news entries
$config [ 'mod' ][ 'news_delete' ] = MOD ;
2021-04-01 04:15:59 +00:00
// Number of news entries to display per page.
$config [ 'mod' ][ 'news_page' ] = 5 ;
2021-04-01 04:07:01 +00:00
2021-01-18 03:31:06 +00:00
// Allow everyone to see bumplocks
$config [ 'mod' ][ 'view_bumplock' ] = - 1 ;
2021-01-10 01:24:53 +00:00
$config [ 'allow_thread_deletion' ] = false ;
2020-12-27 17:21:39 +00:00
// Max attachments per post
$config [ 'max_images' ] = 5 ;
2020-12-27 20:16:39 +00:00
$config [ 'image_reject_repost' ] = false ;
2020-12-27 17:21:39 +00:00
2020-12-24 19:51:44 +00:00
$config [ 'thumb_method' ] = 'gm+gifsicle' ;
2021-08-21 22:47:29 +00:00
$config [ 'thumb_ext' ] = 'png' ;
2020-12-24 19:51:44 +00:00
$config [ 'gnu_md5' ] = '1' ;
2021-01-18 09:18:42 +00:00
// Strip EXIF metadata from JPEG files.
$config [ 'strip_exif' ] = true ;
// Use the command-line `exiftool` tool to strip EXIF metadata without decompressing/recompressing JPEGs.
$config [ 'use_exiftool' ] = true ;
2020-12-24 19:51:44 +00:00
// $config['update_on_posts'] = true;
2020-12-25 22:10:50 +00:00
$config [ 'referer_match' ] = false ;
2020-12-24 00:16:53 +00:00
2020-12-26 02:04:43 +00:00
$config [ 'allowed_ext' ][] = 'mp4' ;
$config [ 'allowed_ext' ][] = 'webm' ;
$config [ 'allowed_ext_files' ][] = 'webm' ;
$config [ 'webm' ][ 'use_ffmpeg' ] = true ;
2021-02-20 22:44:16 +00:00
$config [ 'max_filesize' ] = 80 * 1024 * 1024 ; // 50MB
2020-12-26 02:04:43 +00:00
$config [ 'webm' ][ 'allow_audio' ] = true ;
2021-02-20 22:44:16 +00:00
$config [ 'webm' ][ 'max_length' ] = 7200 ;
2020-12-26 02:04:43 +00:00
2021-01-09 21:08:24 +00:00
$config [ 'pdf_file_thumbnail' ] = true ;
$config [ 'djvu_file_thumbnail' ] = true ;
2020-12-26 02:04:43 +00:00
// Allowed image file extensions.
$config [ 'allowed_ext' ][] = 'jpg' ;
$config [ 'allowed_ext' ][] = 'jpeg' ;
$config [ 'allowed_ext' ][] = 'bmp' ;
$config [ 'allowed_ext' ][] = 'gif' ;
$config [ 'allowed_ext' ][] = 'png' ;
2021-01-03 09:50:06 +00:00
$config [ 'allowed_ext_files' ][] = 'mp3' ;
2020-12-26 02:04:43 +00:00
$config [ 'allowed_ext_files' ][] = 'mp4' ;
$config [ 'allowed_ext_files' ][] = 'pdf' ;
$config [ 'allowed_ext_files' ][] = 'txt' ;
$config [ 'allowed_ext_files' ][] = 'epub' ;
2023-08-13 03:20:18 +00:00
$config [ 'allowed_ext_files' ][] = 'djvu' ;
2024-05-02 21:06:07 +00:00
$config [ 'allowed_ext_files' ][] = 'opus' ;
2021-01-18 04:57:46 +00:00
// Compressed files
$config [ 'allowed_ext_files' ][] = 'zip' ;
$config [ 'allowed_ext_files' ][] = 'gz' ;
$config [ 'allowed_ext_files' ][] = 'bz2' ;
2023-08-13 03:20:18 +00:00
$config [ 'allowed_ext_files' ][] = 'xz' ;
2020-12-26 02:04:43 +00:00
2020-12-30 00:55:38 +00:00
/*
* Flags
*/
$config [ 'country_flags_condensed' ] = false ;
$config [ 'user_flag' ] = true ;
2021-05-06 00:28:25 +00:00
$config [ 'flag_style' ] = 'width:auto;max-height:16px;' ;
2020-12-30 00:55:38 +00:00
$config [ 'user_flags' ] = array (
2020-12-30 01:32:42 +00:00
'4th_international' => '4th International' ,
'acceleration' => 'Acceleration' ,
'ak-47' => 'AK-47' ,
'albania' => 'Albania' ,
'allende' => 'Allende' ,
'anarcha-feminism' => 'Anarcha-Feminism' ,
'anarchism' => 'Anarchism' ,
'anarcho-capitalism' => 'Anarcho-Capitalism' ,
'anarcho-communism' => 'Anarcho-Communism' ,
'anarcho-nihilism' => 'Anarcho-Nihilism' ,
'anarcho-primitivism' => 'Anarcho-Primitivism' ,
2021-03-04 20:52:44 +00:00
'antifa' => 'Antifa' ,
2021-04-25 04:47:26 +00:00
'armchair' => 'Armchair' ,
2021-05-31 13:14:07 +00:00
'atheism' => 'Atheism' ,
2020-12-30 01:32:42 +00:00
'bolshevik' => 'Bolshevik' ,
'brocialism' => 'Brocialism' ,
'burkina_faso' => 'Burkina Faso' ,
2020-12-31 05:55:19 +00:00
'ca' => 'Canadien' ,
2021-04-25 04:47:26 +00:00
'carlism' => 'Carlism' ,
2020-12-30 01:32:42 +00:00
'chavismo' => 'Chavismo' ,
'che' => 'Che' ,
'china' => 'China' ,
2021-03-04 20:52:44 +00:00
'christian_anarchism' => 'Christian Anarchism' ,
2020-12-30 01:32:42 +00:00
'christian_communism' => 'Christian Communism' ,
'cockshott' => 'Cockshott' ,
2021-03-04 20:52:44 +00:00
'council_communism' => 'Council Communism' ,
2020-12-30 01:32:42 +00:00
'cuba' => 'Cuba' ,
'ddr' => 'DDR' ,
'democrap' => 'Democrap' ,
'democratic_socialism' => 'Democratic Socialism' ,
2021-04-25 04:47:26 +00:00
'directx' => 'Direct X' ,
2020-12-30 01:32:42 +00:00
'dprk' => 'DPRK' ,
2021-04-25 04:47:26 +00:00
'egalitarianism' => 'Egalitarianism' ,
2021-03-04 20:52:44 +00:00
'egoism' => 'Egoism' ,
2021-05-31 13:13:16 +00:00
'eristocracy' => 'Έριστοκρατία' ,
2021-03-04 20:52:44 +00:00
'eureka' => 'Eureka' ,
2020-12-30 01:32:42 +00:00
'eurocommunism' => 'Eurocommunism' ,
2020-12-31 05:55:19 +00:00
'farc' => 'Las FARC' ,
2020-12-30 01:32:42 +00:00
'fed' => 'Fed' ,
2021-03-04 20:52:44 +00:00
'flq' => 'Front de libération du Québec' ,
2020-12-30 01:32:42 +00:00
'freud' => 'Freud' ,
'gadsden' => 'Gadsden' ,
'gay_nazi' => 'Gay Nazi' ,
'gentoo' => 'Gentoo' ,
'gorro' => 'Gorro' ,
'groucho_marxism' => 'Groucho Marxism' ,
'hammer_&_sickle' => 'Hammer & Sickle' ,
'international_brigade' => 'International Brigade' ,
'ira' => 'IRA' ,
'islamic_communism' => 'Islamic Communism' ,
'iww' => 'IWW' ,
'juche' => 'Juche' ,
'kampuchea' => 'Kampuchea' ,
'left_communism' => 'Left Communism' ,
'lenin_cap' => 'Lenin Cap' ,
2021-04-25 04:47:26 +00:00
'luck_o_the_irish' => 'Luck O\' The Irish' ,
2020-12-30 01:32:42 +00:00
'luxemburg' => 'Luxemburg' ,
'marx' => 'Marx' ,
2024-04-09 07:41:21 +00:00
'marxism_blackpilism' => 'Marxism Blackpillism' ,
2020-12-30 01:32:42 +00:00
'mutualism' => 'Mutualism' ,
'naxalite' => 'Naxalite' ,
'nazbol' => 'Nazbol' ,
'nazi' => 'Nazi' ,
'ndfp' => 'NDFP' ,
'palestine' => 'Palestine' ,
'pan-africanism' => 'Pan-Africanism' ,
2021-07-04 22:52:00 +00:00
'cenzopapa' => 'Papież' ,
2021-04-25 04:47:26 +00:00
'phrygian_cap' => 'Phrygian Cap' ,
2020-12-30 01:32:42 +00:00
'pirate' => 'Pirate' ,
'porky' => 'Porky' ,
'posadas' => 'Posadas' ,
'punk' => 'Punk' ,
'raised_fist' => 'Raised Fist' ,
'read_a_fucking_book' => 'Read a Fucking Book' ,
'rethuglican' => 'Rethuglican' ,
'sabo-tabby' => 'Sabo-Tabby' ,
'sandinista' => 'Sandinista' ,
'sendero_luminoso' => 'Sendero Luminoso' ,
'slavoj' => 'Slavoj' ,
2021-04-25 04:47:26 +00:00
'snibeti_snab' => 'Snibeti Snab' ,
2020-12-30 01:32:42 +00:00
'socialism' => 'Socialism' ,
'soviet_union' => 'Soviet Union' ,
'spurdo' => 'Spurdo' ,
'ssnp' => 'SSNP' ,
'stalin' => 'Stalin' ,
'syndicalism' => 'Syndicalism' ,
'tankie' => 'Tankie' ,
2021-04-25 04:47:26 +00:00
'technocracy' => 'Technocracy' ,
2020-12-30 01:32:42 +00:00
'think' => 'Think' ,
2021-04-25 04:47:26 +00:00
'transhumanism' => 'Transhumanism' ,
2020-12-31 05:55:19 +00:00
'united_farm_workers' => 'United Farm Workers' ,
2020-12-30 01:32:42 +00:00
'viet_cong' => 'Viet Cong' ,
2021-04-25 04:47:26 +00:00
'ypg' => 'YPG' ,
2024-04-09 07:41:21 +00:00
'yugoslavia' => 'Yugoslavia'
2020-12-30 00:55:38 +00:00
);
2020-12-24 00:16:53 +00:00
// Changes made via web editor by "krates" @ Tue, 22 Dec 2020 16:28:45 -0800:
$config [ 'robot_mute' ] = false ;
// Changes made via web editor by "krates" @ Tue, 22 Dec 2020 16:29:57 -0800:
$config [ 'max_links' ] = 100 ;
// Changes made via web editor by "krates" @ Tue, 22 Dec 2020 16:34:13 -0800:
$config [ 'min_body' ] = 0 ;
// Changes made via web editor by "krates" @ Tue, 22 Dec 2020 16:37:13 -0800:
$config [ 'anti_bump_flood' ] = true ;
// Changes made via web editor by "krates" @ Tue, 22 Dec 2020 16:38:21 -0800:
$config [ 'delete_time' ] = 5 ;
// Changes made via web editor by "krates" @ Tue, 22 Dec 2020 17:20:14 -0800:
$config [ 'reply_hard_limit' ] = 1000 ;
2020-12-25 22:07:47 +00:00
//Changes by Barbara_Pitt
$config [ 'stylesheets' ][ 'Dark' ] = 'dark.css' ;
$config [ 'stylesheets' ][ 'Dark Red' ] = 'dark_red.css' ;
$config [ 'always_noko' ] = true ;
2020-12-26 22:04:39 +00:00
$config [ 'spoiler_images' ] = true ;
2020-12-24 00:16:53 +00:00
2021-02-20 22:46:03 +00:00
//Changes made by Coma
$config [ 'markup_code' ] = ( " / \ [code \ ](.*?) \ [ \ /code \ ]/is " );
2020-12-26 09:47:17 +00:00
//more themes (issue#26)
$config [ 'stylesheets' ][ 'Burichan' ] = 'burichan.css' ;
$config [ 'stylesheets' ][ 'Futaba' ] = 'futaba.css' ;
$config [ 'stylesheets' ][ 'Gentoochan' ] = 'gentoochan.css' ;
$config [ 'stylesheets' ][ 'Gurochan' ] = 'gurochan.css' ;
$config [ 'stylesheets' ][ 'Jungle' ] = 'jungle.css' ;
$config [ 'stylesheets' ][ 'LainchanJP' ] = 'lainchanjp.css' ;
$config [ 'stylesheets' ][ 'Miku' ] = 'miku.css' ;
$config [ 'stylesheets' ][ 'Notsuba' ] = 'notsuba.css' ;
$config [ 'stylesheets' ][ 'Photon' ] = 'photon.css' ;
$config [ 'stylesheets' ][ 'Szalet' ] = 'szalet.css' ;
$config [ 'stylesheets' ][ 'Tsuki' ] = 'tsuki.css' ;
2021-01-17 21:10:56 +00:00
$config [ 'stylesheets' ][ 'DemainLight' ] = 'demain_light.css' ;
$config [ 'stylesheets' ][ 'DemainDark' ] = 'demain_dark.css' ;
$config [ 'stylesheets' ][ 'TempDark' ] = 'temp_dark.css' ;
$config [ 'stylesheets' ][ 'TempDarkRed' ] = 'temp_dark_red.css' ;
$config [ 'stylesheets' ][ 'AnonsDarkRed' ] = 'anons_dark_red.css' ;
2021-01-17 21:17:37 +00:00
$config [ 'stylesheets' ][ 'BunkerLike' ] = 'bunker_like.css' ;
2021-06-23 21:49:47 +00:00
$config [ 'stylesheets' ][ 'Post-Left' ] = 'dead.css' ;
2020-12-26 09:47:17 +00:00
2022-04-30 21:47:11 +00:00
$config [ 'default_stylesheet' ] = array ( 'Yotsuba' , 'bunker_like.css' );
2020-12-24 00:16:53 +00:00
/*
* ====================
* Javascript
* ====================
*/
2021-07-09 09:35:09 +00:00
$config [ 'deferred_javascript' ] = true ;
2021-07-11 10:46:26 +00:00
$config [ 'additional_javascript' ][] = 'js/jquery.min.js' ;
2021-07-11 12:00:03 +00:00
$config [ 'additional_javascript' ][] = 'js/jquery-ui.custom.min.js' ;
2021-08-26 21:12:17 +00:00
$config [ 'additional_javascript' ][] = 'js/jquery.mixitup.min.js' ;
$config [ 'additional_javascript' ][] = 'js/inline-expanding.js' ; // for catalog page
2021-07-11 10:46:26 +00:00
$config [ 'additional_javascript' ][] = 'js/ajax.js' ;
2021-07-11 12:00:03 +00:00
$config [ 'additional_javascript' ][] = 'js/quick-reply.js' ;
$config [ 'additional_javascript' ][] = 'js/post-hover.js' ;
2021-07-11 10:46:26 +00:00
$config [ 'additional_javascript' ][] = 'js/post-menu.js' ;
$config [ 'additional_javascript' ][] = 'js/hide-images.js' ;
$config [ 'additional_javascript' ][] = 'js/show-backlinks.js' ;
$config [ 'additional_javascript' ][] = 'js/show-op.js' ;
$config [ 'additional_javascript' ][] = 'js/show-own-posts.js' ;
$config [ 'additional_javascript' ][] = 'js/post-filter.js' ;
$config [ 'additional_javascript' ][] = 'js/strftime.min.js' ;
$config [ 'additional_javascript' ][] = 'js/local-time.js' ;
$config [ 'additional_javascript' ][] = 'js/save-user_flag.js' ;
$config [ 'additional_javascript' ][] = 'js/auto-scroll.js' ;
$config [ 'additional_javascript' ][] = 'js/options.js' ;
$config [ 'additional_javascript' ][] = 'js/options/general.js' ;
$config [ 'additional_javascript' ][] = 'js/options/user-css.js' ;
$config [ 'additional_javascript' ][] = 'js/options/user-js.js' ;
$config [ 'additional_javascript' ][] = 'js/flag-preview.js' ;
$config [ 'additional_javascript' ][] = 'js/file-selector.js' ;
2021-07-09 09:35:09 +00:00
$config [ 'additional_javascript_defer' ][] = 'js/image-hover.js' ;
2021-07-11 10:46:26 +00:00
$config [ 'additional_javascript' ][] = 'js/gallery-view.js' ;
2021-08-26 21:12:17 +00:00
$config [ 'additional_javascript' ][] = 'js/catalog-search.js' ; // for catalog page
$config [ 'additional_javascript' ][] = 'js/catalog.js' ; // for catalog page
2021-07-09 09:35:09 +00:00
$config [ 'additional_javascript_defer' ][] = 'js/thread-watcher.js' ;
$config [ 'additional_javascript_defer' ][] = 'js/expand.js' ;
$config [ 'additional_javascript_defer' ][] = 'js/webm-settings.js' ;
$config [ 'additional_javascript_defer' ][] = 'js/expand-video.js' ;
2024-02-20 18:32:57 +00:00
// New LCN scripts
$config [ 'additional_javascript' ][] = 'js/lcn/utils.js' ;
$config [ 'additional_javascript' ][] = 'js/lcn/classes.js' ;
2024-02-25 22:24:10 +00:00
$config [ 'additional_javascript' ][] = 'js/lcn/thread_autoupdater.js' ;
2024-02-20 18:32:57 +00:00
2021-08-26 21:12:17 +00:00
$config [ 'additional_javascript_compile' ] = true ;
$config [ 'minify_js' ] = true ;
2021-05-31 19:30:44 +00:00
$config [ 'flag_preview' ] = true ;
2020-12-24 19:51:44 +00:00
$config [ 'enable_embedding' ] = true ;
2020-12-24 00:16:53 +00:00
2021-04-03 02:06:42 +00:00
$config [ 'youtube_js_html' ]
= '<div class="video-container" data-video="$2">'
. '<a href="https://youtu.be/$2" target="_blank" class="file">'
. '<img style="width:255px;height:190px;" src="/vi/$2/0.jpg" class="post-image"/>'
. '</a></div>' ;
2020-12-24 19:51:44 +00:00
$config [ 'embedding' ] = array ();
2021-04-03 02:06:42 +00:00
$config [ 'embedding' ][ 0 ] =
array (
'/^https?:\/\/(\w+\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9\-_]{10,11})(&.+)?$/i' ,
$config [ 'youtube_js_html' ]
);
2020-12-24 19:51:44 +00:00
$config [ 'additional_javascript' ][] = 'js/youtube.js' ;
2021-01-04 21:59:59 +00:00
/*
* ====================
* Markup
* ====================
*/
$config [ 'markup' ][] = array ( " /^ \ s*<.* $ /m " , '<span class="orangeQuote">$0</span>' );
$config [ 'markup' ][] = array ( " /__(.+?)__/ " , " <span class= \" underline \" > \$ 1</span> " );
2021-01-05 02:23:32 +00:00
$config [ 'markup' ][] = array ( " /~~(.+?)~~/ " , " <span class= \" strikethrough \" > \$ 1</span> " );
2021-02-20 22:44:16 +00:00
2021-05-02 01:49:33 +00:00
/*
2021-05-08 04:47:08 +00:00
* Original wordfilters ( Obsolete , this is the basic form of the newer version below )
2021-05-02 01:49:33 +00:00
*/
2021-05-02 01:43:59 +00:00
// $config['wordfilters'][] = array('/trann(y|ie)?/i', 'transhumanist', true);
// $config['wordfilters'][] = array('/nigger/i', 'uyghur', true);
// $config['wordfilters'][] = array('/nigg/i', 'uygh', true);
2022-07-04 21:37:13 +00:00
// $config['wordfilters'][] = array('/chud/i', 'FAGGOT', true);
2021-07-06 00:55:18 +00:00
2021-05-02 01:49:33 +00:00
/*
* Traditional word filters . Expires 31 - 12 - 2021.
*
2021-05-23 07:49:24 +00:00
* So , there are three flags at the end of each regex pattern , the " imu " at the end :
* Case Insensitive , Multiline and UTF - 8 ( to avoid breaking non - English posts )
* Let ' s take the nigg filter as an example .
2021-05-02 01:49:33 +00:00
*
2021-05-08 04:47:08 +00:00
* n + [ ^ a - z ] * i + [ ^ a - z ] * g + [ ^ a - z ] * g + ( [ $x_alias ] is just a set of common lookalike characters for x )
2021-05-02 01:49:33 +00:00
*
* Basic regex syntax : * means the preceeding element will be matched if it repeats 0 or more times . + will match 1 or more times
* so a + matches cat or caaat
2021-05-08 04:47:08 +00:00
*
2021-05-02 01:49:33 +00:00
* [] denotes a set of possible matches , so c [ au ] t matches 'cat' and 'cut'
2021-05-08 04:47:08 +00:00
* [ a - z ] means any character from a to z and [ ^ a - z ] means any character that isn ' t in the alphabet ( the starting ^ inverts the set )
* We have the case insensitive flag so captials are included .
2021-05-02 01:49:33 +00:00
*
2021-05-08 04:47:08 +00:00
* The [ $n_alias ] + means that nnnnnnigg still matches due to repetition
* The [ ^ a - z ] * means that if someone does 'n..i..g..g' , then the 0 or more non - alphabet padding
2021-05-02 01:49:33 +00:00
* characters between the n , i , g , g are still matching . Note that it 's 0 or more, not 1 or more, so ' nigg ' still matches .
*
2021-05-23 07:49:24 +00:00
* [ \p { L }] is a pre - made class of unicode letters ( so for example an a with an accent is included )
*
2021-05-02 01:49:33 +00:00
* Example :
2021-05-08 04:47:08 +00:00
* https :// regex101 . com / r / 31 wYx0 / 2
2021-05-02 01:49:33 +00:00
*
*/
2021-07-22 04:51:43 +00:00
$a_alias = 'a4@ÁÀȦÂÄǞǍĂĀÃÅǺǼǢáàȧâäǟǎăāãåǻǽǣĄĄ̊ąą̊æɑ ÆⱭА а aäɑ ' ;
$e_alias = 'eе 3ee̞ɛɜɘ' ;
$g_alias = 'gǵġĝǧğǥɠǤƓǴĠĜǦĞĢɡ ɢᶢ' ;
$i_alias = 'i1L||ıɩįɨɨ̧ĮƗƗ̧íìîïǐĭīĩịÍÌİÎÏǏĬĪĨỊĺļľŀḷḽІії!¡lliɪ ' ;
$n_alias = 'nŋʼnńṅňñņṋŃṄŇÑŅṊnɴn̥n̼ᶰ' ;
$r_alias = 'rʀrɾ' ;
$t_alias = 'tt̼t' ;
2021-05-08 04:47:08 +00:00
2021-05-11 13:07:15 +00:00
$config [ 'wordfilters' ][] = array ( '/TRANN(Y|IE)?/' , 'TRANSHUMANIST' , true );
$config [ 'wordfilters' ][] = array ( '/NIGGA/' , 'UYGHA' , true );
$config [ 'wordfilters' ][] = array ( '/NIGGER/' , 'UYGHUR' , true );
2021-07-22 04:51:43 +00:00
$config [ 'wordfilters' ][] = array ( " /[ $t_alias ][^ \ p { L}0-9]*[ $r_alias ]+[^ \ p { L}0-9]*[ $a_alias ]+[^ \ p { L}0-9]*[ $n_alias ]+[^ \ p { L}0-9]*[ $n_alias ]+[^ \ p { L}0-9]*(y|[ $i_alias ]+[^ \ p { L}0-9]*[ $e_alias ]+)?/imu " , 'transhumanist' , true );
$config [ 'wordfilters' ][] = array ( " /[ $n_alias ][^ \ p { L}0-9]*[ $i_alias ]+[^ \ p { L}0-9]*[ $g_alias ]+[^ \ p { L}0-9]*[ $g_alias ]+[^ \ p { L}0-9]*[ $e_alias ]+[^ \ p { L}0-9]*[ $r_alias ]/imu " , 'uyghur' , true );
2021-05-23 07:49:24 +00:00
$config [ 'wordfilters' ][] = array ( " /[ $n_alias ][^ \ p { L}0-9]*[ $i_alias ]+[^ \ p { L}0-9]*[ $g_alias ]+[^ \ p { L}0-9]*[ $g_alias ]+/imu " , 'uygh' , true );
2021-05-20 00:24:42 +00:00
$config [ 'wordfilters' ][] = array ( '/ewish uyghur/i' , 'ewish nigger' , true );
2021-05-08 04:47:08 +00:00
2021-07-24 11:21:38 +00:00
$config [ 'wordfilters' ][] = array ( '/(^|<br>|[ \/])discord(\.(gg|com))?(s?([\W]|<br>|$))/imu' , '$1fbi.gov$4' , true );
2021-07-22 01:33:58 +00:00
// Prevents replacing false positives in the middle of words or links
$config [ 'wordfilters' ][] = array ( '/(^|<br>|[ (-])iq([) ?!.]||<br>|$)(score)?/imu' , '$1autism score$2' , true );
2021-05-08 04:47:08 +00:00
/*
* Filters for diverting anorectal violence spammer
*/
$fakereason_ano = 'Due to automated child pornography and gore spam by /pol/, all posting now requires a pass.<br>To receive a one-week pass, email a short explanation of the Labor Theory of Value to space@national.shitposting.agency .' ;
$config [ 'filters' ][] = array (
2021-06-25 02:46:46 +00:00
'condition' => array (
'subject' => '/anorectal/i' , // Typical thread subject used
),
'action' => 'reject' ,
'message' => " $fakereason_ano "
2021-05-08 04:47:08 +00:00
);
2021-08-26 21:12:17 +00:00
2021-05-08 04:47:08 +00:00
$config [ 'filters' ][] = array (
2021-06-25 02:46:46 +00:00
'condition' => array (
'filename' => '/(TAKE ACTION v|trends.*associations|anusporn|anal insanity|anorectal risks|TAv[0-9]+|arisks)/' , // Typical opening filename format. Their usual evasion strategy is to post only the image.
),
'action' => 'reject' ,
'message' => " $fakereason_ano "
2021-05-08 04:47:08 +00:00
);
// Favorite names and buzzterms
$config [ 'filters' ][] = array (
2021-06-25 02:46:46 +00:00
'condition' => array (
'body' => '/(Rocco Siff|Evil Angel|Xavier Becerra|AdultDVDTalk|painal|Roughanal|anoreceptive|ltimately this is not about me|Logically-fallacious diversionary tactics)/' ,
),
'action' => 'reject' ,
'message' => " $fakereason_ano "
2021-05-08 04:47:08 +00:00
);
2022-07-04 21:37:13 +00:00
2023-12-17 12:29:55 +00:00
$url_regex = '/(?:https?:\/\/|www\.)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/))/i' ; // match any url
$config [ 'filters' ][] = array (
'condition' => array (
'subject' => $url_regex ,
),
'action' => 'reject' ,
'message' => 'Url in the subject field is not allowed'
);
$config [ 'filters' ][] = array (
'condition' => array (
'name' => $url_regex ,
),
'action' => 'reject' ,
'message' => 'Url in the name field is not allowed'
);
$config [ 'filters' ][] = array (
'condition' => array (
'email' => $url_regex ,
),
'action' => 'reject' ,
'message' => 'Url in the email field is not allowed'
);
2023-12-17 12:45:40 +00:00
$config [ 'filters' ][] = array (
'condition' => array (
2024-03-15 18:08:24 +00:00
'body' => '/(^|\s)((https?):\/\/)?[\w-]{2,6}\.[a-z]{2,4}\/\w{2,8}(#[^\s]+)?(\s|$)/i' , // url shorteners are not allowed
2023-12-17 12:45:40 +00:00
),
'action' => 'reject' ,
'message' => 'Url shorteners are not allowed'
);
2024-03-14 21:10:38 +00:00
// Rate limit posting new threads over Tor
$config [ 'filters' ][] = array (
'condition' => array (
/*
* Confusingly `isreply` is defined as :
* $flood_post [ 'isreply' ] == $post [ 'op' ]
*
* We only want to look at OP posts in the flood table .
*/
'flood-match' => array ( 'isreply' ),
'OP' => true ,
'flood-time-any' => 60 * 10 // 10 minutes
),
'noip' => true ,
'ip' => '127.0.0.1' ,
'find_time' => 60 * 60 * 1 ,
'action' => 'reject' ,
'message' => 'New threads are being created too quickly. Wait [at most] 10 minutes'
);
2024-05-29 19:03:49 +00:00
$config [ 'global_message' ] = '<span><a href="https://talk.leftychan.net/#/room/#welcome:matrix.leftychan.net">Matrix</a></span> <span><a href="ircs://irc.leftychan.net:6697/#leftychan">IRC Chat</a></span> <span><a href="mumble://leftychan.net">Mumble</a></span> <span><a href="https://t.me/+RegtyzzrE0M1NDMx">Telegram</a></span> <span><a href="https://discord.gg/AcZeFKXPmZ">Discord</a></span><br/><br/><span>We will be performing scheduled maintenance from 2-3am UTC, May 30th. The board will be read only during this time.</span>' ;
2023-09-25 01:17:27 +00:00
$config [ 'debug' ] = false ;