4 Commits

Author SHA1 Message Date
x
0ddb0dae53 adding actual useful feature 2024-06-10 00:27:00 +02:00
7040a9851d QoL fix for videotitle height, thanks to duke 2024-05-14 00:23:32 +02:00
a525c12794 blah 2024-03-18 17:56:29 +01:00
c5a1a42923 ... 2024-03-17 16:30:27 +01:00
46 changed files with 387 additions and 554 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Http\Controllers;
use App\Models\Tag;
use App\Models\Video;
use Illuminate\Http\Request;
class TagController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\View\View
*/
public function index()
{
return view('tags', ['tags' => Tag::all()]);
}
/**
* Display the specified resource.
*
* @param string $normalized
* @param int|null $id
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
*/
public function showVideo($tagName)
{
// Retrieve the tag based on the provided tag name
$tag = Tag::where('name', $tagName)->firstOrFail();
// Get a random video related to the tag
$randomVideo = \App\Models\Video::getSingleRandom($tag);
// Pass the tag and the random video to your view
return view('tag.show')->with(compact('tag', 'randomVideo'));
}
// Define other CRUD operations for tags as needed.
}

8
.idea/.gitignore generated vendored
View File

@@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/w0bm.iml" filepath="$PROJECT_DIR$/.idea/w0bm.iml" />
</modules>
</component>
</project>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpTestFrameworkSettings">
<test_tools>
<tool tool_name="PHPSpec">
<settings>
<configurations>
<local_configuration configuration_file_path="$PROJECT_DIR$/phpspec.yml" executable_path="$PROJECT_DIR$/vendor/phpspec/phpspec/bin/phpspec" use_configuration_file="true" />
</configurations>
</settings>
</tool>
</test_tools>
</component>
</project>

119
.idea/php.xml generated
View File

@@ -1,119 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/barryvdh/laravel-ide-helper" />
<path value="$PROJECT_DIR$/vendor/sentry/sentry-laravel" />
<path value="$PROJECT_DIR$/vendor/sentry/sentry" />
<path value="$PROJECT_DIR$/vendor/ua-parser/uap-php" />
<path value="$PROJECT_DIR$/vendor/laravelcollective/html" />
<path value="$PROJECT_DIR$/vendor/swiftmailer/swiftmailer" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
<path value="$PROJECT_DIR$/vendor/jaybizzle/crawler-detect" />
<path value="$PROJECT_DIR$/vendor/mockery/mockery" />
<path value="$PROJECT_DIR$/vendor/symfony/console" />
<path value="$PROJECT_DIR$/vendor/symfony/process" />
<path value="$PROJECT_DIR$/vendor/symfony/debug" />
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php56" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-util" />
<path value="$PROJECT_DIR$/vendor/symfony/var-dumper" />
<path value="$PROJECT_DIR$/vendor/symfony/http-kernel" />
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
<path value="$PROJECT_DIR$/vendor/cviebrock/eloquent-taggable" />
<path value="$PROJECT_DIR$/vendor/symfony/dom-crawler" />
<path value="$PROJECT_DIR$/vendor/symfony/routing" />
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" />
<path value="$PROJECT_DIR$/vendor/symfony/css-selector" />
<path value="$PROJECT_DIR$/vendor/symfony/translation" />
<path value="$PROJECT_DIR$/vendor/mtdowling/cron-expression" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
<path value="$PROJECT_DIR$/vendor/symfony/class-loader" />
<path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
<path value="$PROJECT_DIR$/vendor/phpspec/phpspec" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
<path value="$PROJECT_DIR$/vendor/phpspec/php-diff" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit-mock-objects" />
<path value="$PROJECT_DIR$/vendor/mews/captcha" />
<path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
<path value="$PROJECT_DIR$/vendor/intervention/image" />
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
<path value="$PROJECT_DIR$/vendor/psr/log" />
<path value="$PROJECT_DIR$/vendor/nesbot/carbon" />
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
<path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
<path value="$PROJECT_DIR$/vendor/mobiledetect/mobiledetectlib" />
<path value="$PROJECT_DIR$/vendor/fzaninotto/faker" />
<path value="$PROJECT_DIR$/vendor/vlucas/phpdotenv" />
<path value="$PROJECT_DIR$/vendor/hamcrest/hamcrest-php" />
<path value="$PROJECT_DIR$/vendor/itsgoingd/clockwork" />
<path value="$PROJECT_DIR$/vendor/dnoegel/php-xdg-base-dir" />
<path value="$PROJECT_DIR$/vendor/jenssegers/agent" />
<path value="$PROJECT_DIR$/vendor/erusev/parsedown" />
<path value="$PROJECT_DIR$/vendor/psy/psysh" />
<path value="$PROJECT_DIR$/vendor/league/flysystem" />
<path value="$PROJECT_DIR$/vendor/toddish/verify" />
<path value="$PROJECT_DIR$/vendor/jeremeamia/SuperClosure" />
<path value="$PROJECT_DIR$/vendor/danielstjules/stringy" />
<path value="$PROJECT_DIR$/vendor/laravel/framework" />
<path value="$PROJECT_DIR$/vendor/nikic/php-parser" />
<path value="$PROJECT_DIR$/vendor/monolog/monolog" />
<path value="$PROJECT_DIR$/vendor/doctrine/cache" />
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
<path value="$PROJECT_DIR$/vendor/doctrine/common" />
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
<path value="$PROJECT_DIR$/vendor/doctrine/collections" />
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
<path value="$PROJECT_DIR$/vendor/doctrine/dbal" />
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
<path value="$PROJECT_DIR$/vendor/doctrine/inflector" />
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
<path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
<path value="$PROJECT_DIR$/vendor/jakub-onderka/php-console-highlighter" />
<path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
<path value="$PROJECT_DIR$/vendor/jakub-onderka/php-console-color" />
<path value="$PROJECT_DIR$/vendor/classpreloader/classpreloader" />
<path value="$PROJECT_DIR$/vendor/greggilbert/recaptcha" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
<path value="$PROJECT_DIR$/vendor/shetabit/visitor" />
<path value="$PROJECT_DIR$/vendor/barryvdh/reflection-docblock" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.1">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PhpUnit">
<phpunit_settings>
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" />
</phpunit_settings>
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
</project>

18
.idea/phpspec.xml generated
View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PHPSpec">
<suites>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="namespace" value="App" />
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="namespace" value="App" />
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
</suites>
</component>
</project>

10
.idea/phpunit.xml generated
View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PHPUnit">
<option name="directories">
<list>
<option value="$PROJECT_DIR$/tests" />
</list>
</option>
</component>
</project>

6
.idea/vcs.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

100
.idea/w0bm.iml generated
View File

@@ -1,100 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-ide-helper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/reflection-docblock" />
<excludeFolder url="file://$MODULE_DIR$/vendor/classpreloader/classpreloader" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/cviebrock/eloquent-taggable" />
<excludeFolder url="file://$MODULE_DIR$/vendor/danielstjules/stringy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/dnoegel/php-xdg-base-dir" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/collections" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/common" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/dbal" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/inflector" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/erusev/parsedown" />
<excludeFolder url="file://$MODULE_DIR$/vendor/fzaninotto/faker" />
<excludeFolder url="file://$MODULE_DIR$/vendor/greggilbert/recaptcha" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
<excludeFolder url="file://$MODULE_DIR$/vendor/hamcrest/hamcrest-php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/intervention/image" />
<excludeFolder url="file://$MODULE_DIR$/vendor/itsgoingd/clockwork" />
<excludeFolder url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-color" />
<excludeFolder url="file://$MODULE_DIR$/vendor/jakub-onderka/php-console-highlighter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/jaybizzle/crawler-detect" />
<excludeFolder url="file://$MODULE_DIR$/vendor/jenssegers/agent" />
<excludeFolder url="file://$MODULE_DIR$/vendor/jeremeamia/SuperClosure" />
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/framework" />
<excludeFolder url="file://$MODULE_DIR$/vendor/laravelcollective/html" />
<excludeFolder url="file://$MODULE_DIR$/vendor/league/flysystem" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mews/captcha" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mobiledetect/mobiledetectlib" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mockery/mockery" />
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mtdowling/cron-expression" />
<excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
<excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
<excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/random_compat" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/php-diff" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/phpspec" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit-mock-objects" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psy/psysh" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sentry/sentry" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sentry/sentry-laravel" />
<excludeFolder url="file://$MODULE_DIR$/vendor/shetabit/visitor" />
<excludeFolder url="file://$MODULE_DIR$/vendor/swiftmailer/swiftmailer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/class-loader" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/console" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/css-selector" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/debug" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/dom-crawler" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-kernel" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php56" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-util" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-dumper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" />
<excludeFolder url="file://$MODULE_DIR$/vendor/toddish/verify" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ua-parser/uap-php" />
<excludeFolder url="file://$MODULE_DIR$/vendor/vlucas/phpdotenv" />
<excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -42,7 +42,6 @@ class CategoryController extends Controller
{
//
}
/**
* Display the specified resource.
*
@@ -52,10 +51,12 @@ class CategoryController extends Controller
*/
public function showVideo($shortname, $id = null)
{
// return $shortname;
$category = Category::whereShortname($shortname)->first();
if (is_null($category)) {
return redirect()->back()->with('error', 'Category not found');
}
if (is_null($id)) {
$video = Video::getRandom($category);
if ($video instanceof HasMany) {
@@ -70,6 +71,7 @@ class CategoryController extends Controller
// TODO: Add warning page
$video = $category->videos()->find($id);
}
if (is_null($video)) {
return redirect()->back()->with('error', 'Category is empty.');
}
@@ -81,7 +83,6 @@ class CategoryController extends Controller
return view('video', [
'video' => $video,
'related' => $category,
'isTag' => false,
'sfw' => $sfw,
'banner' => Banner::getRandom($video->isSfw())]);
}

View File

@@ -0,0 +1,118 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\Tag;
class DebugController extends Controller
{
public function getRandomVideoForCategory(Category $category)
{
$randomVideo = \App\Models\Video::getRandom($category);
// Now you can return or use $randomVideo as needed
}
public function getRandomVideoForTag(Tag $tag)
{
$randomVideo = \App\Models\Video::getRandom($tag);
// Now you can return or use $randomVideo as needed
}
public function getSingleRandomVideoForCategory(Category $category)
{
$singleRandomVideo = \App\Models\Video::getSingleRandom($category);
// Now you can return or use $singleRandomVideo as needed
}
public function getSingleRandomVideoForTag(Tag $tag)
{
$singleRandomVideo = \App\Models\Video::getSingleRandom($tag);
// Now you can return or use $singleRandomVideo as needed
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}

View File

@@ -6,9 +6,9 @@ use App\Models\Category;
use App\Models\Video;
use App\Models\Banner;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Relations\HasMany;
use App\Http\Requests;
use Cviebrock\EloquentTaggable\Services\TagService;
use Illuminate\Http\RedirectResponse;
class TagviewController extends Controller
{
@@ -40,11 +40,10 @@ class TagviewController extends Controller
public function showVideo($shortname, $id = null)
{
// return $shortname;
$tags = app(TagService::class)->buildTagArray($shortname);
if (is_null($id)) {
$video = Video::getRandom($tags, true);
if (!($video instanceof RedirectResponse)) {
$video = Video::getRandom($shortname, true);
if ($video instanceof HasMany) {
$video = $video->first();
}
else {
@@ -54,8 +53,7 @@ class TagviewController extends Controller
} else {
// Don't filter on specific video.
// TODO: Add warning page
$video = Video::withAllTags($tags)->find($id);
$video = Video::withAnyTags($shortname)->find($id);
}
if (is_null($video)) {

View File

@@ -126,7 +126,8 @@ class UserController extends Controller
\Session::flash('info', 'Cannot register when logged in');
return redirect('/');
}
return view('apply_open');
//return view('apply_open');
return view('apply-down');
}
public function loggain()
@@ -151,7 +152,7 @@ class UserController extends Controller
$validator = \Validator::make($request->all(), [
'username' => 'required|unique:users|min:3|max:25|alpha_num',
'email' => 'required|email|unique:users|confirmed',
'password' => 'required|min:128|confirmed',
'password' => 'required|min:6|confirmed',
'captcha' => 'required|captcha'
]);
@@ -369,7 +370,6 @@ class UserController extends Controller
return view('video', [
'video' => $vid,
'related' => $user,
'isTag' => false,
'banner' => Banner::getRandom($vid->isSfw()),
'sfw' => $sfw
]);
@@ -436,7 +436,6 @@ class UserController extends Controller
return view('video', [
'video' => $vid,
'related' => $user,
'isTag' => false,
'banner' => Banner::getRandom($vid->isSfw()),
'sfw' => $sfw,
]);

View File

@@ -116,7 +116,7 @@ Route::group(["middleware" => "theme"], function() {
Route::get('user/{username}/uploads/{id}', 'UserController@play')->where('id', '[0-9]+');
Route::get('user/{username}/favs', 'UserController@random_fav')->middleware('auth');
Route::get('best', 'UserController@bestof')->middleware('auth');
Route::get('user/{username}/favs/{id}', 'UserController@play_fav')->where('id', '[0-9]+')->middleware('auth');
Route::get('user/{username}/favs/{id}', 'UserController@play_fav')->where('id', '[0-9]+');
Route::get('user/{username}/favs/index', 'UserController@show_favs')->middleware('auth');
Route::get('user/{username}/comments', 'UserController@show_comments')->middleware('auth');
Route::get('logout', 'UserController@logout');
@@ -124,24 +124,24 @@ Route::group(["middleware" => "theme"], function() {
Route::get('register', 'UserController@create');
Route::post('register', 'UserController@store');
Route::get('activate/{token}', 'UserController@activate');
Route::get('index', 'VideoController@index');
Route::get('main', 'VideoController@main');
Route::post('index/{id}', 'VideoController@update');
Route::get('index', 'VideoController@index')->middleware('auth');
Route::get('main', 'VideoController@main')->middleware('auth');
Route::post('index/{id}', 'VideoController@update')->middleware('auth');
Route::get('upload', 'VideoController@create')->middleware('auth');
Route::get('categories', 'CategoryController@index');
Route::get('categories', 'CategoryController@index')->middleware('auth');
Route::get('webm', function() { return view('webm'); })->middleware('auth');
Route::get('settings', function() { return view('settings'); })->middleware('auth');
Route::get('matrix', function() { return view('matrix'); })->middleware('auth');
Route::get('git', function() { return view('git'); });
Route::get('git', function() { return view('git'); })->middleware('auth');
#Route::get('about', function() { return view('about'); })->middleware('auth');
Route::get('about', 'aboutController@index');
Route::get('about', 'aboutController@index')->middleware('auth');
Route::get('irc', function() { return view('irc'); });
Route::get('rules', 'rulezController@index');
#Route::get('tos', function() { return view('tos'); });
#Route::get('rulez', 'rulezController@index')->middleware('auth');
Route::get('todo', function() { return view('todo'); })->middleware('auth');
Route::get('contact', function() { return view('contact'); });
Route::get('change', function() { return view('change'); });
//Route::get('change', function() { return view('change'); });
#Route::get('terms', function() { return view('tos'); })->middleware('auth');
Route::get('privacy', function() { return view('privacy'); });
Route::get('marderchen', function() { return view('marder'); });
@@ -154,7 +154,8 @@ Route::group(["middleware" => "theme"], function() {
//'fav_count' => \App\Models\UserFavorite::count(),
'latest_video' => \App\Models\Video::getLastId(),
'newest_user' => \App\Models\User::orderBy('id', 'DESC')->first()->username,
//'dirsize' => shell_exec("(du -sh " . public_path() . "/b | cut -f1)")
// this function heavily slows down the page load on /stats in prod. should be addressed some day
'dirsize' => shell_exec("(du -sh " . public_path() . "/b | cut -f1)")
]);
})->middleware('auth');
@@ -186,10 +187,8 @@ Route::group(["middleware" => "theme"], function() {
Route::get('{shortname}', 'CategoryController@showVideo')->where('shortname', '[a-z][a-z0-9]+');
Route::get('{shortname}/{id}', 'CategoryController@showVideo')->where(['shortname' => '[a-z][a-z0-9]+', 'id' => '[0-9]+']);
##Tag View everybody!
Route::get('t/{tag}', 'TagviewController@showVideo');
Route::get('t/{tag}/{id}', 'TagviewController@showVideo')->where('id','[0-9]+');
Route::get('modlog', 'ModeratorLogController@index');
##Tag View anybody?
Route::get('t/{tag}', 'TagviewController@showVideo')->where('tag', '[a-z][a-z0-9]+');
Route::get('t/{tag}/{id}', 'TagviewController@showVideo')->where(['tag' => '[a-z][a-z0-9]+', 'id' => '[0-9]+']);
});

View File

@@ -4,26 +4,6 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Category
*
* @property integer $id
* @property string $name
* @property string $shortname
* @property string $description
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property string $deleted_at
* @property-read \Illuminate\Database\Eloquent\Collection|Video[] $videos
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereId($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereName($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereShortname($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereDescription($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereCreatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereDeletedAt($value)
* @property-read \Illuminate\Database\Eloquent\Collection|User[] $users
*/
class Rulez extends Model
{

View File

@@ -6,7 +6,6 @@ use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Cviebrock\EloquentTaggable\Services\TagService;
/**
* App\Models\Video
@@ -52,6 +51,10 @@ class Video extends Model
use SoftDeletes;
use \Cviebrock\EloquentTaggable\Taggable;
public static function getTags() {
return $tag_list;
}
public function user() {
return $this->belongsTo(User::class);
}
@@ -68,24 +71,12 @@ class Video extends Model
return $this->belongsToMany(User::class, 'favorites', 'video_id', 'user_id');
}
public function hasAllTags($tags) {
$tags = app(TagService::class)->buildTagArrayNormalized($tags);
$videotags = $this->getTagArrayNormalizedAttribute();
foreach ($tags as $t) {
if (!in_array($t,$videotags)) {
return false;
}
}
return true;
}
public static function getFirstId($related = null, $isTag = false) {
if ($related) {
if (!$isTag) {
return $related->videos()->filtered()->orderBy('id', 'ASC')->first()->id;
}
$related = app(TagService::class)->buildTagArray($related);
return Video::withAllTags($related)->filtered()->orderBy('id', 'ASC')->first()->id;
return Video::withAnyTags($related)->filtered()->orderBy('id', 'ASC')->first()->id;
}
return static::filtered()->orderBy('id', 'ASC')->first()->id;
}
@@ -95,8 +86,7 @@ class Video extends Model
if (!$isTag) {
return $related->videos()->filtered()->orderBy('id', 'DESC')->first()->id;
}
$related = app(TagService::class)->buildTagArray($related);
return Video::withAllTags($related)->filtered()->orderBy('id', 'DESC')->first()->id;
return Video::withAnyTags($related)->filtered()->orderBy('id', 'DESC')->first()->id;
}
return static::select('id')->filtered()->orderBy('id', 'DESC')->first()->id;
}
@@ -106,8 +96,7 @@ class Video extends Model
if (!$isTag) {
return $related->videos()->filtered()->where('id', '>', $this->id)->orderBy('id', 'ASC')->first();
}
$related = app(TagService::class)->buildTagArray($related);
return Video::withAllTags($related)->filtered()->where('id', '>', $this->id)->orderBy('id', 'ASC')->first();
return Video::withAnyTags($related)->filtered()->where('id', '>', $this->id)->orderBy('id', 'ASC')->first();
} else {
return static::filtered()->where('id', '>', $this->id)->orderBy('id', 'ASC')->first();
}
@@ -118,8 +107,7 @@ class Video extends Model
if (!$isTag) {
return $related->videos()->filtered()->where('id', '<', $this->id)->orderBy('id', 'DESC')->first();
}
$related = app(TagService::class)->buildTagArray($related);
return Video::withAllTags($related)->filtered()->where('id', '<', $this->id)->orderBy('id', 'DESC')->first();
return Video::withAnyTags($related)->filtered()->where('id', '<', $this->id)->orderBy('id', 'DESC')->first();
} else {
return static::filtered()->where('id', '<', $this->id)->orderBy('id', 'DESC')->first();
}
@@ -259,14 +247,12 @@ public function blurryThumb() {
return $related->videos()->filtered()->skip($id);
}
// jetzt sind wir im tag
$related = app(TagService::class)->buildTagArray($related);
$id = Video::withAllTags($related)->filtered()->countScoped()->count()-1;
$id = Video::withAnyTags($related)->filtered()->countScoped()->count()-1;
if ($id < 0) {
return redirect()->back()->with('error', 'no videos found');
}
$id = mt_rand(0,$id);
return Video::withAllTags($related)->filtered()->skip($id);
return Video::withAnyTags($related)->filtered()->skip($id);
}
$id = static::filtered()->countScoped()->count() - 1;
@@ -293,7 +279,9 @@ public function blurryThumb() {
});
}
public function filesize() {
return filesize(getcwd() . "/b/" . $this->file);
}
}

View File

@@ -147,8 +147,7 @@ return [
| the cookie from being sent to you if it can not be done securely.
|
*/
// This has to be true for production setup and false for local development
'secure' => env('SECURE_COOKIE', 'true')
#'secure' => false,
'secure' => true,
];

View File

@@ -1505,7 +1505,7 @@ div#tag-add {
}
/* Sidebar Mobile */
/*
@media (max-width: 767px) {
#sidebar {
top: 40em;
@@ -1563,15 +1563,14 @@ div#tag-add {
}
@media (max-width: 367px) {
#sidebar {
/*top: 24.6em;*/
top: 27em;
}
}
@media (max-width: 360px) {
}*/
/*@media (max-width: 360px) {
#sidebar {
top: 26.6em;
}
}
} */
/* Sidebar Mobile Queries END */
/* TAGS MOBILE FIXED */
@@ -2278,7 +2277,7 @@ input.form-control {
}
/* Handy fix */
@media (max-width: 690px) {
/* @media (max-width: 690px) {
.text-center {
font-size: 19px;
display: flex;
@@ -2292,7 +2291,7 @@ input.form-control {
}
}
/* @media (max-width: 767px) {
@media (max-width: 767px) {
aside#sidebar::before {
content: "Comments";
width: 100%;
@@ -3464,7 +3463,7 @@ button.w0bmcustom-css:hover {
button.chilledblue-css {
width: 100%;
padding: 5px;
padding-bottom: 5px;
background: #142121;
border: 1px solid #131916;
margin-bottom: 5px;
@@ -3827,7 +3826,7 @@ button#layout5 {
div#parent {
overflow-y: scroll;
height: 15rem;
height: 10rem;
}
a.not-safe-for-work {
@@ -4028,6 +4027,18 @@ repeating-radial-gradient(black, transparent 100px)
min-height: 70vh;
}
/* fancy admin shizzle */
.Chatbot953 {
color: #ff0099 !important;
text-transform: uppercase;
text-shadow: 1px 1px 2px #ff00c8, 0px -2px 0px black, 2px 0px #6eff00;
font-family: vcr;
padding-right: 0px;
padding-left: 0px;
font-size: 17px;
vertical-align: initial;
}
.coronaids {
border: 2px solid red;
padding: 5px;
@@ -4235,7 +4246,6 @@ pre {
background: black;
width: 100%;
margin-bottom: 5px;
padding: 5px;
}
.toggo {
@@ -4278,37 +4288,4 @@ pre {
.metacene {
height: 190px;
background-size: cover;
}
input[type=range]{
width: 100px;
}
input[type=range]::-moz-range-track {
width: 100px;
height: 5px;
background: #ddd;
border: none;
border-radius: 3px;
}
input[type=range]::-moz-range-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: #2080da;
}
input[type=range]:-moz-focusring{
outline: 1px solid white;
outline-offset: -1px;
}
input[type=range]:focus::-moz-range-track {
background: #ccc;
}
div#switcher button {
line-height: 1;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -1442,17 +1442,16 @@ document.querySelectorAll("#layoutSwitcher [id^=layout]").forEach(el => el.addEv
console.warn(response.status, await response.text());
}));
// Turning off mobile detection
// if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
// newlink = document.createElement('a');
// newlink.setAttribute('class', 'mobiledetected');
// newlink.setAttribute('href', '/api/user/layout?layout=5');
// }
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
newlink = document.createElement('a');
newlink.setAttribute('class', 'mobiledetected');
newlink.setAttribute('href', '/api/user/layout?layout=5');
}
// var isMobile = false; //initiate as false
// // device detection
// if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
// || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) {
// isMobile = true;
// window.location.href = "https://w0bm.com/api/user/layout?layout=5";
// }
var isMobile = false; //initiate as false
// device detection
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) {
isMobile = true;
window.location.href = "https://w0bm.com/api/user/layout?layout=5";
}

View File

@@ -1,9 +1,10 @@
# w0bm
# w0bm.com
![w0bm](https://i.imgur.com/hPvnspu.png "w0bm logo")
[![IRC Chat](https://img.shields.io/badge/chat-irc-green.svg)](https://n0xy.net/webirc?join=%23w0bm)
[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
[w0bm.com](https://w0bm.com) was a fun modern website featuring many different kind of videos in webm format. It was initially thought as a [z0r.de](http://z0r.de) without flash, but already surpassed that in our opinion.
[w0bm.com](https://w0bm.com) is a fun modern website featuring many different kind of videos in webm format. It was initially thought as a [z0r.de](http://z0r.de) without flash, but already surpassed that in our opinion.
The page is build on top of the [Laravel Framework](https://laravel.com).
@@ -148,7 +149,7 @@ server {
# Installation
`git clone gitea@git.lat:w0bm/w0bm.git`
`cd w0bm`
`cd w0bm.com`
`php71 composer dump-autoload`
@@ -156,7 +157,7 @@ server {
(You will most likely encounter a issue where 2 packages namely: visitor and captcha require at least php 7.2, to get around this just change the value to 7.1 in the composer.lock file)
For your local development instance make sure that you add SECURE_COOKIE=false to your `.env` otherwise it will not let you log in!
For your local development instance make sure that you change 'secure' => true, to 'secure' => false, in `config/session.php` otherwise it will not let you log in!
Create the .env file with the following content
@@ -179,9 +180,6 @@ RECAPTCHA_PRIVATE=
MATRIX_MAUAUTH=
MATRIX_MAUURL=
# if you are developing
SECURE_COOKIE=false
</pre>
`php71 artisan key:generate`
@@ -226,5 +224,5 @@ Folder structure:
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
The w0bm Logo is copyrighted by w0bm and property of w0bm.
The w0bm.com Logo is copyrighted by w0bm.com and property of w0bm.com

View File

@@ -2,6 +2,11 @@
@section('content')
@include('partials.flash')
user limit reached 6969
<div class="box">
<center>
<h1>Registration is closed</h1>
<p>until further notice</p>
</center>
</div>
@endsection

View File

@@ -4,7 +4,7 @@
<div class="page-header">
<h5>Register your w0bm.com Account</h5>
<p style="color:red;">Note: If you ever lose your password you are fucked, we will <b>NOT</b> reset it. To prevent this not only on w0bm.com but evrywhere we highly recommend the usage of a password manager such as <a href="https://keepassxc.org/">KeePassXC</a></p>
<p style="color:red;font-weight: bold;">MINIMUM PASSWORD LENGTH: 128 👹</p>
<p>Being a member of w0bm.com is <b>NOT</b> a right, it's privilege which can be revoked at any point in time.</p>
</div>
<div class="register">
<form class="form-horizontal" method="post" action="{{action('UserController@store')}}">
@@ -16,7 +16,7 @@
</div>
<div class="form-group">
<div class="">
{!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'Email - must be valid']) !!}
{!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'Email | Must be valid! Confirmation will be sent out']) !!}
</div>
</div>
<div class="form-group">

View File

@@ -20,9 +20,8 @@
}
</style>
<h5>Oh shit! Something went wrong!</h5>
<h5>If you can see this message something with the software went wrong.</h5>
<div id="sf-resetcontent" class="sf-reset box">
<h6>Please don't send this fucking text to an admin, we have other problems.</h6>
<?php
$iv = openssl_random_pseudo_bytes(16);
?>

View File

@@ -2,8 +2,6 @@
<html>
<head>
<title>Please Stand By we are just fucking this up</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;

View File

@@ -21,11 +21,8 @@ function getLastTenCommits() {
echo "</div>";
}
echo "<div class='box'>";
echo "<h5>GIT LOG</h5>";
getLatestCommit();
getLastTenCommits();
echo "</div>";
getLastTenCommits()
?>
@endsection

View File

@@ -28,11 +28,7 @@
@if($edit = auth()->check() && auth()->user()->can('edit_video'))
<form action="/index/{{$video->id}}" method="post" id="edit_{{$video->id}}" class="indexform"></form>
@endif
@if(isset($q) && $video->hasAllTags($q))
<span class="vinfo vid"><a href="/t/{{$q}}/{{$video->id}}">{{$video->id}}</a></span>
@else
<span class="vinfo vid"><a href="{{url($video->id)}}">{{$video->id}}</a></span>
@endif
<span class="vinfo vid"><a href="{{url($video->id)}}">{{$video->id}}</a></span>
@if($edit)
<input type="submit" class="btn btn-primary" value="Save" form="edit_{{$video->id}}">
@endif

View File

@@ -4,14 +4,13 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="theme-color" content="#161618">
<meta name="viewport"
content="width=device-width,initial-scale=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<meta name="_token" content="{{csrf_token()}}">
<meta name="keywords" content="Random WebMs, WebMs, Internet Videos">
<meta name="robots" content="noindex">
@if(auth()->check())<meta name="Description" content="Tags:@if(isset($video)) {{ $video->getTagListAttribute() }} @endif">@endif
<meta name="description" content="">
<meta name="description" content="@if(isset($video)) {{ $video->getTagListAttribute() }} @endif">
<meta property="og:site_name" content="w0bm.com" />
<meta property="og:title" content="@if(isset($video)){{$video->videotitle}}@endif">
<meta name="twitter:card" content="summary_large_image" />
@@ -39,12 +38,15 @@
<link rel="stylesheet" href="/css/video-js.min.css">
<link rel="stylesheet" href="/css/vjsnew.css">
<link rel="stylesheet" href="/css/w0bmcustom.css?v={{ filemtime("css/w0bmcustom.css") }}">
@if(auth()->check())
<link rel="alternate stylesheet" href="/css/w0bm_override.css?v={{ filemtime("css/w0bm_override.css") }}" title="DARK">
<link rel="alternate stylesheet" href="/css/chilledblue.css?v={{ filemtime("css/chilledblue.css") }}" title="Chilledblue">
<link rel="alternate stylesheet" href="/css/xayd.css?v={{ filemtime("css/xayd.css") }}" title="Xayd">
<link rel="alternate stylesheet" href="/css/glitch.css?v={{ filemtime("css/glitch.css") }}" title="Glitch">
<link rel="alternate stylesheet" href="/css/epilepsie.css?v={{ filemtime("css/epilepsie.css") }}" title="Epilepsie">
<script src="/js/styleswitcher.js"></script>
@else
@endif
</head>
<body>
@if(auth()->check())
@@ -54,13 +56,17 @@
@include('partials.frontendedit')
@endif
@endif
@if(auth()->check())
<canvas class="hidden-xs" id="bg"></canvas>
@else
<!-- placeholder? -->
@endif
@include('partials.navigation')
<div class="wrapper">
@yield('aside')
<div class="LooLOut" style="width: auto; overflow: hidden;">
<div class="LooLOut" style="width: auto; overflow: hidden; position: relative;">
<noscript><div class="no-js-mode" style="position: fixed;bottom: 0;right: 0;">nojs</div></noscript>
<div class=" container">
@yield('content')
@@ -68,6 +74,7 @@
</div>
</div>
@if(auth()->check())
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/bootstrap-tagsinput.min.js"></script>
@@ -95,6 +102,9 @@ clipboard.on('error', function(e) {
});
</script>
<script src="/js/w0bmscript.js?v={{ filemtime("js/w0bmscript.js") }}"></script>
@else
@endif
@if(isset($video))
@else
@endif

View File

@@ -15,26 +15,8 @@
<?php
$thumb = str_replace(".webm","",$video->file);
?>
<div style="position: relative;" class="main-item hasTag-{{$video->id}}">
@if(isset($q) && $video->hasAllTags($q))
<a href="/t/{{$q}}/{{$video->id}}">
<style>
.hasTag-{{$video->id}}::after {
content: "\f02b";
font: normal normal normal 14px/1 FontAwesome;
position: absolute;
bottom: 0;
left: 0;
padding: 5px;
color: #1fb2b0;
text-shadow: 1px 1px 1px black;
font-size: 2em;
pointer-events: none;
}
</style>
@else
<a href="/{{$video->id}}">
@endif
<div class="main-item">
<a href="/{{$video->id}}">
{{-- MUSS UNBEDINGT NOCH ANGEPASST WERDEN!!! --}}
@if(file_exists(public_path() . '/thumbs/beta/'.$thumb.'.png'))
<img src="/thumbs/beta/{{$thumb}}.png">

View File

@@ -19,6 +19,7 @@
<p>Also make sure to check out his uploads <a href="https://w0bm.com/main?q=marderchen">https://w0bm.com/main?q=marderchen</a> and enjoy it.</p>
<p><i>- w0bm staff</i></p>
<p style="float: right;">21.6.2023</p>
</div>
@endsection

View File

@@ -11,9 +11,12 @@
</a>
@endif
</div>-->
{{-- hier kann theoretisch notification angezeigt--}}
{{-- <div id="nutti">
<p>Please check out the overhauled <a href="https://w0bm.com/api/user/layout?layout=2">Njum</a> Layout and give me some feedback!</p>
</div> --}}
{{-- <div id="nutti">
<p>Next month w0bm turns 6 years old! Wouldn't be possible without all of you! Thanks</p>
</div> --}}
@if(Auth::check())
@if($video->id == '30186')
@include('partials.thread_closed')
@@ -44,19 +47,7 @@
</div>
</div>
@else
<style>
#sidebar {
height: unset !important;
position: absolute;
bottom: 0;
background-color: transparent !important;
}
.vertical-align {
min-height: calc(90vh - 50px);
}
</style>
<!-- <div class="comments hidden-xs">
<div class="comments hidden-xs">
<div class="commentwrapper">
<div class="panel panel-default ">
<div class="panel-body">
@@ -65,5 +56,5 @@
<div class="panel-footer">by w0bm </div>
</div>
</div>
</div> -->
</div>
@endif

View File

@@ -0,0 +1,5 @@
<div style="position: relative;">
<?php
echo $category;
?>
</div>

View File

@@ -5,6 +5,8 @@
<ul class="dropdown-menu">
<div class="layoutblah">
<button class="layoutbutton" id="layout2">Njum</button>
<br>
<button class="layoutbutton" id="layout3">z0mb</button>
</div>
</ul>
</li>

View File

@@ -18,7 +18,7 @@
</div>
<div class="modal-footer">
<p>Create your account now! <a href="/register">Click here</a></p>
<p>Registration has been disabled and will stay closed until further notice.</p>
</div>
</div>
</div>

View File

@@ -12,7 +12,7 @@
<img src="{{ asset('logo.svg') }}" alt="w0bm.com">
</a>
@else
<a class="navbar-brand" href="/main">
<a class="navbar-brand" href="/">
<img src="{{ asset('logo.svg') }}" alt="w0bm.com">
</a>
@endif
@@ -20,16 +20,20 @@
</div>
<div class=" collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left">
<li><a href="{{url('categories')}}"><i class="fa fa-clone"></i><span class="hidden-sm"> Categories</span></a></li>
<li><a href="{{url('index')}}"><i class="fa fa-list"></i><span class="hidden-sm"> Index</span></a></li>
@if(Auth::check())
<ul class="nav navbar-nav navbar-left">
<li><a href="{{url('categories')}}"><i class="fa fa-clone"></i><span class="hidden-sm"> Categories</span></a></li>
<li><a href="{{url('index')}}"><i class="fa fa-list"></i><span class="hidden-sm"> Index</span></a></li>
@include('partials.themechanger')
@endif
@if(Auth::check())
@include('partials.layoutchanger')
@endif
@include('partials.searchmodal')
<li><a href="#" data-toggle="modal" data-target="#searchmodal"><i class="fa fa-search"></i><span class="hidden-sm"> Find shit</span></a></li>
@if(Auth::check())
@include('partials.searchmodal')
<li><a href="#" data-toggle="modal" data-target="#searchmodal"><i class="fa fa-search"></i><span class="hidden-sm"> Find shit</span></a></li>
@else
@endif
</ul>
@if(Auth::check())
<ul class="nav navbar-nav navbar-right">
@@ -43,9 +47,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>

View File

@@ -19,6 +19,7 @@
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/bootstrap-tagsinput.css">
<link rel="stylesheet" href="/css/w0bmcustom.css?v={{ filemtime("css/w0bmcustom.css") }}">
@if(auth()->check())
<link rel="stylesheet" href="/css/video-js.min.css">
<link rel="stylesheet" href="/css/simplebar.css" />
<link rel="stylesheet" href="/css/vjsnew.css?v=1.1.1">
@@ -28,6 +29,8 @@
<link rel="alternate stylesheet" href="/css/glitch.css?v={{ filemtime("css/glitch.css") }}" title="Glitch">
<link rel="alternate stylesheet" href="/css/epilepsie.css?v={{ filemtime("css/epilepsie.css") }}" title="Epilepsie">
<script src="/js/styleswitcher.js"></script>
@else
@endif
</head>
<body>
@if(auth()->check())
@@ -40,7 +43,10 @@
@include('partials.banmenu')
@endif
@endif
@if(auth()->check())
<canvas id="bg" @if(!Session::get('background', true)) style="display: none;"@endif></canvas>
@else
@endif
@include('partials.navigation')
<div class="wrapper">
@@ -53,6 +59,7 @@
</div>
</div>
@if(auth()->check())
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/bootstrap-tagsinput.min.js"></script>
@@ -61,5 +68,7 @@
<script src="/js/handlebars.min.js"></script>
<script src="/js/jquery.timeago.js"></script>
<script src="/js/w0bmscript.js?v={{ filemtime("js/w0bmscript.js") }}"></script>
@else
@endif
</body>
</html>

View File

@@ -9,6 +9,7 @@
<p class="comment_count">Total amount of comments: <amount>{{$comment_count}}</amount></p>
<p class="latest-video">Latest video <a href="/{{$latest_video}}">/{{$latest_video}}</a></p>
<p class="newest_user">Newest user <a href="/user/{{$newest_user}}">/user/{{$newest_user}}</a></p>
<p class="dirsize">Total size of w0bm: <amount>{{$dirsize}}</amount></p>
</div>
@include('footer')
@endsection

View File

@@ -0,0 +1,8 @@
<a href="/t/{{$tag}}">rand</a>
<br>
leon du huan
<br>
<video controls src="/b/{{ $video[0]['file'] }}"></video>
<br>

View File

@@ -1,6 +1,10 @@
<div style="background:black;color:green;">
{{$video}}
</div>
@extends('layout')
@section('content')
@if(auth()->check())
<?php $related = $related ?? null; ?>
<div class="vertical-align">
<div class="wrapper">
@@ -31,6 +35,10 @@
</div>
@endif
</div>
<?php
//$shortfile = str_replace(".webm", "" ,$video->file);
//$mp4 = shell_exec("curl https://fapple.w0bm.com/api/v1/{{$shortfile}} | jq -r .size");
?>
<div class="text-center" style="position: unset;">
@if($related)
@if(($prev = $video->getPrev($related,$isTag)) === null)
@@ -114,7 +122,7 @@
title="Information"
data-content="@include('popover-content')">
</button>
<span id="uploader">@if(auth()->check())contributed by <a class="{{ $video->user->username }}" style="color: white" href="{{ url('user/' . $video->user->username) }}">{!! $video->user->displayName() !!}</a></span>@else @endif <time class="timeago" data-toggle="tooltip" data-placement="top" datetime="{{$video->created_at->toIso8601String()}}" title="{{$video->created_at->toIso8601String()}}"></time>@if(auth()->check() && (auth()->user()->can('edit_video') || auth()->user()->id == $video->user_id)) <a class="edit_video" href="#" data-toggle="modal" data-target="#webmeditmodal">[edit]</a>@endif @if(auth()->check() && auth()->user()->can('delete_video'))<a class="delete_video" href="#">[del]</a>@endif
<span id="uploader">uploaded by <a class="{{ $video->user->username }}" style="color: white" href="{{ url('user/' . $video->user->username) }}">{!! $video->user->displayName() !!}</a></span> <time class="timeago" data-toggle="tooltip" data-placement="top" datetime="{{$video->created_at->toIso8601String()}}" title="{{$video->created_at->toIso8601String()}}"></time>@if(auth()->check() && (auth()->user()->can('edit_video') || auth()->user()->id == $video->user_id)) <a class="edit_video" href="#" data-toggle="modal" data-target="#webmeditmodal">[edit]</a>@endif @if(auth()->check() && auth()->user()->can('delete_video'))<a class="delete_video" href="#">[del]</a>@endif
</span>
</div>
</div>
@@ -128,4 +136,54 @@
@include('partials.comments')
@include('partials.tags')
</aside>
@else
{{{-- Wenn man nicht eingeloggt ist könnte man folgendes sehen, bzw machen --}}}
<div class="centered">
<div class="modal-content col-md-5">
<div class="modal-header">
<h4 class="modal-title" id="filterModalTitle">Login</h4>
</div>
@include('partials.flash')
<div class="login_wrapper">
<div class="col-md">
<form action="{{action('UserController@login')}}" method="post" class="navbar-form">
{!! csrf_field() !!}
<input type="text" name="identifier" placeholder="Username" class="form-control usernamelogin"><br>
<input type="password" name="password" placeholder="Password" class="form-control passwordlogin"><br>
<button type="submit" class="btn btn-primary">Login</button> <input style="vertical-align: unset;" id="rememberme" checked type="checkbox" name="remember"> <span id="rember">Remember me?</span>
</form>
</div>
</div>
<div class="media not-logged-in">
<div class="media-left">
@if($sfw)
<img class="media-object" src="/thumbs/beta/{{str_replace('.webm','',$video->file)}}.png">
@else
<img class="media-object" src="/thumbs/blurred/{{str_replace('.webm','',$video->file)}}_blurred.png">
@endif
</div>
<div class="media-koerper">
<h4 class="media-heading">
@if($video->videotitle){{$video->videotitle}}
@else
<p><i>No Title</i></p></h4>
@endif</h4>
<div id="tag-display" style="width: auto; height: auto;" class="tag-panel-body">
@if(count($video->tags))
@foreach($video->tags as $tag)
<span class="label label-default"><a class="default-link">{{$tag->name}}</a></span>
@endforeach
@else
No tags yet ...
@endif
</div>
</div>
</div>
<div class="modal-footer">
<a href="/privacy">Privacy</a> | <a href="/contact">Contact</a> | <a href="/irc">IRC</a>
</div>
</div>
</div>
@endif
@endsection

View File

@@ -1,31 +0,0 @@
@extends('profilelayout')
@section('novidcontent')
<?php
function getLatestCommit() {
$latestCommit = shell_exec('git log -n 1');
$getcommitID = substr($latestCommit,0,48);
$commitID = substr($getcommitID, 7);
echo "<div class='box'>";
echo "<span>Latest commit</span>";
//echo "<h4><a style='color:white' href='https://git.lat/w0bm/w0bm/commit/$commitID' target='_blank'>$commitID</a></h4>";
echo "<pre>$latestCommit</pre>";
echo "</div>";
}
function getLastTenCommits() {
$lastTenCommits = shell_exec('git log -n 10');
echo "<div class='box'>";
echo "<span>Last 10 Commits</span>";
echo "<pre>$lastTenCommits</pre>";
echo "</div>";
}
echo "<div class='box'>";
echo "<h5>GIT LOG</h5>";
getLatestCommit();
getLastTenCommits();
echo "</div>";
?>
@endsection

View File

@@ -30,12 +30,8 @@
<form action="/index/{{$video->id}}" method="post" id="edit_{{$video->id}}" class="indexform"></form>
@endif
<div class="relativebla">
@if(isset($q) && $video->hasAllTags($q))
<span class="vinfo vid"><a href="/t/{{$q}}/{{$video->id}}">{{$video->id}}</a></span>
@else
<span class="vinfo vid"><a href="{{url($video->id)}}">{{$video->id}}</a></span>
@endif
<a href="{{url($video->id)}}"><img id="indexthumb" src="/thumbs/beta/{{$thumb}}.png"></a>
<a href="{{url($video->id)}}"><img id="indexthumb" src="/thumbs/beta/{{$thumb}}.png"></a>
</div>
@if($edit)
<input type="submit" class="btn btn-primary" value="Save" form="edit_{{$video->id}}">

View File

@@ -5,26 +5,8 @@
<?php
$thumb = str_replace(".webm","",$video->file);
?>
<div style="position: relative;" class="main-item hasTag-{{$video->id}}">
@if(isset($q) && $video->hasAllTags($q))
<a href="/t/{{$q}}/{{$video->id}}">
<style>
.hasTag-{{$video->id}}::after {
content: "\f02b";
font: normal normal normal 14px/1 FontAwesome;
position: absolute;
bottom: 0;
left: 0;
padding: 5px;
color: #0bb568;
text-shadow: 1px 1px 1px black;
font-size: 1em;
pointer-events: none;
}
</style>
@else
<a href="/{{$video->id}}">
@endif
<div class="main-item">
<a href="/{{$video->id}}">
@if(file_exists(public_path() . '/thumbs/beta/'.$thumb.'.png'))
<img src="/thumbs/beta/{{$thumb}}.png">
@else

View File

@@ -51,6 +51,7 @@
</a>
<div id="layoutSwitcher" class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" id="layout1" href="#">Atmos</a>
<a class="dropdown-item" id="layout3" href="#">z0mb</a>
</div>
</li>

View File

@@ -10,6 +10,7 @@
<p class="comment_count">Total amount of comments: <amount>{{$comment_count}}</amount></p>
<p class="latest-video">Latest video <a href="/{{$latest_video}}">/{{$latest_video}}</a></p>
<p class="newest_user">Newest user <a href="/user/{{$newest_user}}">/user/{{$newest_user}}</a></p>
<p class="dirsize">Total size of w0bm: <amount>{{$dirsize}}</amount></p>
</div>
</div>
@endsection

View File

@@ -1,19 +1,19 @@
<div class="row videonavigation">
@if($related)
@if(($prev = $video->getPrev($related, $isTag)) === null)
@if(($prev = $video->getPrev($related)) === null)
<div class="col- first-video"><a class="first" href="#" style="visibility: hidden;"><i class="fa fa-arrow-left"></i> first</a></div>
<div class="col video-navigation"><a id="prev" href="#" style="visibility: hidden;"><i class="fa fa-arrow-left"></i> prev</a> |
@else
<div class="col- first-video"><a class="first" href="{{url($isTag ? '/t/' . $related : $related->baseurl(), $video->getFirstId($related,$isTag))}}"><i class="fa fa-arrow-left"></i> first</a></div>
<div class="col video-navigation"><a id="prev" href="{{url($isTag ? '/t/' . $related : $related->baseurl(), [$prev->id])}}"><i class="fa fa-arrow-left"></i> prev</a> |
<div class="col- first-video"><a class="first" href="{{url($related->baseurl(), $video->getFirstId($related))}}"><i class="fa fa-arrow-left"></i> first</a></div>
<div class="col video-navigation"><a id="prev" href="{{url($related->baseurl(), [$prev->id])}}"><i class="fa fa-arrow-left"></i> prev</a> |
@endif
<a href="{{url($isTag ? '/t/' . $related : $related->baseurl())}}">{!!$isTag ? $related:$related->displayName()!!}</a>
@if(($next = $video->getNext($related,$isTag)) === null)
<a href="{{url($related->baseurl())}}">{!!$related->displayName()!!}</a>
@if(($next = $video->getNext($related)) === null)
| <a id="next" href="#" style="visibility: hidden;">next <i class="fa fa-arrow-right"></i></a></div>
<div class="col- latest-video"><a class="last" href="#" style="visibility: hidden;">last <i class="fa fa-arrow-right"></i></a></div>
@else
| <a id="next" href="{{url($isTag ? '/t/' . $related : $related->baseurl(), [$next->id])}}">next <i class="fa fa-arrow-right"></i></a></div>
<div class="col- latest-video"><a class="last" href="{{url($isTag ? '/t/' . $related : $related->baseurl(), $video->getLastId($related,$isTag))}}">last <i class="fa fa-arrow-right"></i></a></div>
| <a id="next" href="{{url($related->baseurl(), [$next->id])}}">next <i class="fa fa-arrow-right"></i></a></div>
<div class="col- latest-video"><a class="last" href="{{url($related->baseurl(), $video->getLastId($related))}}">last <i class="fa fa-arrow-right"></i></a></div>
@endif
@else
@if(($prev = $video->getPrev()) === null)

View File

@@ -5,7 +5,7 @@
<div class="video">
<div class="embed-responsive embed-responsive-16by9">
<video id="video" class="video embed-responsive-item" loop preload="auto" crossorigin="anonymous">
<source src="/b{{ "/" . $video->file }}">
<source src="//w0bm.com/b{{ "/" . $video->file }}">
</video>
</div>
</div>
@@ -19,7 +19,7 @@
<div class="video-wrap embed-responsive embed-responsive-16by9">
<div class="video">
<video id="video" class="video embed-responsive-item" loop preload="auto" crossorigin="anonymous">
<source src="/b{{ "/" . $video->file }}">
<source src="//w0bm.com/b{{ "/" . $video->file }}">
</video>
</div>
</div>
@@ -40,7 +40,7 @@
<iframe style="height:100%!important; min-height: auto!important;" src="https://w0bm.com/loop/index.html"></iframe>
@else
<video class="video scrollable" loop id="video" controls>
<source src="/b{{ "/" . $video->file }}">
<source src="//w0bm.com/b{{ "/" . $video->file }}">
</video>
@endif
</div>