private static function hiddenbooru($message) { if (BaseController::whichDarknet() == 'i2p') { $domain = "hiddenbooru.i2p"; } else { $domain = "hbooruahi4zr2h73.onion"; } if (BaseController::cookieGet('hb') != "on") { $replace = '<a href="http://' . $domain . '/post/view/$1" class="link-hb" target="_blank">' . '[HiddenBooru:$1]</a>'; } else { $replace = '<a href="http://' . $domain . '/post/view/$1" target="_blank">' . '<img src="http://' . $domain . '/post/preview/$1"></a>'; } return preg_replace("/\\[HiddenBooru:([0-9]+)\\]/", $replace, $message, 1); }
/* |-------------------------------------------------------------------------- | Application & Route Filters |-------------------------------------------------------------------------- | | Below you will find the "before" and "after" events for the application | which may be used to do any work before or after a request into your | application. Here you may also register your custom route filters. | */ App::before(function () { if (!Request::is('api/*')) { session_start(); if (in_array(BaseController::cookieGet('lang'), ['en', 'ru', 'by'])) { App::setLocale(BaseController::cookieGet('lang')); } if (!BaseController::sessionGet('token')) { BaseController::sessionSet('token', BaseController::randString(6)); } } }); App::after(function () { }); /* * Registration captcha check */ Route::filter('signup', function () { if (!BaseController::checkCaptcha()) { return View::make('verif.signup'); }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>onelon: {{{Lang::get('general.site_title')}}}</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='alternate' type='application/rss+xml' title='RSS' href='/rss'> <?php if (in_array(BaseController::cookieGet('style'), ['cyborg', 'darkly', 'slate', 'superhero'])) { $style = BaseController::cookieGet('style'); } else { $style = 'darkly'; } ?> <link rel="stylesheet" type="text/css" href="/css/{{{$style}}}.css"> <link rel="stylesheet" type="text/css" href="/css/main.css"> <link rel="icon" type="image/png" href="/favicon.png" /> </head> <body> <div class="container"> @include('navigation') </div> <div class="container"> @include('adverts') </div>