2013-10-31 23:14:19 +01: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 .
*/
2014-09-24 22:19:58 +02:00
require_once " lib/htmlpurifier-4.5.0/library/HTMLPurifier.auto.php " ;
require_once " 8chan-functions.php " ;
2013-10-31 23:14:19 +01:00
2014-10-04 22:44:42 +02:00
// Note - you may want to change some of these in secrets.php instead of here
// See the secrets.example.php file
2013-10-31 23:14:19 +01:00
$config [ 'db' ][ 'server' ] = 'localhost' ;
$config [ 'db' ][ 'database' ] = '8chan' ;
$config [ 'db' ][ 'prefix' ] = '' ;
$config [ 'db' ][ 'user' ] = 'root' ;
2014-09-24 22:14:02 +02:00
$config [ 'db' ][ 'password' ] = '' ;
2014-05-17 22:01:14 +02:00
$config [ 'timezone' ] = 'UTC' ;
2014-10-23 04:21:21 +02:00
$config [ 'cache' ][ 'enabled' ] = 'apc' ;
2014-10-19 03:07:04 +02:00
2013-10-31 23:14:19 +01:00
$config [ 'cookies' ][ 'mod' ] = 'mod' ;
2014-09-24 22:14:02 +02:00
$config [ 'cookies' ][ 'salt' ] = '' ;
2014-10-19 03:07:04 +02:00
2014-09-27 01:54:53 +02:00
$config [ 'spam' ][ 'hidden_inputs_max_pass' ] = 128 ;
$config [ 'spam' ][ 'hidden_inputs_expire' ] = 60 * 60 * 4 ; // three hours
2014-10-19 03:07:04 +02:00
2014-09-24 22:14:02 +02:00
$config [ 'flood_time' ] = 5 ;
2014-10-05 19:07:59 +02:00
$config [ 'flood_time_ip' ] = 30 ;
2014-09-23 03:29:06 +02:00
$config [ 'flood_time_same' ] = 2 ;
2014-05-17 22:01:14 +02:00
$config [ 'max_body' ] = 5000 ;
2014-10-08 02:33:32 +02:00
$config [ 'reply_limit' ] = 300 ;
2013-10-31 23:14:19 +01:00
$config [ 'thumb_width' ] = 255 ;
$config [ 'thumb_height' ] = 255 ;
$config [ 'max_width' ] = 10000 ;
$config [ 'max_height' ] = 10000 ;
2014-09-20 17:21:09 +02:00
$config [ 'threads_per_page' ] = 15 ;
2014-10-08 02:33:32 +02:00
$config [ 'max_pages' ] = 15 ;
2013-10-31 23:14:19 +01:00
$config [ 'threads_preview' ] = 5 ;
$config [ 'root' ] = '/' ;
2014-09-24 22:14:02 +02:00
$config [ 'secure_trip_salt' ] = '' ;
2014-09-20 17:21:09 +02:00
$config [ 'always_noko' ] = true ;
$config [ 'allow_no_country' ] = true ;
2014-09-21 19:51:42 +02:00
$config [ 'thread_subject_in_title' ] = true ;
$config [ 'spam' ][ 'hidden_inputs_max_pass' ] = 128 ;
2014-09-26 00:53:56 +02:00
$config [ 'ayah_enabled' ] = true ;
2014-10-19 03:07:04 +02:00
2014-10-04 22:33:48 +02:00
// Load database credentials
require " secrets.php " ;
2014-10-29 07:23:17 +01:00
2013-10-31 23:14:19 +01:00
// Image shit
2014-05-17 22:01:14 +02:00
$config [ 'thumb_method' ] = 'gm+gifsicle' ;
$config [ 'thumb_ext' ] = '' ;
$config [ 'thumb_keep_animation_frames' ] = 100 ;
2013-10-31 23:14:19 +01:00
$config [ 'show_ratio' ] = true ;
2014-09-21 19:51:42 +02:00
//$config['allow_upload_by_url'] = true;
2014-10-08 02:33:32 +02:00
$config [ 'max_filesize' ] = 1024 * 1024 * 8 ; // 8MB
2013-10-31 23:14:19 +01:00
$config [ 'disable_images' ] = false ;
$config [ 'spoiler_images' ] = true ;
2014-09-24 06:25:55 +02:00
$config [ 'image_reject_repost' ] = true ;
2014-05-17 22:01:14 +02:00
$config [ 'allowed_ext_files' ][] = 'webm' ;
2014-11-19 09:53:35 +01:00
$config [ 'allowed_ext_files' ][] = 'mp4' ;
2014-09-21 19:51:42 +02:00
$config [ 'webm' ][ 'use_ffmpeg' ] = true ;
$config [ 'webm' ][ 'allow_audio' ] = true ;
$config [ 'webm' ][ 'max_length' ] = 60 * 15 ;
2013-10-31 23:14:19 +01:00
// Mod shit
2014-10-29 07:23:17 +01:00
$config [ 'mod' ][ 'groups' ][ 25 ] = 'GlobalVolunteer' ;
$config [ 'mod' ][ 'groups' ][ 19 ] = 'BoardVolunteer' ;
2013-10-31 23:14:19 +01:00
define_groups ();
2014-10-29 07:23:17 +01:00
$config [ 'mod' ][ 'capcode' ][ BOARDVOLUNTEER ] = array ( 'Board Volunteer' );
$config [ 'mod' ][ 'capcode' ][ MOD ] = array ( 'Board Owner' );
$config [ 'mod' ][ 'capcode' ][ GLOBALVOLUNTEER ] = array ( 'Global Volunteer' );
2014-05-17 22:01:14 +02:00
$config [ 'custom_capcode' ][ 'Admin' ] = array (
2014-12-14 12:25:43 +01:00
'<span class="capcode" title="This post is written by the global 8chan.co administrator."> <i class="fa fa-wheelchair" style="color:blue;"></i> <span style="color:red">8chan.co Administrator</span></span>' ,
2014-05-17 22:01:14 +02:00
);
2014-10-29 07:23:17 +01:00
//$config['mod']['view_banlist'] = GLOBALVOLUNTEER;
2014-09-23 17:31:52 +02:00
$config [ 'mod' ][ 'recent_reports' ] = 65535 ;
2014-10-17 03:53:52 +02:00
$config [ 'mod' ][ 'ip_less_recentposts' ] = 75 ;
2014-10-08 02:33:32 +02:00
$config [ 'ban_show_post' ] = true ;
2013-10-31 23:14:19 +01:00
// Board shit
2014-10-01 01:06:48 +02:00
$config [ 'max_links' ] = 40 ;
2014-09-27 23:23:51 +02:00
$config [ 'poster_id_length' ] = 6 ;
2014-10-23 04:18:23 +02:00
$config [ 'ayah_enabled' ] = false ;
$config [ 'cbRecaptcha' ] = true ;
2014-05-17 22:01:14 +02:00
$config [ 'url_banner' ] = '/banners.php' ;
2014-10-23 04:18:23 +02:00
$config [ 'additional_javascript_compile' ] = true ;
2013-10-31 23:14:19 +01:00
//$config['default_stylesheet'] = array('Notsuba', 'notsuba.css');
$config [ 'additional_javascript' ][] = 'js/jquery.min.js' ;
2014-10-23 04:18:23 +02:00
$config [ 'additional_javascript' ][] = 'js/jquery.mixitup.min.js' ;
2014-12-14 12:25:43 +01:00
$config [ 'additional_javascript' ][] = 'js/jquery-ui.custom.min.js' ;
2014-10-23 04:18:23 +02:00
$config [ 'additional_javascript' ][] = 'js/catalog.js' ;
2014-11-14 15:09:52 +01:00
$config [ 'additional_javascript' ][] = 'js/captcha.js' ;
2013-10-31 23:14:19 +01:00
$config [ 'additional_javascript' ][] = 'js/jquery.tablesorter.min.js' ;
2014-09-23 03:29:06 +02:00
$config [ 'additional_javascript' ][] = 'js/options.js' ;
$config [ 'additional_javascript' ][] = 'js/style-select.js' ;
$config [ 'additional_javascript' ][] = 'js/options/general.js' ;
2014-05-17 22:01:14 +02:00
$config [ 'additional_javascript' ][] = 'js/post-hover.js' ;
2014-10-07 03:01:01 +02:00
$config [ 'additional_javascript' ][] = 'js/update_boards.js' ;
2014-09-20 17:21:09 +02:00
$config [ 'additional_javascript' ][] = 'js/favorites.js' ;
2014-05-17 22:01:14 +02:00
$config [ 'additional_javascript' ][] = 'js/show-op.js' ;
$config [ 'additional_javascript' ][] = 'js/hide-threads.js' ;
2014-09-25 23:35:17 +02:00
$config [ 'additional_javascript' ][] = 'js/smartphone-spoiler.js' ;
2014-05-17 22:01:14 +02:00
$config [ 'additional_javascript' ][] = 'js/inline-expanding.js' ;
$config [ 'additional_javascript' ][] = 'js/show-backlinks.js' ;
$config [ 'additional_javascript' ][] = 'js/webm-settings.js' ;
$config [ 'additional_javascript' ][] = 'js/expand-video.js' ;
$config [ 'additional_javascript' ][] = 'js/treeview.js' ;
$config [ 'additional_javascript' ][] = 'js/quick-post-controls.js' ;
$config [ 'additional_javascript' ][] = 'js/expand-too-long.js' ;
$config [ 'additional_javascript' ][] = 'js/settings.js' ;
$config [ 'additional_javascript' ][] = 'js/fix-report-delete-submit.js' ;
$config [ 'additional_javascript' ][] = 'js/hide-images.js' ;
$config [ 'additional_javascript' ][] = 'js/expand-all-images.js' ;
$config [ 'additional_javascript' ][] = 'js/local-time.js' ;
2014-06-10 19:57:37 +02:00
$config [ 'additional_javascript' ][] = 'js/no-animated-gif.js' ;
2014-09-13 18:36:40 +02:00
$config [ 'additional_javascript' ][] = 'js/expand.js' ;
2014-09-24 22:14:02 +02:00
$config [ 'additional_javascript' ][] = 'js/titlebar-notifications.js' ;
2014-09-20 17:21:09 +02:00
$config [ 'additional_javascript' ][] = 'js/auto-reload.js' ;
$config [ 'additional_javascript' ][] = 'js/quick-reply.js' ;
2014-09-23 03:29:06 +02:00
$config [ 'additional_javascript' ][] = 'js/options/user-css.js' ;
$config [ 'additional_javascript' ][] = 'js/options/user-js.js' ;
$config [ 'additional_javascript' ][] = 'js/forced-anon.js' ;
$config [ 'additional_javascript' ][] = 'js/toggle-locked-threads.js' ;
$config [ 'additional_javascript' ][] = 'js/toggle-images.js' ;
2014-09-25 23:35:17 +02:00
$config [ 'additional_javascript' ][] = 'js/mobile-style.js' ;
2014-09-27 22:08:18 +02:00
$config [ 'additional_javascript' ][] = 'js/id_highlighter.js' ;
$config [ 'additional_javascript' ][] = 'js/id_colors.js' ;
2014-10-07 03:36:19 +02:00
$config [ 'additional_javascript' ][] = 'js/inline.js' ;
2014-10-09 03:20:47 +02:00
$config [ 'additional_javascript' ][] = 'js/infinite-scroll.js' ;
2014-10-10 01:58:00 +02:00
$config [ 'additional_javascript' ][] = 'js/download-original.js' ;
2014-10-11 19:21:00 +02:00
$config [ 'additional_javascript' ][] = 'js/thread-watcher.js' ;
2014-10-23 04:18:23 +02:00
$config [ 'additional_javascript' ][] = 'js/ajax.js' ;
$config [ 'additional_javascript' ][] = 'js/show-own-posts.js' ;
2014-10-20 14:33:09 +02:00
$config [ 'additional_javascript' ][] = 'js/youtube.js' ;
2014-11-02 00:00:39 +01:00
$config [ 'additional_javascript' ][] = 'js/comment-toolbar.js' ;
2014-11-10 08:23:38 +01:00
$config [ 'additional_javascript' ][] = 'js/catalog-search.js' ;
2014-11-13 06:08:48 +01:00
$config [ 'additional_javascript' ][] = 'js/thread-stats.js' ;
2014-12-03 09:19:02 +01:00
$config [ 'additional_javascript' ][] = 'js/quote-selection.js' ;
2014-12-20 16:04:20 +01:00
$config [ 'additional_javascript' ][] = 'js/twemoji/twemoji.js' ;
2014-05-17 22:01:14 +02:00
2014-10-10 01:58:00 +02:00
//$config['font_awesome_css'] = '/netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css';
2013-10-31 23:14:19 +01:00
2014-09-20 17:21:09 +02:00
$config [ 'stylesheets' ][ 'Dark' ] = 'dark.css' ;
2014-09-23 03:29:06 +02:00
$config [ 'stylesheets' ][ 'Photon' ] = 'photon.css' ;
2014-09-20 17:21:09 +02:00
2013-10-31 23:14:19 +01:00
$config [ 'stylesheets_board' ] = true ;
$config [ 'markup' ][] = array ( " /^[ | \t ]*==(.+?)==[ | \t ]* $ /m " , " <span class= \" heading \" > \$ 1</span> " );
$config [ 'markup' ][] = array ( " / \ [spoiler \ ](.+?) \ [ \ /spoiler \ ]/ " , " <span class= \" spoiler \" > \$ 1</span> " );
2014-05-17 22:01:14 +02:00
$config [ 'markup' ][] = array ( " /~~(.+?)~~/ " , " <s> \$ 1</s> " );
2014-10-17 03:53:59 +02:00
$config [ 'markup' ][] = array ( " /__(.+?)__/ " , " <u> \$ 1</u> " );
2014-12-14 12:25:43 +01:00
$config [ 'markup' ][] = array ( " /###([^ \ s']+)###/ " , " <a href='/boards.html# \$ 1'>### \$ 1###</a> " );
2014-05-17 22:01:14 +02:00
2014-12-14 12:25:43 +01:00
$config [ 'boards' ] = array ( array ( '<i class="fa fa-home" title="Home"></i>' => '/' , '<i class="fa fa-tags" title="Boards"></i>' => '/boards.html' , '<i class="fa fa-question" title="FAQ"></i>' => '/faq.html' , '<i class="fa fa-random" title="Random"></i>' => '/random.php' , '<i class="fa fa-plus" title="New board"></i>' => '/create.php' , '<i class="fa fa-ban" title="Public ban list"></i>' => '/bans.html' , '<i class="fa fa-search" title="Search"></i>' => '/search.php' , '<i class="fa fa-cog" title="Manage board"></i>' => '/mod.php' , '<i class="fa fa-quote-right" title="Chat"></i>' => 'https://qchat.rizon.net/?channels=#8chan' ), array ( 'b' , 'meta' , 'news+' ), array ( '<i class="fa fa-twitter" title="Twitter"></i>' => 'https://twitter.com/infinitechan' ));
2014-10-07 03:01:01 +02:00
//$config['boards'] = array(array('<i class="fa fa-home" title="Home"></i>' => '/', '<i class="fa fa-tags" title="Boards"></i>' => '/boards.html', '<i class="fa fa-question" title="FAQ"></i>' => '/faq.html', '<i class="fa fa-random" title="Random"></i>' => '/random.php', '<i class="fa fa-plus" title="New board"></i>' => '/create.php', '<i class="fa fa-search" title="Search"></i>' => '/search.php', '<i class="fa fa-cog" title="Manage board"></i>' => '/mod.php', '<i class="fa fa-quote-right" title="Chat"></i>' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array('v', 'a', 'tg', 'fit', 'pol', 'tech', 'mu', 'co', 'sp', 'boards'), array('<i class="fa fa-twitter" title="Twitter"></i>'=>'https://twitter.com/infinitechan'));
2013-10-31 23:14:19 +01:00
2014-12-03 09:19:02 +01:00
$config [ 'footer' ][] = 'All posts on 8chan.co are the responsibility of the individual poster and not the administration of 8chan.co, pursuant to 47 U.S.C. § 230.' ;
$config [ 'footer' ][] = 'We have not been served any secret court orders and are not under any gag orders.' ;
2014-09-24 06:27:14 +02:00
$config [ 'footer' ][] = 'Contribute to 8chan.co development at <a href="https://github.com/ctrlcctrlv/8chan">github</a>' ;
2014-12-03 09:19:02 +01:00
$config [ 'footer' ][] = 'To make a DMCA request or report illegal content, please email <a href="mailto:admin@8chan.co">admin@8chan.co</a>.' ;
2014-05-17 22:01:14 +02:00
$config [ 'search' ][ 'enable' ] = true ;
2013-10-31 23:14:19 +01:00
2014-06-12 05:07:16 +02:00
$config [ 'syslog' ] = true ;
2013-10-31 23:14:19 +01:00
2014-09-23 17:31:52 +02:00
$config [ 'wordfilters' ][] = array ( '\rule' , '' ); // 'true' means it's a regular expression
2013-10-31 23:14:19 +01:00
2014-05-18 21:37:22 +02:00
$config [ 'embedding' ] = array (
array (
2014-11-03 16:30:15 +01:00
'/^https?:\/\/(?:\w+\.)?(?:youtube\.com\/watch\?|youtu\.be\/)(?:(?:&?v=)?([a-zA-Z0-9\-_]{10,11})\??|&?(start=\d*)|&?(end=\d*)|(?:&?[^&]+))*$/i' ,
2014-10-20 14:33:09 +02:00
$config [ 'youtube_js_html' ]
2014-05-18 21:37:22 +02:00
),
array (
'/^https?:\/\/(\w+\.)?vimeo\.com\/(\d{2,10})(\?.+)?$/i' ,
'<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="https://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="https://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="%%tb_width%%" height="%%tb_height%%"></embed></object>'
),
array (
'/^https?:\/\/(\w+\.)?dailymotion\.com\/video\/([a-zA-Z0-9]{2,10})(_.+)?$/i' ,
'<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="movie" value="https://www.dailymotion.com/swf/video/$2"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><param name="wmode" value="transparent"></param><embed type="application/x-shockwave-flash" src="https://www.dailymotion.com/swf/video/$2" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowfullscreen="true" allowscriptaccess="always"></embed></object>'
),
array (
'/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?.+)?$/i' ,
'<div style="float:left;margin:10px 20px;width:%%tb_width%%px;height:%%tb_height%%px"><embed flashVars="playerVars=showStats=no|autoPlay=no" src="https://www.metacafe.com/fplayer/$2/$3.swf" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_$2" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></div>'
),
array (
'/^https?:\/\/video\.google\.com\/videoplay\?docid=(\d+)([&#](.+)?)?$/i' ,
'<embed src="https://video.google.com/googleplayer.swf?docid=$1&hl=en&fs=true" style="width:%%tb_width%%px;height:%%tb_height%%px;float:left;margin:10px 20px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>'
),
array (
'/^https?:\/\/(\w+\.)?vocaroo\.com\/i\/([a-zA-Z0-9]{2,15})$/i' ,
'<object style="float: left;margin: 10px 20px;" width="148" height="44"><param name="movie" value="https://vocaroo.com/player.swf?playMediaID=$2&autoplay=0"></param><param name="wmode" value="transparent"></param><embed src="https://vocaroo.com/player.swf?playMediaID=$2&autoplay=0" width="148" height="44" wmode="transparent" type="application/x-shockwave-flash"></embed></object>'
)
);
2014-07-19 20:40:06 +02:00
$config [ 'gzip_static' ] = false ;
2014-12-03 09:15:24 +01:00
$config [ 'hash_masked_ip' ] = true ;
2014-12-14 12:25:43 +01:00
$config [ 'force_subject_op' ] = false ;
$config [ 'min_links' ] = 0 ;
$config [ 'min_body' ] = 0 ;
2014-10-29 07:23:17 +01:00
// 8chan specific mod pages
require '8chan-mod-pages.php' ;