nojs layout
This commit is contained in:
@@ -111,7 +111,7 @@ class UserController extends Controller
|
||||
\Session::flash('info', 'Cannot register when logged in');
|
||||
return redirect('/');
|
||||
}
|
||||
return view('register');
|
||||
return view('apply');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,7 +125,7 @@ class UserController extends Controller
|
||||
if(auth()->check()) return redirect()->back()->with('info', 'Cannot register when logged in');
|
||||
$validator = \Validator::make($request->all(), [
|
||||
'username' => 'required|unique:users|min:3|max:25|alpha_num',
|
||||
//'email' => 'required|email|unique:users|confirmed',
|
||||
'email' => 'required|email|unique:users|confirmed',
|
||||
'password' => 'required|min:6|confirmed',
|
||||
'g-recaptcha-response' => 'required|recaptcha'
|
||||
]);
|
||||
@@ -139,23 +139,23 @@ class UserController extends Controller
|
||||
|
||||
$user = new User();
|
||||
$user->username = $request->get('username');
|
||||
$user->email = ""; //$request->get('email');
|
||||
$user->email = $request->get('email');
|
||||
$user->password = $request->get('password');
|
||||
$user->activation_token = ""; //$activation_token;
|
||||
$user->activation_token = $activation_token;
|
||||
$user->disabled = 0;
|
||||
$user->verified = 1;
|
||||
$user->categories = [];
|
||||
if($user->save()) {
|
||||
/*$data = [
|
||||
$data = [
|
||||
'username' => $user->username,
|
||||
'activation_token' => $activation_token
|
||||
];*/
|
||||
];
|
||||
|
||||
// Send Mail
|
||||
|
||||
/*\Mail::queue('emails.activation', $data, function($message) use ($user) {
|
||||
\Mail::queue('emails.activation', $data, function($message) use ($user) {
|
||||
$message->to($user->email, $user->username)->subject('Welcome to w0bm. Activate your account');
|
||||
});*/
|
||||
});
|
||||
|
||||
return redirect('/')->with('info', 'Congratulations! You can now login!');
|
||||
} else {
|
||||
|
@@ -120,6 +120,7 @@ class VideoController extends Controller
|
||||
|
||||
// TODO: outsource to different process (async)
|
||||
$video->createThumbnail();
|
||||
$video->tesThumb();
|
||||
|
||||
// Discord
|
||||
if (config('discord.enabled') && config('discord.webhookurl')) {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 616 KiB |
@@ -20,6 +20,7 @@ Route::get('/', ['as' => 'home', function () {
|
||||
|
||||
}])->middleware('auth');
|
||||
|
||||
Route::post('nojs', 'UserController@nojs');
|
||||
|
||||
Route::post('filter', 'UserController@filter');
|
||||
|
||||
|
@@ -160,6 +160,56 @@ class Video extends Model
|
||||
}
|
||||
}
|
||||
|
||||
public function tesThumb() {
|
||||
set_time_limit(9899999999999999);
|
||||
$dat = $this->file;
|
||||
#$in = public_path() . "/b"; // webm-input
|
||||
$in = "/home/sirx/web/devw0bm/w0bm.com/public/b";
|
||||
$out = public_path() . "/thumbs/beta"; //thumb-output
|
||||
$tmpdir = str_replace("public", "app/Http/Controllers/tmp", public_path());
|
||||
|
||||
$name = explode(".", $dat);
|
||||
array_pop($name);
|
||||
$name = join(".", $name);
|
||||
|
||||
#$ffmpegthumbnailer = round(shell_exec("ffmpegthumbnailer -i {$in}/{$dat} -a -o {$out}/{$name}_test.png"));
|
||||
//$ffmpeg = round(shell_exec("ffmpeg -i {$in}/{$dat} -vf select='eq(pict_type,PICT_TYPE_I)' -vf scale=128:128 {$out}/{$name}_ffmpeg.png"));
|
||||
$length = round(shell_exec("ffprobe -i {$in}/{$dat} -show_format -v quiet | sed -n 's/duration=//p'"));
|
||||
$half = $length / 20;
|
||||
$ffmpeg = exec("ffmpegthumbnailer -i {$in}/{$dat} -o {$out}/{$name}_test.png", $output, $return);
|
||||
if ($return != 0) {
|
||||
// error
|
||||
@unlink("{$out}/{$name}_test.png");
|
||||
exec("ffmpeg -i {$in}/{$dat} -vf select='eq(pict_type,PICT_TYPE_I)' -vf scale=128:128:force_original_aspect_ratio=increase,crop=128:128 {$out}/{$name}.png");
|
||||
}else{
|
||||
// success
|
||||
@unlink("{$out}/{$name}_test.png");
|
||||
exec("ffmpeg -i {$in}/{$dat} -vf select='eq(pict_type,PICT_TYPE_I)' -vf scale=128:128:force_original_aspect_ratio=increase,crop=128:128 -ss {$half} {$out}/{$name}.png");
|
||||
}
|
||||
}
|
||||
|
||||
public function createThumbnailStatic() {
|
||||
$dat = $this->file;
|
||||
$in = public_path() . "/b"; // webm-input
|
||||
$out = public_path() . "/thumbs/testing"; //thumb-output
|
||||
$tmpdir = str_replace("public", "app/Http/Controllers/tmp", public_path());
|
||||
|
||||
$name = explode(".", $dat);
|
||||
array_pop($name);
|
||||
$name = join(".", $name);
|
||||
if(!file_exists("{$out}/{$name}.png")) {
|
||||
$length = round(shell_exec("ffprobe -i {$in}/{$dat} -show_format -v quiet | sed -n 's/duration=//p'"));
|
||||
for ($i = 1; $i < 10; $i++) {
|
||||
$act = ($i * 10) * ($length / 100);
|
||||
$ffmpeg = shell_exec("ffmpeg -ss {$act} -i {$in}/{$dat} -vf \"'select=eq(n\,0)'\" -vf scale=128:128 {$tmpdir}/{$name}_{$i}.png 2>&1");
|
||||
}
|
||||
$tmp = shell_exec("convert -delay 27 -loop 0 {$tmpdir}/{$name}_*.png {$out}/{$name}.png 2>&1");
|
||||
if(@filesize("{$out}/{$name}.png") < 2000)
|
||||
@unlink("{$out}/{$name}.png");
|
||||
array_map('unlink', glob("{$tmpdir}/{$name}*.png"));
|
||||
}
|
||||
}
|
||||
|
||||
public static function getRandom($related = null) {
|
||||
if ($related) {
|
||||
$id = $related->videos()->filtered()->countScoped()->count() - 1;
|
||||
|
5
public/css/w0bmcustom.css
vendored
5
public/css/w0bmcustom.css
vendored
@@ -3735,4 +3735,9 @@ button#layout3 {
|
||||
/*background: #222222;
|
||||
border: 1px solid #1fb2b0;
|
||||
overflow: hidden;*/
|
||||
}
|
||||
|
||||
.centered {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
@@ -49,7 +49,7 @@
|
||||
<div class="wrapper">
|
||||
@yield('aside')
|
||||
<div style="width: auto; overflow: hidden; position: relative;">
|
||||
<noscript><div class="no-js">Javascript is disabled, enable to use all of w0bms features!</div></noscript>
|
||||
<noscript><div class="no-js">Javascript is disabled, you may want to use our nojs frontend? Click <a href="/api/user/layout?layout=4">here</a></div></noscript>
|
||||
<div class=" container">
|
||||
@yield('content')
|
||||
</div>
|
||||
|
@@ -1,19 +1,31 @@
|
||||
@extends('layout')
|
||||
@section('content')
|
||||
<div class="page-header">
|
||||
<h5>Legacy Login</h5>
|
||||
<p>This login form works without Javascript</p>
|
||||
<h5>Spurleys Super Dooper Login Screen</h5>
|
||||
<p>Log into your w0bm.com Account</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="width:20%;" class="">
|
||||
<div hiden class="nodisplay">
|
||||
|
||||
<div class="wrap-collabsible">
|
||||
<input id="collapsible" class="toggle" type="checkbox">
|
||||
<label for="collapsible" class="lbl-toggle">Login</label>
|
||||
<div class="collapsible-content">
|
||||
<div class="content-inner">
|
||||
<div class="centered">
|
||||
<form action="{{action('UserController@login')}}" method="post" class="form-signin">
|
||||
{!! csrf_field() !!}
|
||||
<input type="text" name="identifier" placeholder="Username" class="form-control">
|
||||
<input type="password" name="password" placeholder="Password" class="form-control">
|
||||
<input type="checkbox" name="remember"> Remember me<br>
|
||||
<input type="checkbox" name="remember" checked> Remember me<br>
|
||||
<button type="submit" class="btn btn-primary">Login</button>
|
||||
<a href="{{url('register')}}" class="btn btn-success">Register</a>
|
||||
</div>
|
||||
<a href="{{url('register')}}" class="btn btn-success disabled">Register</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
@@ -13,10 +13,12 @@
|
||||
</div>
|
||||
|
||||
<div class=" collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
@if(Auth::check())
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li><a href="{{url('categories')}}"><i class="fa fa-clone"></i> Categories</a></li>
|
||||
<li><a href="{{url('index')}}"><i class="fa fa-list"></i> Index</a></li>
|
||||
@include('partials.themechanger')
|
||||
@endif
|
||||
@if(Auth::check())
|
||||
@include('partials.layoutchanger')
|
||||
@endif
|
||||
@@ -32,9 +34,11 @@
|
||||
@else
|
||||
<!-- Hier war mal der Login Kot -->
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
@if(Auth::check())
|
||||
<li><a href="#" data-toggle="modal" data-target="#loginmodal"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
@include('partials.loginmodal')
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1 +0,0 @@
|
||||
registeropen.blade.php
|
61
resources/views/layout1/register.blade.php
Normal file
61
resources/views/layout1/register.blade.php
Normal file
@@ -0,0 +1,61 @@
|
||||
@extends('profilelayout')
|
||||
@section('novidcontent')
|
||||
@include('partials.flash')
|
||||
<div class="page-header">
|
||||
<h5>Register your w0bm.com Account</h5>
|
||||
<p style="color:red;">Note: We do not reset passwords, make sure to write down your password on paper, otherwise you need create a new account or start to circlejerk in the IRC!</p>
|
||||
</div>
|
||||
<div class="register">
|
||||
<form class="form-horizontal" method="post" action="{{action('UserController@store')}}">
|
||||
{!! csrf_field() !!}
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => 'Username']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'Email']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{!! Form::email('email_confirmation', null, ['class' => 'form-control', 'placeholder' => 'Email Confirmation']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{!! Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => 'Password Confirmation']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group terms">
|
||||
<div style="text-align: center;">
|
||||
<p><input type="checkbox" name="terms"> I am at least 18 years or older and I have read and understand the <a href="/rules">Rules</a></p>
|
||||
</div>
|
||||
<div class="">
|
||||
<button type="submit" class="btn btn-primary">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- <div class="form-group" style="
|
||||
text-align: center;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
">
|
||||
<p>By clicking on "Register" you accept our <a href="/rules">Rules</a></p>
|
||||
<p>Note: we do NOT reset passwords for now, make sure to save your password correctly</p>
|
||||
</div>
|
||||
-->
|
||||
@endsection
|
||||
|
@@ -31,6 +31,12 @@
|
||||
<div class="col-md p-0">
|
||||
@include('partials.navigation')
|
||||
@include('partials.flash')
|
||||
<noscript>
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
<strong>Javascript is disabled :(</strong> be a good neckbeard and turn it on, otherwise this Layout wont work as it should. However I can offer you to either reset to a <a href="/api/user/layout?layout=1">Layout that is nojs friendly</a> or just mind your own biz and simply block this message with your adblocker for example. Anyways have a nice day.
|
||||
</button>
|
||||
</div>
|
||||
</noscript>
|
||||
@yield('floatvid')
|
||||
@include('partials.comments')
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user