115 Commits
staging ... dev

Author SHA1 Message Date
1dff66469c Merge branch 'master' into dev 2026-07-01 16:00:22 +00:00
04b9db3359 Merge remote-tracking branch 'origin/dev' into dev 2026-07-01 17:59:54 +02:00
77f777b647 Added manual hashes. 2026-07-01 17:59:50 +02:00
870749d9b7 Merge pull request 'dev' (#31) from dev into master
Reviewed-on: #31
2026-07-01 13:11:56 +00:00
550e7f7214 Merge branch 'master' into dev 2026-07-01 13:11:53 +00:00
e42f0852b1 Merge remote-tracking branch 'origin/dev' into dev 2026-07-01 15:11:24 +02:00
6ace975ab8 Fixed encoded characters. 2026-07-01 15:11:18 +02:00
3bd3619c69 Merge pull request 'dev' (#30) from dev into master
Reviewed-on: #30
2026-07-01 11:44:48 +00:00
9ec774f01e Merge branch 'master' into dev 2026-07-01 11:44:44 +00:00
db2d336b24 Merge remote-tracking branch 'origin/dev' into dev 2026-07-01 13:43:32 +02:00
ee767a433b Added helper to description field. 2026-07-01 13:41:58 +02:00
0c7f8d001d Improve topbar 2026-07-01 13:37:28 +02:00
69af7777d2 Merge pull request 'dev' (#29) from dev into master
Reviewed-on: #29
2026-07-01 10:26:50 +00:00
e7a2a99dba Merge branch 'master' into dev 2026-07-01 10:26:46 +00:00
c413491171 Merge remote-tracking branch 'origin/dev' into dev 2026-07-01 12:26:23 +02:00
a6d8d924f1 Fixed another CSS problems 2026-07-01 12:26:19 +02:00
c3f13a23af Merge pull request 'dev' (#28) from dev into master
Reviewed-on: #28
2026-07-01 09:56:52 +00:00
4c84287274 Merge branch 'master' into dev 2026-07-01 09:56:48 +00:00
2c1677692f Merge remote-tracking branch 'origin/dev' into dev 2026-07-01 11:56:26 +02:00
ee5b2f6e09 Fixed another CSS problems 2026-07-01 11:56:22 +02:00
fda7aca4f9 Merge pull request 'dev' (#27) from dev into master
Reviewed-on: #27
2026-07-01 09:51:48 +00:00
ed91375514 Merge branch 'master' into dev 2026-07-01 09:51:44 +00:00
d2a2027c42 Merge remote-tracking branch 'origin/dev' into dev 2026-07-01 11:51:35 +02:00
b422cd2c82 Fixed a lot of responsive problems.
- Fixed auth problem
- Fixed BBCode and Markdown apparition in some unnecessary parts
2026-07-01 11:51:30 +02:00
f5a90aea4d Merge pull request 'dev' (#26) from dev into master
Reviewed-on: #26
2026-06-30 18:08:02 +00:00
dff376217f Merge branch 'master' into dev 2026-06-30 18:07:58 +00:00
55a8154b52 Merge remote-tracking branch 'origin/dev' into dev 2026-06-30 20:07:42 +02:00
8ca82fd0c8 Fixed Guzzle 30000ms error and improve cache usage 2026-06-30 20:07:38 +02:00
837b3de163 Merge pull request 'dev' (#25) from dev into master
Reviewed-on: #25
2026-06-30 17:46:05 +00:00
71014349aa Merge branch 'master' into dev 2026-06-30 17:46:01 +00:00
aefe03ed67 Merge remote-tracking branch 'origin/dev' into dev 2026-06-30 19:45:22 +02:00
1afe77415d Fixed 500 error on form error 2026-06-30 19:45:16 +02:00
f492a4d02f Fixed Marks all and added total downloads to entries.show 2026-06-30 19:07:57 +02:00
0c0a6a401e Merge pull request 'dev' (#24) from dev into master
Reviewed-on: #24
2026-06-30 15:49:34 +00:00
bdc4158dec Merge branch 'master' into dev 2026-06-30 15:48:36 +00:00
0ecb4610eb Merge remote-tracking branch 'origin/dev' into dev 2026-06-30 17:48:14 +02:00
d75d76ef6e Fix News aside 2026-06-30 17:48:09 +02:00
dc6df8b02a Merge pull request 'dev' (#23) from dev into master
Reviewed-on: #23
2026-06-30 14:13:09 +00:00
a91106ddf7 Merge branch 'master' into dev 2026-06-30 14:13:05 +00:00
53b611bb31 Merge remote-tracking branch 'origin/dev' into dev 2026-06-30 16:12:22 +02:00
7e1f8fc55a Fix XF News comment 2026-06-30 16:12:17 +02:00
f71c51f4ba Merge pull request 'dev' (#22) from dev into master
Reviewed-on: #22
2026-06-30 12:52:20 +00:00
ef24a16132 Merge branch 'master' into dev 2026-06-30 12:52:14 +00:00
3b0051585c Merge remote-tracking branch 'origin/dev' into dev 2026-06-30 14:52:00 +02:00
a52db45972 Quick fix 2026-06-30 14:51:56 +02:00
487b2e2956 Merge pull request 'dev' (#21) from dev into master
Reviewed-on: #21
2026-06-30 12:07:01 +00:00
74a678edda Merge branch 'master' into dev 2026-06-30 12:06:57 +00:00
dc577f5c8b Merge remote-tracking branch 'origin/dev' into dev 2026-06-30 14:06:18 +02:00
22893fd957 Final changes 2026-06-30 14:06:11 +02:00
176a883633 Fix profile picture not aligned 2026-06-29 19:39:10 +02:00
3cb98ce542 Fix download sort 2026-06-29 19:35:53 +02:00
300c417f3c Merge pull request 'dev' (#20) from dev into master
Reviewed-on: #20
2026-06-29 17:30:56 +00:00
dcf99a3351 Merge branch 'master' into dev 2026-06-29 17:30:50 +00:00
1bc89691d9 Merge remote-tracking branch 'origin/dev' into dev 2026-06-29 19:24:40 +02:00
c76bf45904 Fixed several bugs 2026-06-29 19:24:35 +02:00
3cdb6f88b8 Merge pull request 'dev' (#19) from dev into master
Reviewed-on: #19
2026-06-29 15:49:08 +00:00
378c34b8c0 Merge branch 'master' into dev 2026-06-29 15:49:01 +00:00
73844b6db0 Merge remote-tracking branch 'origin/dev' into dev 2026-06-29 17:48:50 +02:00
f47528a2a1 Fix LUA error 2026-06-29 17:46:15 +02:00
6977d5ad57 Merge pull request 'dev' (#18) from dev into master
Reviewed-on: #18
2026-06-29 13:01:52 +00:00
0009d3339e Merge branch 'master' into dev 2026-06-29 13:01:45 +00:00
93acbb4325 Merge remote-tracking branch 'origin/dev' into dev 2026-06-29 15:01:20 +02:00
e9fdc9be51 Finish grids 2026-06-29 14:58:08 +02:00
a1ca5b084a Merge pull request 'dev' (#17) from dev into master
Reviewed-on: #17
2026-06-29 10:42:28 +00:00
60dfa1588a Merge branch 'master' into dev 2026-06-29 10:42:24 +00:00
60ce1cf400 Merge remote-tracking branch 'origin/dev' into dev 2026-06-29 12:42:03 +02:00
a9158c722a Stop tracking config/xenforo.php 2026-06-29 12:41:45 +02:00
848c528de3 Merge pull request 'Add maintenance pages' (#16) from dev into master
Reviewed-on: #16
2026-06-29 10:39:07 +00:00
d163d24780 Merge branch 'master' into dev 2026-06-29 10:38:37 +00:00
05e7d4754f Merge remote-tracking branch 'origin/dev' into dev 2026-06-29 11:47:29 +02:00
1abfa96c2c Add maintenance pages 2026-06-29 11:47:19 +02:00
b6dcaa195d Merge pull request 'dev' (#15) from dev into master
Reviewed-on: #15
2026-06-28 18:48:43 +00:00
08fcca7ce0 Merge branch 'master' into dev 2026-06-28 18:48:37 +00:00
bb8fdac460 Merge remote-tracking branch 'origin/dev' into dev 2026-06-28 20:48:08 +02:00
d41be1f36e Change messages. 2026-06-28 20:48:01 +02:00
86ca0ecd77 Merge pull request 'Last before first production' (#14) from dev into master
Reviewed-on: #14
2026-06-28 12:09:54 +00:00
ed5e794692 Merge branch 'master' into dev 2026-06-28 12:09:48 +00:00
1bb842cdd3 Merge remote-tracking branch 'origin/dev' into dev 2026-06-28 14:07:34 +02:00
755554293e Update menu entries and fixes some profile picture problems.
Added help pages too.
2026-06-28 14:07:20 +02:00
3195a40f53 Merge pull request 'dev' (#13) from dev into master
Reviewed-on: #13
2026-06-27 17:25:18 +00:00
e02e404942 Merge branch 'master' into dev 2026-06-27 17:25:12 +00:00
b562abd271 Merge remote-tracking branch 'origin/dev' into dev 2026-06-27 19:25:00 +02:00
43018e5aae Added hashes calculate and fix hashes problems 2026-06-27 19:24:55 +02:00
3225bd9a74 Merge pull request 'dev' (#12) from dev into master
Reviewed-on: #12
2026-06-27 17:02:40 +00:00
e35d7fa480 Merge branch 'master' into dev 2026-06-27 17:02:35 +00:00
593479f41f Merge remote-tracking branch 'origin/dev' into dev 2026-06-27 18:57:35 +02:00
76a1e62129 Added NSFW compatibility 2026-06-27 18:57:26 +02:00
d9c907d643 Merge pull request 'dev' (#11) from dev into master
Reviewed-on: #11
2026-06-26 15:50:04 +00:00
71c4cbef46 Merge branch 'master' into dev 2026-06-26 15:49:57 +00:00
4a7c43f9e7 Merge remote-tracking branch 'origin/dev' into dev 2026-06-26 17:48:57 +02:00
cac8b03a0d Add files migration 2026-06-26 17:48:51 +02:00
632374af7e Merge pull request 'dev' (#10) from dev into master
Reviewed-on: #10
2026-06-25 16:37:34 +00:00
dc0a09f530 Merge branch 'master' into dev 2026-06-25 16:37:27 +00:00
8e83110093 Merge remote-tracking branch 'origin/dev' into dev 2026-06-25 18:37:11 +02:00
edecfafea8 Fix SEO Title problem 2026-06-25 18:37:06 +02:00
fa403d58b0 Merge pull request 'dev' (#9) from dev into master
Reviewed-on: #9
2026-06-25 11:40:58 +00:00
6ae5e083a5 Merge branch 'master' into dev 2026-06-25 11:40:52 +00:00
8d954872d5 Merge remote-tracking branch 'origin/dev' into dev 2026-06-25 13:40:39 +02:00
35701ad7e6 Fix SSL request 2026-06-25 13:40:34 +02:00
4409e427e2 Merge pull request 'dev' (#8) from dev into master
Reviewed-on: #8
2026-06-25 11:07:04 +00:00
d5d24657c3 Merge branch 'master' into dev 2026-06-25 11:06:59 +00:00
3f6a469e96 Merge remote-tracking branch 'origin/dev' into dev 2026-06-25 13:06:22 +02:00
0fae5bbcd7 Fix commands 2026-06-25 13:06:14 +02:00
712d2b2161 SEO Time 2026-06-24 19:20:33 +02:00
0c7c430c73 Merge pull request 'dev' (#7) from dev into master
Reviewed-on: #7
2026-06-24 11:10:04 +00:00
30977ca676 Merge branch 'master' into dev 2026-06-24 11:09:58 +00:00
2f8cc01e0a Merge remote-tracking branch 'origin/dev' into dev 2026-06-24 13:09:45 +02:00
94d4e25a2d Fix migration problems 2026-06-24 13:09:39 +02:00
f927c35bab Merge pull request 'dev' (#6) from dev into master
Reviewed-on: #6
2026-06-24 10:39:43 +00:00
9b94faaade Merge branch 'master' into dev 2026-06-24 10:39:37 +00:00
d677eff19f Merge remote-tracking branch 'origin/dev' into dev 2026-06-24 12:39:15 +02:00
f9bb53a90d Fix migration problems 2026-06-24 12:39:01 +02:00
c0e0a3974f Merge pull request 'dev' (#5) from dev into master
Reviewed-on: #5
2026-06-24 10:13:33 +00:00
2dd47100bc Merge branch 'master' into dev 2026-06-24 10:13:28 +00:00
b0d90548e5 Merge pull request 'dev' (#1) from dev into master
Reviewed-on: #1
2026-06-09 08:38:18 +00:00
115 changed files with 3143 additions and 1351 deletions

4
.gitignore vendored
View File

@@ -27,3 +27,7 @@ Homestead.yaml
Thumbs.db
avancee.ods
.~lock.avancee.ods#
rhpz.local+1.pem
rhpz.local+1-key.pem
extra.less
config/xenforo.php

View File

@@ -64,6 +64,19 @@ class XenForoGuard implements Guard
if ($this->hasUser())
return $this->user;
$user = $this->getFromSession();
if( $user )
return $user;
$user = $this->getFromCookie();
if( $user )
return $user;
return null;
}
private function getFromSession(): ?XenForoUser
{
$sessionId = $this->request->cookie('xf_session');
if(!$sessionId)
return null;
@@ -92,6 +105,64 @@ class XenForoGuard implements Guard
return $this->user = new XenForoUser($xfUser);
}
private function isCorrectCookieKey(string $key, $record): bool
{
$known = $record->remember_key;
if( !$known )
return false;
$check = hash('sha256', $key, true);
return hash_equals($known, $check);
}
private function getFromCookie(): ?XenForoUser
{
$cookie = $this->request->cookie('xf_user');
if(!$cookie)
return null;
$parts = explode(',', $cookie);
if( count( $parts ) !== 2 )
return null;
[$userId, $key] = $parts;
$userId = (int) $userId;
if( !$userId || !$key )
return null;
$remembers = \DB::connection('xenforo')
->table('user_remember')
->where('user_id', $userId)
->get();
if( !$remembers )
return null;
$valid = false;
foreach( $remembers as $remember )
{
if( $this->isCorrectCookieKey($key, $remember) && $remember->expiry_date >= time() ){
$valid = true;
break;
}
}
if( !$valid )
return null;
$xfUser = \DB::connection('xenforo')
->table('user')
->where('user_id', $userId)
->first();
if(!$xfUser)
return null;
return $this->user = new XenForoUser($xfUser);
}
/**
* Unused.
*

View File

@@ -60,6 +60,7 @@ use Illuminate\Contracts\Auth\Authenticatable;
* Custom properties.
*
* @property-read int $rhpz_entry_count
* @property-read int $nsfw_content
*/
class XenForoUser extends XenForoData implements Authenticatable, Authorizable, FilamentUser, HasName {

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Console\Commands;
use App\Helpers\HashesHelpers;
use App\Models\EntryHash;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
#[Signature('hashes:calculate')]
#[Description('Recalculate all hashes for EntryHashes')]
class CalculateAllHashes extends Command
{
public function handle()
{
EntryHash::where('verified', '=', 'TBD')->cursor()->each(function ($entryHash) {
if( ( $hash = HashesHelpers::findHashes( $entryHash->hash_sha1 ) ) !== null ){
$entryHash->filename = $hash->filename;
$entryHash->hash_crc32 = $hash->crc32;
$entryHash->hash_sha1 = $hash->sha1;
$entryHash->verified = HashesHelpers::getReferenceName( $hash->dat_reference_id );
$entryHash->save();
} else {
if( !$entryHash->hash_crc32 || !$entryHash->hash_sha1 )
$entryHash->delete();
else {
if (!$entryHash->filename)
$entryHash->filename = "Unknown";
$entryHash->verified = 'No';
$entryHash->save();
}
}
});
$this->info('Hashes calculated');
}
}

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Console\Commands;
use App\Helpers\MigrationHelpers;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Command;
use App\Models\Entry;
use Illuminate\Support\Facades\DB;
use League\HTMLToMarkdown\HtmlConverter;
#[Signature('fix:entries-encoded-description {--dry-run}')]
#[Description('Remove coded specials chars in description')]
class FixEntriesEncodedDescription extends Command
{
public function handle(): int
{
$dryRun = $this->option('dry-run');
$fixed = 0;
Entry::withTrashed()
->withoutGlobalScopes()
->chunkById(100, function ($entries) use (&$fixed, $dryRun) {
foreach ($entries as $entry) {
$original = $entry->description;
if ($original === null || $original === '') {
continue;
}
$decoded = $original;
for ($i = 0; $i < 20; $i++) {
$next = html_entity_decode($decoded, ENT_QUOTES | ENT_HTML5);
if ($next === $decoded) {
break;
}
$decoded = $next;
}
$decoded = stripslashes($decoded);
if ($decoded !== $original) {
$fixed++;
$this->line("Entry #{$entry->id}: " . $this->preview($original) . ' => ' . $this->preview($decoded));
if (!$dryRun) {
$entry->description = $decoded;
$entry->saveQuietly();
}
}
}
});
$this->info(($dryRun ? '[DRY RUN] ' : '') . "{$fixed} entries fixed.).");
return self::SUCCESS;
}
private function preview(string $text, int $len = 60): string
{
$text = str_replace(["\n", "\r"], ' ', $text);
return mb_strlen($text) > $len ? mb_substr($text, 0, $len) . '...' : $text;
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Console\Commands;
use App\Models\Entry;
use App\Models\News;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use Spatie\Sitemap\Sitemap;
use Spatie\Sitemap\Tags\Url;
#[Signature('sitemap:generate')]
class GenerateSitemap extends Command
{
public function handle()
{
$sitemap = Sitemap::create()
->add(Url::create('/')->setPriority(1.0)->setChangeFrequency(Url::CHANGE_FREQUENCY_DAILY))
->add(Url::create('/database')->setPriority(0.8)->setChangeFrequency(Url::CHANGE_FREQUENCY_DAILY))
->add(Url::create('/news')->setPriority(0.7)->setChangeFrequency(Url::CHANGE_FREQUENCY_DAILY))
->add(Url::create(route('tools.patcher'))->setPriority(0.2)->setChangeFrequency(Url::CHANGE_FREQUENCY_MONTHLY) )
->add(Url::create(route('tools.hash'))->setPriority(0.2)->setChangeFrequency(Url::CHANGE_FREQUENCY_MONTHLY) )
;
Entry::cursor()->each(function (Entry $entry) use ($sitemap) {
if (empty($entry->type) || empty($entry->slug)) {
return;
}
try {
$url = route('entries.show', [
'section' => $entry->type,
'entry' => $entry->slug
]);
$sitemap->add(
Url::create($url)
->setLastModificationDate($entry->updated_at)
->setChangeFrequency(Url::CHANGE_FREQUENCY_WEEKLY)
->setPriority(0.8)
);
} catch (\Exception $e) {
logger()->error("Sitemap error for entry : {$entry->id}: " . $e->getMessage());
}
});
News::cursor()->each(function (News $entry) use ($sitemap) {
if (empty($entry->type) || empty($entry->slug)) {
return;
}
try {
$url = route('news.show', ['news' => $entry]);
$sitemap->add(
Url::create($url)
->setLastModificationDate($entry->updated_at)
->setChangeFrequency(Url::CHANGE_FREQUENCY_WEEKLY)
->setPriority(0.8)
);
} catch (\Exception $e) {
logger()->error("Sitemap error for news : {$entry->id}: " . $e->getMessage());
}
});
$sitemap->writeToFile(public_path('sitemap.xml'));
$this->info('Generated sitemap');
}
}

View File

@@ -0,0 +1,41 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
#[Signature('migrate:downloads-count')]
#[Description('Command description')]
class MigrateDownloadsCount extends Command
{
public function handle()
{
$rows = DB::table('migrations_logs')
->where('source_system', 'wp')
->where('source_table', 'wp_posts')
->where('target_table', 'entries' )
->get(['source_id', 'target_id'])
;
$updated = 0;
foreach ($rows as $row) {
$downloadCount = DB::connection('old_wp')
->table('postmeta')
->where('post_id', $row->source_id)
->where('meta_key', 'download_counter' )
->value('meta_value');
if( $downloadCount ) {
DB::table('entries')->where('id', $row->target_id)->update(['old_download_count' => intval($downloadCount)]);
$updated++;
}
}
$this->info('All done (' . $updated . '/' . count($rows) .')');
}
}

View File

@@ -0,0 +1,110 @@
<?php
namespace App\Console\Commands;
use App\Helpers\EntryHelpers;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Spatie\SimpleExcel\SimpleExcelReader;
#[Signature('migrate:files:execute {--csv-file=} {--favorite-server=oedipus} ')]
#[Description("Migrate all files tables into an EntryFile.")]
class MigrateFilesExecute extends Command
{
private function getState( array $file ): string
{
if( str_contains( $file['old_path'], 'private' ) )
return 'private';
if( str_contains( $file['old_path'], 'archive' ) )
return 'archived';
return 'public';
}
private function getNewPath( array $file ): string
{
$newPath = $file['new_path'];
$newPath = str_replace('rhpz-fs-storage//', '', $newPath);
$newPath = str_replace( './rhpz-fs-storage/', '', $newPath);
return dirname($newPath);
}
private function createEntryFile( array $file )
{
$exists = DB::table('migration_files')
->where('filename', $file['filename'] )
->where('old_path', $file['old_path'] )
->where('wp_post_id', (int) $file['wp_post_id'] )
->where('uuid', $file['uuid'] )
->where('new_path', $this->getNewPath( $file ) )
->exists();
if( $exists )
return;
$entryId = DB::table('migrations_logs')
->where('source_system', 'wp')
->where('source_table', 'wp_posts')
->where('target_table', 'entries' )
->where('source_id', (int) $file['wp_post_id'] )
->value('target_id');
if( !$entryId ){
$this->info("Not copied entry for {$file['wp_post_id']}");
return;
}
$fileId = DB::table('entry_files')->insertGetId([
'entry_id' => $entryId,
'filename' => $file['filename'],
'filepath' => $this->getNewPath( $file ),
'favorite_server' => $this->option('favorite-server') ?? "oedipus",
'favorite_at' => now(),
'filesize' => (int) $file['filesize'],
'created_at' => now(),
'updated_at' => now(),
'file_uuid' => $file['uuid'],
'state' => $this->getState( $file ),
'online_patcher' => (int) EntryHelpers::enableOnlinePatcherBasedOnExtension( $file['filename'] ),
'secondary_online_patcher' => 0,
'download_count' => 0
]);
if( !$fileId ){
$this->info( "Not created file for {$file['wp_post_id']}" );
return;
}
DB::table('migration_files')->insert([
'filename' => $file['filename'],
'old_path' => $file['old_path'],
'wp_post_id' => (int) $file['wp_post_id'],
'uuid' => $file['uuid'],
'new_path' => $this->getNewPath( $file ),
'created_at' => now(),
'updated_at' => now(),
]);
$this->info( "Created file for {$file['wp_post_id']}" );
}
public function handle()
{
$csvFile = $this->option('csv-file');
if( !$csvFile || !is_file($csvFile) ){
$this->error('Missing CSV file Path');
return self::FAILURE;
}
$rows = SimpleExcelReader::create($csvFile)->useDelimiter(';')->getRows();
$rows->each(function(array $row){
$this->createEntryFile($row);
});
return self::SUCCESS;
}
}

View File

@@ -87,10 +87,10 @@ class MigrateUsersExecute extends Command
->leftJoin('usermeta as m2', fn( $j ) => $j->on('users.ID', '=', 'm2.user_id')->where('m2.meta_key', '=', 'wp_capabilities') )
->leftJoin('usermeta as m3', fn( $j ) => $j->on('users.ID', '=', 'm3.user_id')->where('m3.meta_key', '=', 'simple_local_avatar') )
->where('users.ID', '=', $plan->wp_user_id )
->select('m1.meta_value as description', 'm2.meta_value as capabilities', 'm3.meta_value as avatar_meta', 'users.user_url as website', 'users.user_pass as password', 'users.user_registred' )
->select('m1.meta_value as description', 'm2.meta_value as capabilities', 'm3.meta_value as avatar_meta', 'users.user_url as website', 'users.user_pass as password', 'users.user_registered' )
->first();
$infos['register_date'] = $wp->user_registred ? strtotime($wp->user_registred) : null;
$infos['register_date'] = $wp->user_registered ? strtotime($wp->user_registered) : null;
$infos['profile']['about'] = $wp->description;
$infos['profile']['website'] = $wp->website;
$role = $this->extractWpRole($wp->capabilities);

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
#[Signature('submissions:down')]
#[Description('Disable submissions')]
class SubmissionsDown extends Command
{
/**
* Execute the console command.
*/
public function handle()
{
Cache::put('submissions_maintenance', true );
$this->info("Submissions disabled.");
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
#[Signature('submissions:up')]
#[Description('Enable submissions')]
class SubmissionsUp extends Command
{
/**
* Execute the console command.
*/
public function handle()
{
Cache::forget('submissions_maintenance');
$this->info('Submissions enabled.');
}
}

View File

@@ -6,6 +6,8 @@ use App\Models\Entry;
use App\Models\EntryFile;
use App\Models\News;
use App\Services\XenforoApiService;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Str;
@@ -74,25 +76,29 @@ class EntryHelpers {
$cacheKey = "news_comments_{$entry->id}";
else
$cacheKey = "entry_comments_{$entry->id}";
return Cache::remember($cacheKey, now()->addDays(1), function () use ($entry, $limit) {
return Cache::flexible($cacheKey, [now()->addMinutes(30), now()->addMinutes(60)], function () use ($entry, $limit) {
$service = app(XenforoApiService::class);
try {
$service = app(XenforoApiService::class);
// Get thread infos and pagination.
$paginationInfos = $service->getThreadPosts($entry->comments_thread_id, 1);
$lastPage = $paginationInfos['pagination']['last_page'] ?? 1;
// Get thread infos and pagination.
$paginationInfos = $service->getThreadPosts($entry->comments_thread_id, 1);
$lastPage = $paginationInfos['pagination']['last_page'] ?? 1;
// Get last threads
$lastPageData = $lastPage > 1 ? $service->getThreadPosts($entry->comments_thread_id, $lastPage) : $paginationInfos;
$posts = $lastPageData['posts'] ?? [];
// Get last threads
$lastPageData = $lastPage > 1 ? $service->getThreadPosts($entry->comments_thread_id, $lastPage) : $paginationInfos;
$posts = $lastPageData['posts'] ?? [];
if( count( $posts ) < $limit && $lastPage > 1 ){
$previousPageData = $service->getThreadPosts($entry->comments_thread_id, $lastPage - 1 );
$posts = array_merge( $posts, $previousPageData['posts'] ?? [] );
if (count($posts) < $limit && $lastPage > 1) {
$previousPageData = $service->getThreadPosts($entry->comments_thread_id, $lastPage - 1);
$posts = array_merge($posts, $previousPageData['posts'] ?? []);
}
return collect($posts)->slice(-$limit)->reverse()->values()->toArray();
} catch (ConnectException|RequestException $e ){
return [];
}
return collect( $posts )->slice(-$limit)->reverse()->values()->toArray();
});
}
@@ -119,4 +125,18 @@ class EntryHelpers {
session(["downloaded_file_{$entryFile->file_uuid}" => 1]);
return true;
}
public static function stripBbCode(?string $text): ?string
{
if ($text === null) return null;
$text = preg_replace('/\[quote\b[^\]]*\](.*?)\[\/quote\]/is', '', $text);
return preg_replace('/\[\/?\w+[^\]]*\]/i', '', $text);
}
public static function stripMarkdown(?string $text): ?string
{
if ($text === null) return null;
$html = Str::markdown($text);
return html_entity_decode(strip_tags($html), ENT_QUOTES, 'UTF-8');
}
}

View File

@@ -2,7 +2,13 @@
namespace App\Http\Controllers;
use Artesaos\SEOTools\Facades\SEOTools;
abstract class Controller
{
//
protected function seoNoIndex(): void
{
SEOTools::metatags()->setRobots('noindex, nofollow');
}
}

View File

@@ -5,8 +5,11 @@ namespace App\Http\Controllers;
use App\Helpers\EntryHelpers;
use App\Models\Entry;
use App\Models\News;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Support\Facades\Gate;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Illuminate\View\View;
class EntryController extends Controller
@@ -16,6 +19,7 @@ class EntryController extends Controller
public function index(): View
{
SEOTools::setTitle('Database');
return view('entries.index');
}
@@ -26,6 +30,7 @@ class EntryController extends Controller
public function show(string $section, Entry $entry): View
{
if (!in_array($section, self::SECTION_TYPES))
abort(404);
@@ -52,6 +57,13 @@ class EntryController extends Controller
$comments = EntryHelpers::getLatestComments($entry);
$reviews = $entry->reviews()->orderBy('created_at', 'desc')->limit(10)->get();
SEOTools::setTitle($entry->complete_title ?? $entry->title);
SEOTools::setDescription( Str::limit( $entry->description, 150) );
SEOTools::opengraph()->addProperty('type', 'article');
if( $entry->main_image ){
SEOTools::opengraph()->addImage( url( Storage::url( $entry->main_image ) ) );
}
return view('entries.show', compact('entry', 'section', 'comments', 'reviews'));
}
@@ -69,6 +81,7 @@ class EntryController extends Controller
->orderBy('updated_at', 'desc')
->paginate(20);
SEOTools::setTitle('My Drafts');
return view('entries.drafts', compact('drafts', 'newsDrafts'));
}

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Entry;
use App\Services\ActivityService;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
use Illuminate\View\View;
use App\Models\News;
@@ -15,6 +16,8 @@ class HomeController extends Controller
public function index( Request $request ): View {
SEOTools::setTitle('A Romhack community where you can share your creations with the world.');
$filters = [ 'entries', 'news', 'messages', 'threads', 'clubs', 'reviews' ];
$cookie = $request->cookie('activity_filters');

View File

@@ -19,7 +19,7 @@ class AuthorController extends Controller
{
$items = Author::withCount('entries')
->orderBy('name')
->tap(fn($query) => $this->applySearch($query, ['name']))
->tap(fn($query) => $this->applySearch($query, ['id','name']))
->paginate(30)
->withQueryString();

View File

@@ -18,7 +18,7 @@ class GameController extends Controller
public function index()
{
$items = Game::withCount('entries')->orderBy('name')
->tap(fn($query) => $this->applySearch($query, ['name']))
->tap(fn($query) => $this->applySearch($query, ['id','name']))
->paginate(30)->withQueryString();
$platforms = Platform::orderBy('name')->get();
$genres = Genre::orderBy('name')->get();

View File

@@ -18,7 +18,7 @@ class GenreController extends Controller
{
$items = Genre::withCount('games')
->orderBy('name')
->tap(fn($query) => $this->applySearch($query, ['name']))
->tap(fn($query) => $this->applySearch($query, ['id','name']))
->paginate(30)
->withQueryString();

View File

@@ -17,7 +17,7 @@ class LanguageController extends Controller
{
$items = Language::withCount('entries')
->orderBy('name')
->tap(fn($query) => $this->applySearch($query, ['name']))
->tap(fn($query) => $this->applySearch($query, ['id','name']))
->paginate(30)
->withQueryString();

View File

@@ -0,0 +1,67 @@
<?php
namespace App\Http\Controllers\ModCP;
use App\Helpers\EntryHelpers;
use App\Http\Controllers\Controller;
use App\Models\Level;
use App\Traits\ModCPSearch;
use Illuminate\Http\Request;
class LevelController extends Controller
{
use ModCPSearch;
public function index()
{
$items = Level::withCount('entries')
->orderBy('name')
->tap(fn($query) => $this->applySearch($query, ['id','name']))
->paginate(30)
->withQueryString();
return view('modcp.resources', [
'items' => $items,
'title' => 'Levels',
'singular' => 'Level',
'storeRoute' => 'modcp.levels.store',
'updateRoute' => 'modcp.levels.update',
'destroyRoute' => 'modcp.levels.destroy'
]);
}
public function store(Request $request)
{
$request->validate([
'name' => 'required|string|max:255|unique:levels,name',
]);
Level::create([
'name' => trim($request->name),
'slug' => EntryHelpers::uniqueSlug( $request->name, Level::class ),
]);
return back()->with('success', 'Level added.');
}
public function update(Request $request, Level $level)
{
$request->validate([
'name' => 'required|string|max:255|unique:levels,name,' . $level->id,
]);
$level->update([
'name' => trim($request->name),
'slug' => EntryHelpers::uniqueSlug( $request->name, Level::class, $level->id ),
]);
return back()->with('success', 'Level updated.');
}
public function destroy(Level $level)
{
$level->delete();
return back()->with('success', 'Level deleted.');
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace App\Http\Controllers\ModCP;
use App\Helpers\EntryHelpers;
use App\Http\Controllers\Controller;
use App\Models\Modification;
use App\Traits\ModCPSearch;
use Illuminate\Http\Request;
class ModificationsController extends Controller
{
use ModCPSearch;
public function index()
{
$items = Modification::withCount('entries')
->orderBy('name')
->tap(fn($query) => $this->applySearch($query, ['id','name']))
->paginate(30)
->withQueryString();
return view('modcp.resources', [
'items' => $items,
'title' => 'Modifications',
'singular' => 'Modification',
'storeRoute' => 'modcp.modifications.store',
'updateRoute' => 'modcp.modifications.update',
'destroyRoute' => 'modcp.modifications.destroy'
]);
}
public function store(Request $request)
{
$request->validate([
'name' => 'required|string|max:255|unique:modifications,name',
]);
Modification::create([
'name' => trim($request->name),
'slug' => EntryHelpers::uniqueSlug( $request->name, Modification::class ),
]);
return back()->with('success', 'Modification added.');
}
public function update(Request $request, Modification $Modification)
{
$request->validate([
'name' => 'required|string|max:255|unique:modifications,name,' . $Modification->id,
]);
$Modification->update([
'name' => trim($request->name),
'slug' => EntryHelpers::uniqueSlug( $request->name, Modification::class, $Modification->id ),
]);
return back()->with('success', 'Modification updated.');
}
public function destroy(Modification $Modification)
{
$Modification->delete();
return back()->with('success', 'Modification deleted.');
}
}

View File

@@ -18,7 +18,7 @@ class PlatformController extends Controller
{
$items = Platform::withCount(['games','entries'])
->orderBy('name')
->tap(fn($query) => $this->applySearch($query, ['name']))
->tap(fn($query) => $this->applySearch($query, ['id','name']))
->paginate(30)
->withQueryString();

View File

@@ -4,10 +4,16 @@ namespace App\Http\Controllers;
use App\Jobs\RestoreXenForoCommentsThread;
use App\Models\Entry;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
class ModCPController extends Controller
{
public function __construct()
{
SEOTools::setTitle('ModCP');
}
public function index()
{
$stats = [

View File

@@ -11,14 +11,18 @@ use App\Http\Requests\StoreNewsRequest;
use App\Jobs\DeleteXenForoCommentsThread;
use App\Models\News;
use App\Services\NewsService;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class NewsController extends Controller
{
public function index()
{
SEOTools::setTitle('News');
return view('news.index');
}
@@ -43,6 +47,13 @@ class NewsController extends Controller
$comments = EntryHelpers::getLatestComments($news);
SEOTools::setTitle($news->title);
SEOTools::setDescription( Str::limit( $news->description , 150 ) );
SEOTools::opengraph()->addProperty('type', 'article');
if( $news->gallery->first() ){
SEOTools::opengraph()->addImage( url( Storage::url( $news->gallery->first()->image ) ) );
}
return view('news.show', compact('news', 'comments'));
}
@@ -54,6 +65,7 @@ class NewsController extends Controller
'oldCategory' => old('category') ? [ old('category') ] : []
];
SEOTools::setTitle('Submit News');
return view ('news.create', $data);
}
@@ -65,6 +77,7 @@ class NewsController extends Controller
'oldCategory' => old('category', $news->category_id) ? [ old('category', $news->category_id) ] : []
];
SEOTools::setTitle('Edit News');
return view ('news.edit', $data);
}

View File

@@ -6,6 +6,7 @@ use App\Helpers\XenForoHelpers;
use App\Models\Entry;
use App\Models\News;
use App\Services\XenforoService;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
class QueueController extends Controller
{
@@ -35,6 +36,7 @@ class QueueController extends Controller
return $a->created_at <=> $b->created_at;
})->values();
SEOTools::setTitle('Submissions Queue');
return view('queue.index', compact('entries'));
}

View File

@@ -6,6 +6,7 @@ use App\Exceptions\SubmissionException;
use App\Http\Requests\StoreReviewRequest;
use App\Models\Entry;
use App\Services\ReviewsService;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
class ReviewController extends Controller
@@ -15,6 +16,7 @@ class ReviewController extends Controller
public function index(){
SEOTools::setTitle('Reviews');
return view('reviews.index');
}

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Http\Controllers;
use App\Models\Entry;
use App\Models\News;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ShortLinkController extends Controller
{
private const array LETTER_TO_TYPE = [
't' => 'translations',
'r' => 'romhacks',
'h' => 'homebrew',
'u' => 'utilities',
'd' => 'documents',
'l' => 'lua-scripts',
];
public function legacy( int $wpId )
{
$log = DB::table('migrations_logs')
->where('source_system')
->whereIn('source_table', ['wp_posts', 'wp_posts__news'] )
->where('source_id', $wpId)
->first(['target_table', 'target_id']);
abort_unless((bool)$log, 404);
if( $log->target_table == 'entries' ){
$entry = Entry::findOrFail($log->target_id);
return redirect()->route('entries.show', ['section' => $entry->type, 'entry' => $entry], 301 );
} else if( $log->target_table == 'news' ){
$news = News::findOrFail($log->target_id);
return redirect()->route('news.show', ['news' => $news], 301);
}
abort(404);
}
public function redirect( string $letter, int $id )
{
if( $letter === 'n' ){
$news = News::findOrFail($id);
return redirect()->route('news.show', ['news' => $news], 301 );
}
$type = self::LETTER_TO_TYPE[$letter] ?? abort(404);
$entry = Entry::where('id', $id)->where('type', $type)->firstOrFail();
return redirect()->route('entries.show', ['section' => $entry->type, 'entry' => $entry], 301 );
}
}

View File

@@ -22,6 +22,7 @@ use App\Models\Status;
use App\Models\System;
use App\Services\SubmissionsService;
use App\Services\XenforoApiService;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Storage;
@@ -77,8 +78,8 @@ class SubmissionController extends Controller
'bg' => '#f3eaff1a',
'border' => '#f3eaff40',
],
'lua-script' => [
'slug' => 'lua-script',
'lua-scripts' => [
'slug' => 'lua-scripts',
'label' => 'Lua script',
'icon' => 'terminal',
'color' => '#a04515',
@@ -86,6 +87,7 @@ class SubmissionController extends Controller
'border' => '#eed6c540',
] ];
SEOTools::setTitle('Submit');
return view('submissions.index', compact('entryTypes'));
}
@@ -119,6 +121,7 @@ class SubmissionController extends Controller
$data['levels'] = Level::orderBy('id')->get();
}
SEOTools::setTitle( $data['words']['page_title'] );
return view('submissions.create', $data);
}
@@ -156,6 +159,7 @@ class SubmissionController extends Controller
$data['levels'] = Level::orderBy('id')->get();
}
SEOTools::setTitle( $data['words']['page_title'] );
return view('submissions.edit', $data);
}

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use App\Models\Entry;
use App\Models\EntryFile;
use App\Services\FileServersService;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Http\Request;
class ToolsController extends Controller
@@ -31,7 +32,7 @@ class ToolsController extends Controller
];
SEOTools::setTitle('ROM Patcher');
return view('tools.patcher', compact('patches'));
}
@@ -59,11 +60,13 @@ class ToolsController extends Controller
'outputName' => $file->filename
];
SEOTools::setTitle('Play online');
return view('tools.play', compact('patches', 'emuConfig'));
}
public function hasher( Request $request )
{
SEOTools::setTitle('Play online');
return view('tools.hasher');
}

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Symfony\Component\HttpFoundation\Response;
class SubmissionsEnabled
{
/**
* Handle an incoming request.
*
* @param Closure(Request): (Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
if( Cache::get('submissions_maintenance', false ) ){
if( $request->expectsJson() ){
return response()->json([
'message' => 'The submissions are currently in maintenance mode.',
], 503 );
}
return back()->withErrors([
'maintenance' => "The submissions are currently in maintenance mode.",
])->withInput();
}
return $next($request);
}
}

View File

@@ -106,7 +106,9 @@ class StoreEntryRequest extends FormRequest
$rules['new-game-genre'] = 'required_with:new-game-title|integer|nullable|exists:genres,id';
}
if( section_must_be( ['translations', 'romhacks'], $section ) ){
$bypassHashes = $isEdit && $this->user()->can('moderate', $this->route('entry') ) && ($this->input('bypass_hashes') !== null);
if( section_must_be( ['translations', 'romhacks'], $section ) && !$bypassHashes ){
$rules['hashes'] = 'array|required|min:1';
$rules['hashes.*.filename'] = 'required|string|max:512';
$rules['hashes.*.hash_crc32'] = 'required|string|max:512';
@@ -138,6 +140,7 @@ class StoreEntryRequest extends FormRequest
$ss .= ',locked';
$rules['submit-state'] = 'required|in:' . $ss;
} else {
$rules['nsfw-entry'] = 'nullable|boolean';
if( $this->user()->can('skip-queue', '\App\Models\Entry') ){
$rules['submit-state'] = 'required|string|in:draft,pending,published';
} else {
@@ -160,6 +163,7 @@ class StoreEntryRequest extends FormRequest
$rules['comments_thread_id'] = 'nullable|integer';
$rules['featured'] = 'nullable|boolean';
$rules['refresh_created_at'] = 'nullable|boolean';
$rules['nsfw-entry'] = 'nullable|boolean';
}
return $rules;

View File

@@ -175,6 +175,7 @@ class Database extends Component
public const array SORT_OPTIONS = [
'created_at' => 'Date added',
'release_date' => 'Release date',
'total_downloads' => 'Total downloads',
'title' => 'Title'
];
@@ -236,7 +237,7 @@ class Database extends Component
{
$query = Entry::query()->published()->with([
'game.platform', 'game.genre', 'status', 'authors', 'languages', 'level', 'systems', 'categories', 'modifications'
]);
])->withSum('files', 'download_count');
if( $this->search ) {
$query->where(function($q) {
@@ -328,7 +329,13 @@ class Database extends Component
$query->where('user_id', $this->userId);
}
return $query->orderBy($this->sortBy, $this->sortDir);
$sortColumn = $this->sortBy;
if ($sortColumn === 'total_downloads') {
return $query->orderByRaw('COALESCE(files_sum_download_count, 0) + old_download_count ' . $this->sortDir);
}
return $query->orderBy($sortColumn, $this->sortDir);
}
private function searchFilter( string $modelClass, string $search )

View File

@@ -21,6 +21,7 @@ class EntrySelector extends Component
if( $entry ) {
$this->selectedEntryId = $oldEntryId;
$this->entryName = $entry->complete_title ?? $entry->title;
$this->search = $entry->complete_title ?? $entry->title;
}
}
}

View File

@@ -25,6 +25,10 @@ class HashesUpload extends Component
*/
public array $hashes = [];
public ?string $manualFilename = "";
public ?string $manualCRC32 = "";
public ?string $manualSHA1 = "";
/**
* Prepare old hashes.
*
@@ -34,7 +38,8 @@ class HashesUpload extends Component
public function mount( array $oldHashes = [] ): void
{
foreach ($oldHashes as $hash) {
$this->addHash( $hash['filename'], $hash['hash_crc32'], $hash['hash_sha1'], $hash['verified'] );
if( isset( $hash['filename'], $hash['hash_crc32'], $hash['hash_sha1'], $hash['verified'] ) )
$this->addHash( $hash['filename'], $hash['hash_crc32'], $hash['hash_sha1'], $hash['verified'] );
}
}
@@ -86,6 +91,41 @@ class HashesUpload extends Component
array_splice($this->hashes, $index, 1);
}
private function checkCrc32($attribute, $value, $fail)
{
if (!preg_match('/^[a-f0-9]{8}$/i', $value)) {
$fail("CRC32 is invalid");
}
}
private function checkSha1($attribute, $value, $fail)
{
if (!preg_match('/^[a-f0-9]{40}$/i', $value)) {
$fail("SHA1 is invalid");
}
}
public function addManualHash()
{
$this->validate([
'manualFilename' => "required|string|max:512",
'manualCRC32' => ['required', 'string', 'max:512', $this->checkCrc32(...) ],
'manualSHA1' => ['required', 'string', 'max:512', $this->checkSha1(...) ],
], [
'manualFilename.required' => 'Please enter a filename.',
'manualCRC32.required' => 'Please enter a crc32.',
'manualSHA1.required' => 'Please enter a SHA1.',
'manualFilename.max' => 'Filename has to be less than 512 characters.',
'manualCRC32.max' => 'CRC32 has to be less than 512 characters.',
'manualSHA1.max' => 'SHA1 has to be less than 512 characters.',
]);
$this->addHash( $this->manualFilename, $this->manualCRC32, $this->manualSHA1 );
$this->reset(['manualFilename','manualCRC32','manualSHA1']);
$this->dispatch('close-manual-modal');
}
public function render(): View
{

View File

@@ -7,6 +7,8 @@ use App\Services\XenforoService;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Spatie\Activitylog\Models\Concerns\LogsActivity;
use Spatie\Activitylog\Support\LogOptions;
/**
* @property int $id
@@ -32,6 +34,9 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
*/
class Author extends Model
{
use LogsActivity;
protected $fillable = [
'name', 'slug', 'user_id', 'website'
];
@@ -49,4 +54,14 @@ class Author extends Model
return app(XenforoService::class)->getXfUser($this->user_id);
}
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
->useLogName('author')
->logAll()
->logOnlyDirty()
->dontLogEmptyChanges()
->setDescriptionForEvent(fn(string $eventName) => "Author {$eventName}");
}
}

View File

@@ -3,6 +3,7 @@
namespace App\Models;
use App\Helpers\EntryHelpers;
use App\Models\Scopes\NsfwScope;
use App\Traits\HasGallery;
use App\Traits\HasXenforoUserId;
use Illuminate\Database\Eloquent\Model;
@@ -137,7 +138,8 @@ class Entry extends Model
'staff_comment',
'rejected_at',
'level_id',
'created_at'
'created_at',
'nsfw'
];
/**
@@ -151,11 +153,15 @@ class Entry extends Model
];
protected static function booted(): void {
static::addGlobalScope(new NsfwScope);
static::saving( function( $entry ) {
if( $entry->isDirty('version') ) {
$entry->created_at = now();
}
});
}
@@ -247,6 +253,11 @@ class Entry extends Model
return $converter->convert($this->description)->getContent();
}
public function getTotalDownloadsAttribute(): int
{
return $this->files->sum('download_count') + $this->old_download_count;
}
public function parseStaffCredits(): ?array {
return json_decode( $this->staff_credits ?? "", true );
}

View File

@@ -8,6 +8,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
use League\CommonMark\GithubFlavoredMarkdownConverter;
use Spatie\Activitylog\Models\Concerns\LogsActivity;
use Spatie\Activitylog\Support\LogOptions;
/**
* @property int $id
@@ -41,7 +43,7 @@ use League\CommonMark\GithubFlavoredMarkdownConverter;
class EntryReview extends Model
{
use HasXenforoUserId, SoftDeletes;
use HasXenforoUserId, SoftDeletes, LogsActivity;
protected $fillable = [ 'entry_id', 'title', 'rating', 'description', 'user_id' ];
@@ -60,4 +62,14 @@ class EntryReview extends Model
return $converter->convert($this->description)->getContent();
}
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
->useLogName('review')
->logAll()
->logOnlyDirty()
->dontLogEmptyChanges()
->setDescriptionForEvent(fn(string $eventName) => "Review {$eventName}");
}
}

View File

@@ -4,6 +4,8 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Spatie\Activitylog\Models\Concerns\LogsActivity;
use Spatie\Activitylog\Support\LogOptions;
/**
* @property int $id
@@ -31,6 +33,9 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
*/
class Game extends Model
{
use LogsActivity;
/**
* @var string[]
*/
@@ -50,4 +55,14 @@ class Game extends Model
{
return $this->hasMany(Entry::class);
}
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
->useLogName('game')
->logAll()
->logOnlyDirty()
->dontLogEmptyChanges()
->setDescriptionForEvent(fn(string $eventName) => "Game {$eventName}");
}
}

View File

@@ -3,6 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property int $id
@@ -23,4 +24,9 @@ use Illuminate\Database\Eloquent\Model;
class Level extends Model
{
protected $fillable = ['name', 'slug'];
public function entries(): HasMany
{
return $this->hasMany(Entry::class);
}
}

View File

@@ -3,6 +3,8 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property int $id
@@ -23,4 +25,9 @@ use Illuminate\Database\Eloquent\Model;
class Modification extends Model
{
protected $fillable = [ 'name', 'slug' ];
public function entries(): BelongsToMany
{
return $this->belongsToMany(Entry::class, 'entry_modifications');
}
}

View File

@@ -10,6 +10,8 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use League\CommonMark\GithubFlavoredMarkdownConverter;
use Spatie\Activitylog\Models\Concerns\LogsActivity;
use Spatie\Activitylog\Support\LogOptions;
/**
* @property int $id
@@ -61,7 +63,7 @@ use League\CommonMark\GithubFlavoredMarkdownConverter;
class News extends Model
{
use SoftDeletes, HasGallery, HasXenforoUserId;
use SoftDeletes, HasGallery, HasXenforoUserId, LogsActivity;
protected $table = 'news';
@@ -127,4 +129,14 @@ class News extends Model
return EntryHelpers::getYoutubeVideoId( $this->youtube_link );
}
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
->useLogName('news')
->logAll()
->logOnlyDirty()
->dontLogEmptyChanges()
->setDescriptionForEvent(fn(string $eventName) => "News {$eventName}");
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Models\Scopes;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
class NsfwScope implements Scope
{
private function canNsfw(): bool
{
if( \Auth::guest() )
return false;
$user = \Auth::user();
return $user->nsfw_content === 1;
}
/**
* Apply the scope to a given Eloquent query builder.
*/
public function apply(Builder $builder, Model $model): void
{
if( !$this->canNsfw() )
$builder->where('nsfw', false );
}
}

View File

@@ -159,7 +159,7 @@ class EntryPolicy
return $user->_can('romhackplaza', 'canModerateEntries' );
}
public function moderate(User $user, Entry $entry): bool
public function moderate(User $user, ?Entry $entry = null): bool
{
return $user->_can('romhackplaza', 'canModerateEntries' );
}

View File

@@ -2,6 +2,7 @@
namespace App\Services;
use App\Helpers\EntryHelpers;
use App\Models\Entry;
use App\Models\EntryReview;
use App\Models\News;
@@ -65,7 +66,7 @@ class ActivityService
'user_id' => $entry->user_id,
'badge' => EntryCard::ENTRY_TYPES_BADGE[$entry->type],
'badge_class' => $entry->type,
'excerpt' => $entry->description ? \Str::limit(strip_tags($entry->description), 80) : null,
'excerpt' => $entry->description ? \Str::limit(EntryHelpers::stripMarkdown(strip_tags($entry->description)), 80) : null,
'meta' => $entry->getRealPlatform()?->name
];
}
@@ -82,7 +83,7 @@ class ActivityService
'user_id' => $news->user_id,
'badge' => 'News',
'badge_class' => 'news',
'excerpt' => $news->description ? \Str::limit(strip_tags($news->description), 80) : null,
'excerpt' => $news->description ? \Str::limit(EntryHelpers::stripMarkdown(strip_tags($news->description)), 80) : null,
'meta' => $news->category?->name
];
}
@@ -99,7 +100,7 @@ class ActivityService
'user_id' => $message->user_id,
'badge' => 'Post',
'badge_class' => 'message',
'excerpt' => $message->message ? \Str::limit(strip_tags($message->message), 80) : null,
'excerpt' => $message->message ? \Str::limit(EntryHelpers::stripBbCode(strip_tags($message->message)), 80) : null,
'meta' => null
];
@@ -117,7 +118,7 @@ class ActivityService
'user_id' => $thread->user_id,
'badge' => 'Thread',
'badge_class' => 'thread',
'excerpt' => $thread->message ? \Str::limit(strip_tags($thread->message), 80) : null,
'excerpt' => $thread->message ? \Str::limit(EntryHelpers::stripBbCode(strip_tags($thread->message)), 80) : null,
'meta' => null
];
@@ -152,7 +153,7 @@ class ActivityService
'user_id' => $review->user_id,
'badge' => 'Review',
'badge_class' => 'review',
'excerpt' => $review->description ? \Str::limit(strip_tags($review->description), 80) : null,
'excerpt' => $review->description ? \Str::limit(EntryHelpers::stripMarkdown(strip_tags($review->description)), 80) : null,
'meta' => $review->entry()->exists() ? ( $review->entry->complete_title ?? $review->entry->title ) : null,
];
}
@@ -199,6 +200,9 @@ class ActivityService
'post.user_id', 'post.message'
])
->get()
->reject(function($post){
return (int) $post->user_id === config('xenforo.bot_user_id');
})
->map($this->formatMessage(...))
->toArray();
});
@@ -213,6 +217,7 @@ class ActivityService
->join('post', 'thread.first_post_id', '=', 'post.post_id')
->where('thread.discussion_state', 'visible')
->where('thread.discussion_type', '!=', 'redirect' )
->where('thread.node_id', '!=', config('xenforo.comments_node_id') )
->orderByDesc('thread.post_date')
->limit(self::ITEMS_PER_TYPE)
->select([

View File

@@ -174,7 +174,8 @@ class SubmissionsService {
'youtube_link' => $this->request->input('youtube_video'),
'user_id' => $user_id,
'complete_title' => $completeTitle,
'level_id' => $this->request->input('level')
'level_id' => $this->request->input('level'),
'nsfw' => $this->request->input('nsfw-entry') ?? false,
];
$entry = Entry::create( $fields );
@@ -608,6 +609,7 @@ class SubmissionsService {
$refresh_created_at = $this->request->input('refresh_created_at') ?? false;
if( $refresh_created_at )
$fields['created_at'] = now();
$fields['nsfw'] = $this->request->input('nsfw-entry') ?? false;
}
$this->entry->update( $fields );

View File

@@ -3,6 +3,7 @@
namespace App\Services;
use App\Models\Entry;
use App\Models\News;
use Illuminate\Http\Client\ConnectionException;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Http;
@@ -24,39 +25,45 @@ class XenforoApiService {
*/
private function get(string $endpoint, ?int $customUserId = null ): mixed
{
$response = Http::timeout(30)->withHeaders([
$response = Http::timeout(8)->connectTimeout(4)->withOptions(['verify' => false])->withHeaders([
'XF-Api-Key' => $this->apiKey,
'XF-Api-User' => $customUserId ?? $this->superUserId,
])->get("{$this->apiUrl}/{$endpoint}");
if( !$response->ok() )
if( !$response->ok() ) {
\Illuminate\Support\Facades\Log::error("XF API error [{$response->status()}] on {$endpoint}: " . $response->body());
return null;
}
return $response->json();
}
private function post(string $endpoint, ?int $customUserId = null, array $data = [] ): mixed
{
$response = Http::timeout(30)->withHeaders([
$response = Http::timeout(8)->connectTimeout(4)->withOptions(['verify' => false])->withHeaders([
'XF-Api-Key' => $this->apiKey,
'XF-Api-User' => $customUserId ?? $this->superUserId,
])->post("{$this->apiUrl}/{$endpoint}", $data);
if( !$response->ok() )
if( !$response->ok() ) {
\Illuminate\Support\Facades\Log::error("XF API error [{$response->status()}] on {$endpoint}: " . $response->body());
return null;
}
return $response->json();
}
private function delete(string $endpoint, ?int $customUserId = null, array $data = [] ): mixed
{
$response = Http::timeout(30)->withHeaders([
$response = Http::timeout(8)->connectTimeout(4)->withOptions(['verify' => false])->withHeaders([
'XF-Api-Key' => $this->apiKey,
'XF-Api-User' => $customUserId ?? $this->superUserId,
])->delete("{$this->apiUrl}/{$endpoint}", $data);
if( !$response->ok() )
if( !$response->ok() ) {
\Illuminate\Support\Facades\Log::error("XF API error [{$response->status()}] on {$endpoint}: " . $response->body());
return null;
}
return $response->json();
}
@@ -68,20 +75,40 @@ class XenforoApiService {
}
return Cache::remember("xf_alerts_{$userId}", 60, function() use($userId) {
return $this->get("alerts?page=1&cutoff=7days", $userId);
$result = $this->get("alerts?page=1&cutoff=7days", $userId);
if (is_array($result)) {
if (isset($result['alerts'])) {
$result['alerts'] = collect($result['alerts'])->take(8)->all();
} else {
$result = collect($result)->take(8)->all();
}
}
return $result;
});
}
public function markAllNotificationsRead(int $userId): void
{
Cache::forget("xf_alerts_{$userId}");
$this->post("alerts/mark-all", $userId );
$this->post("alerts/mark-all", $userId, ['read' => true, 'viewed' => true] );
}
public function getConversations(int $userId): mixed
{
return Cache::remember("xf_conversations_{$userId}", 60, function() use($userId) {
return $this->get("conversations?page=1&receiver_id={$userId}", $userId);
$result = $this->get("conversations?page=1&receiver_id={$userId}", $userId);
if (is_array($result)) {
if (isset($result['conversations'])) {
$result['conversations'] = collect($result['conversations'])->take(8)->all();
} else {
$result = collect($result)->take(8)->all();
}
}
return $result;
});
}
@@ -98,10 +125,10 @@ class XenforoApiService {
if( !$entry->comments_thread_id || $entry->comments_thread_id <= 0 ){
$data = [
'node_id' => config('xenforo.comments_node_id'),
'title' => $entry->complete_title,
'title' => $entry->complete_title ?? $entry->title,
'message' => $entry->description,
'prefix_id' => config('xenforo.comments_prefixes')[$entry->type] ?? 1,
'custom_fields' => [ 'entry_id' => $entry->id ],
'prefix_id' => config('xenforo.comments_prefixes')[$entry->type ?? "news"] ?? 1,
'custom_fields' => $entry->type ? [ 'entry_id' => $entry->id ] : [ 'news_id' => $entry->id ],
'discussion_open' => true,
];

View File

@@ -14,6 +14,10 @@ class ErrorBlock extends Component
'icon' => 'ban',
'message' => '%s'
],
'not-found' => [
'icon' => 'sticky-note-off',
'message' => "404: This page does not exist."
],
'page-not-allowed' => [
'icon' => 'shield-ban',
'message' => "You do not have permission to access this page.\nRequired permission: %s"
@@ -21,6 +25,10 @@ class ErrorBlock extends Component
'user-state-not-valid' => [
'icon' => 'shield-ban',
'message' => "You do not have permission to access this page.\nYour user profile is incomplete: %s\nGo back to the forum for more details."
],
'server-error' => [
'icon' => 'bomb',
'message' => "500: Internal Server Error."
]
];

View File

@@ -61,6 +61,10 @@ class SubmitEntryStatus extends Component
}
}
if( $this->isEdit && $this->entry->state === 'pending' && isset( $states['published'] ) ) {
unset( $states['published'] );
}
return $states;
}

View File

@@ -16,6 +16,7 @@ return Application::configure(basePath: dirname(__DIR__))
$middleware->encryptCookies(except: ['xf_session','xf_user','xf_csrf','xf_style_variation','activity_filters']);
$middleware->alias([
'xf.auth' => \App\Http\Middleware\CheckXenForoPermissions::class,
'submissions.maintenance' => \App\Http\Middleware\SubmissionsEnabled::class,
]);
$middleware->redirectGuestsTo(function(Request $request): void {
if( $request->is('manage*'))
@@ -24,5 +25,28 @@ return Application::configure(basePath: dirname(__DIR__))
$middleware->append(\App\Http\Middleware\CheckXenForoUserState::class);
})
->withExceptions(function (Exceptions $exceptions): void {
//
$exceptions->render(function(Throwable $e, $request) {
if (
$e instanceof \Illuminate\Validation\ValidationException ||
$e instanceof \Illuminate\Auth\AuthenticationException ||
$e instanceof \Illuminate\Auth\Access\AuthorizationException ||
$e instanceof \Symfony\Component\HttpKernel\Exception\HttpException
) {
return null;
}
$statusCode = method_exists($e, 'getStatusCode') ? $e->getStatusCode() : 500;
if( app()->environment('production') && $statusCode >= 500 && !$request->expectsJson() ){
$errorId = (string) Str::uuid();
\Illuminate\Support\Facades\Log::error($e->getMessage(), [
'error_id' => $errorId,
'exception' => $e,
'url' => $request->fullUrl(),
'user_id' => (optional($request->user())->user_id ?? 0),
]);
return response()->view('errors.500', ['errorId' => $errorId], 500 );
}
});
})->create();

View File

@@ -10,6 +10,7 @@
"ext-pdo": "*",
"ext-simplexml": "*",
"ext-xmlreader": "*",
"artesaos/seotools": "^1.4",
"diglactic/laravel-breadcrumbs": "^10.1",
"filament/filament": "^5.6",
"laravel/framework": "^13.7",
@@ -18,7 +19,9 @@
"league/html-to-markdown": "^5.1",
"livewire/livewire": "^4.3",
"predis/predis": "^3.4",
"spatie/laravel-activitylog": "^5.0"
"spatie/laravel-activitylog": "^5.0",
"spatie/laravel-sitemap": "*",
"spatie/simple-excel": "^3.10"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^4.2",

416
composer.lock generated
View File

@@ -4,8 +4,79 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ea9258b1759d46665d2487b066c686ee",
"content-hash": "7c9b7fd591cb7e152659cf998900a531",
"packages": [
{
"name": "artesaos/seotools",
"version": "v1.4.1",
"source": {
"type": "git",
"url": "https://github.com/artesaos/seotools.git",
"reference": "c92d09f0ad4491181863850a3ab2e1534361409b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/artesaos/seotools/zipball/c92d09f0ad4491181863850a3ab2e1534361409b",
"reference": "c92d09f0ad4491181863850a3ab2e1534361409b",
"shasum": ""
},
"require": {
"ext-json": "*",
"illuminate/config": "^10.0 || ^11.0 || ^12.0 || ^13.0",
"illuminate/support": "^10.0 || ^11.0 || ^12.0 || ^13.0",
"php": "^8.1"
},
"require-dev": {
"orchestra/testbench": "^8.0 || ^9.0 || ^10.0 || ^11.0",
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.5.3"
},
"type": "library",
"extra": {
"laravel": {
"aliases": {
"SEO": "Artesaos\\SEOTools\\Facades\\SEOTools",
"JsonLd": "Artesaos\\SEOTools\\Facades\\JsonLd",
"SEOMeta": "Artesaos\\SEOTools\\Facades\\SEOMeta",
"Twitter": "Artesaos\\SEOTools\\Facades\\TwitterCard",
"OpenGraph": "Artesaos\\SEOTools\\Facades\\OpenGraph"
},
"providers": [
"Artesaos\\SEOTools\\Providers\\SEOToolsServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Artesaos\\SEOTools\\": "src/SEOTools/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Vinicius",
"email": "luiz.vinicius73@gmail.com"
}
],
"description": "SEO Tools for Laravel and Lumen",
"keywords": [
"JSON-LD",
"laravel",
"lumen",
"metatags",
"opengraph",
"seo",
"seotools",
"webmaster"
],
"support": {
"issues": "https://github.com/artesaos/seotools/issues",
"source": "https://github.com/artesaos/seotools"
},
"time": "2026-03-28T12:37:33+00:00"
},
{
"name": "blade-ui-kit/blade-heroicons",
"version": "2.7.0",
@@ -5303,6 +5374,85 @@
],
"time": "2022-12-17T21:53:22+00:00"
},
{
"name": "spatie/crawler",
"version": "9.3.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/crawler.git",
"reference": "3b3a9a1a8c750b0240c2b7c9e2ef22e84092416e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/crawler/zipball/3b3a9a1a8c750b0240c2b7c9e2ef22e84092416e",
"reference": "3b3a9a1a8c750b0240c2b7c9e2ef22e84092416e",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/psr7": "^2.0",
"php": "^8.4",
"spatie/robots-txt": "^2.0",
"symfony/css-selector": "^7.0|^8.0",
"symfony/dom-crawler": "^7.0|^8.0"
},
"require-dev": {
"pestphp/pest": "^4.0",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"spatie/invade": "^2.1",
"spatie/ray": "^1.37"
},
"suggest": {
"spatie/browsershot": "Required for JavaScript rendering with BrowsershotRenderer (^5.0.5)"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-v9": "9.x-dev"
}
},
"autoload": {
"psr-4": {
"Spatie\\Crawler\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be"
}
],
"description": "Crawl all internal links found on a website",
"homepage": "https://github.com/spatie/crawler",
"keywords": [
"crawler",
"link",
"spatie",
"website"
],
"support": {
"issues": "https://github.com/spatie/crawler/issues",
"source": "https://github.com/spatie/crawler/tree/9.3.2"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
},
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2026-06-12T15:45:15+00:00"
},
{
"name": "spatie/invade",
"version": "2.1.0",
@@ -5516,6 +5666,140 @@
],
"time": "2026-02-21T12:49:54+00:00"
},
{
"name": "spatie/laravel-sitemap",
"version": "8.2.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-sitemap.git",
"reference": "51f52030ab22abf5e95ed037fea5f8073114e784"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-sitemap/zipball/51f52030ab22abf5e95ed037fea5f8073114e784",
"reference": "51f52030ab22abf5e95ed037fea5f8073114e784",
"shasum": ""
},
"require": {
"illuminate/support": "^12.0|^13.0",
"nesbot/carbon": "^2.71|^3.0",
"php": "^8.4",
"spatie/crawler": "^9.0",
"spatie/laravel-package-tools": "^1.16.1"
},
"require-dev": {
"larastan/larastan": "^3.0",
"laravel/pint": "^1.13",
"orchestra/testbench": "^10.0|^11.0",
"pestphp/pest": "^4.0",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"spatie/pest-plugin-snapshots": "^2.1",
"spatie/temporary-directory": "^2.2"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\Sitemap\\SitemapServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Spatie\\Sitemap\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Create and generate sitemaps with ease",
"homepage": "https://github.com/spatie/laravel-sitemap",
"keywords": [
"laravel-sitemap",
"spatie"
],
"support": {
"source": "https://github.com/spatie/laravel-sitemap/tree/8.2.0"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
}
],
"time": "2026-06-24T07:59:14+00:00"
},
{
"name": "spatie/robots-txt",
"version": "2.5.4",
"source": {
"type": "git",
"url": "https://github.com/spatie/robots-txt.git",
"reference": "a8dd35d0a94e863f52509a366a634978e9c1db03"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/robots-txt/zipball/a8dd35d0a94e863f52509a366a634978e9c1db03",
"reference": "a8dd35d0a94e863f52509a366a634978e9c1db03",
"shasum": ""
},
"require": {
"php": "^8.1"
},
"require-dev": {
"phpunit/phpunit": "^11.5.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Robots\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Brent Roose",
"email": "brent@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Determine if a page may be crawled from robots.txt and robots meta tags",
"homepage": "https://github.com/spatie/robots-txt",
"keywords": [
"robots-txt",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/robots-txt/issues",
"source": "https://github.com/spatie/robots-txt/tree/2.5.4"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
},
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2026-02-25T07:59:20+00:00"
},
{
"name": "spatie/shiki-php",
"version": "2.4.0",
@@ -5581,6 +5865,66 @@
],
"time": "2026-04-27T14:27:52+00:00"
},
{
"name": "spatie/simple-excel",
"version": "3.10.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/simple-excel.git",
"reference": "2aa4cd9da6f29a23e4f7b6f4c6944dce204ea47a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/simple-excel/zipball/2aa4cd9da6f29a23e4f7b6f4c6944dce204ea47a",
"reference": "2aa4cd9da6f29a23e4f7b6f4c6944dce204ea47a",
"shasum": ""
},
"require": {
"illuminate/support": "^9.0|^10.0|^11.0|^12.0|^13.0",
"openspout/openspout": "^4.30",
"php": "^8.3"
},
"require-dev": {
"phpunit/phpunit": "^9.4|^10.5|^11.0|^12.0",
"spatie/pest-plugin-snapshots": "^1.1|^2.1",
"spatie/phpunit-snapshot-assertions": "^4.0|^5.1",
"spatie/temporary-directory": "^1.2|^2.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\SimpleExcel\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Read and write simple Excel and CSV files",
"homepage": "https://github.com/spatie/simple-excel",
"keywords": [
"simple-excel",
"spatie"
],
"support": {
"source": "https://github.com/spatie/simple-excel/tree/3.10.0"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2026-06-15T06:21:16+00:00"
},
{
"name": "symfony/clock",
"version": "v8.0.8",
@@ -5888,6 +6232,76 @@
],
"time": "2026-04-13T15:52:40+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v8.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "77ca351474ea018daba5f2e473cbf1b9b8e72ac6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/77ca351474ea018daba5f2e473cbf1b9b8e72ac6",
"reference": "77ca351474ea018daba5f2e473cbf1b9b8e72ac6",
"shasum": ""
},
"require": {
"php": ">=8.4.1",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.0"
},
"require-dev": {
"symfony/css-selector": "^7.4|^8.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\DomCrawler\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dom-crawler/tree/v8.1.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2026-05-29T05:06:50+00:00"
},
{
"name": "symfony/error-handler",
"version": "v8.0.8",

View File

@@ -52,7 +52,7 @@ return [
[
'name' => 'Discord',
'icon' => 'messages-square',
'route' => 'home'
'custom_route' => 'https://discord.gg/5CKzeWmZZU'
],
[
'name' => 'Members',
@@ -80,15 +80,21 @@ return [
'pages' => [
'name' => 'Pages',
'items' => [
[
'name' => 'Support us',
'icon' => 'coffee',
'custom_route' => 'https://ko-fi.com/romhackplaza',
'color' => 'var(--rhpz-orange)'
],
[
'name' => 'Learn Romhacking',
'icon' => 'graduation-cap',
'route' => 'home'
'xf_route' => 'help/learn-romhacking'
],
[
'name' => 'About',
'icon' => 'info',
'route' => 'home'
'xf_route' => 'help/about'
],
[
'name' => 'Contact Us',
@@ -96,9 +102,9 @@ return [
'xf_route' => 'misc/contact'
],
[
'name' => 'Legal pages',
'name' => 'Help & Legal pages',
'icon' => 'scale',
'route' => 'home'
'xf_route' => 'help'
]
]
]

69
config/seotools.php Normal file
View File

@@ -0,0 +1,69 @@
<?php
/**
* @see https://github.com/artesaos/seotools
*/
return [
'inertia' => env('SEO_TOOLS_INERTIA', false),
'meta' => [
/*
* The default configurations to be used by the meta generator.
*/
'defaults' => [
'title' => "Romhack Plaza", // set false to total remove
'titleBefore' => false, // Put defaults.title before page title, like 'It's Over 9000! - Dashboard'
'description' => 'A Romhack community where you can share your creations with the world.', // set false to total remove
'separator' => ' - ',
'keywords' => [],
'canonical' => 'current', // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove
'robots' => 'index, follow', // Set to 'all', 'none' or any combination of index/noindex and follow/nofollow
],
/*
* Webmaster tags are always added.
*/
'webmaster_tags' => [
'google' => null,
'bing' => null,
'alexa' => null,
'pinterest' => null,
'yandex' => null,
'norton' => null,
],
'add_notranslate_class' => false,
],
'opengraph' => [
/*
* The default configurations to be used by the opengraph generator.
*/
'defaults' => [
'title' => 'Romhack Plaza', // set false to total remove
'description' => 'A Romhack community where you can share your creations with the world.', // set false to total remove
'url' => null, // Set null for using Url::current(), set false to total remove
'type' => 'website',
'site_name' => 'Romhack Plaza',
'images' => [ 'logo/plaza-logo.png' ],
],
],
'twitter' => [
/*
* The default values to be used by the twitter cards generator.
*/
'defaults' => [
'card' => 'summary_large_image',
'site' => '@romhackplaza'
],
],
'json-ld' => [
/*
* The default configurations to be used by the json-ld generator.
*/
'defaults' => [
'title' => 'Romhack Plaza', // set false to total remove
'description' => 'A Romhack community where you can share your creations with the world.', // set false to total remove
'url' => 'current', // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove
'type' => 'WebPage',
'images' => [ 'logo/plaza-logo.png' ],
],
],
];

View File

@@ -1,18 +0,0 @@
<?php
return [
'bot_user_id' => 1,
'comments_node_id' => 4,
'comments_prefixes' => [
'translations' => 1,
'romhacks' => 2,
'homebrew' => 3,
'utilities' => 4,
'documents' => 5,
'lua-scripts' => 6,
'tutorials' => 7,
'news' => 8
],
];

View File

@@ -44,7 +44,7 @@ return new class extends Migration
$table->timestamps();
$table->index(['type','status','game_id','platform_id','status_id']);
$table->index(['type','state','game_id','platform_id','status_id']);
});
}

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('migration_files', function (Blueprint $table) {
$table->id();
$table->string('filename');
$table->string('old_path');
$table->unsignedBigInteger('wp_post_id');
$table->uuid('uuid');
$table->string('new_path');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('migration_files');
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('entries', function (Blueprint $table) {
$table->boolean('nsfw')->default(false);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('entries', function (Blueprint $table) {
$table->dropColumn('nsfw');
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('entries', function (Blueprint $table) {
$table->unsignedBigInteger('old_download_count')->default(0);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('entries', function (Blueprint $table) {
$table->dropColumn('old_download_count');
});
}
};

View File

@@ -1,634 +0,0 @@
/*M!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `activity_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `activity_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`log_name` varchar(255) DEFAULT NULL,
`description` text NOT NULL,
`subject_type` varchar(255) DEFAULT NULL,
`subject_id` bigint(20) unsigned DEFAULT NULL,
`event` varchar(255) DEFAULT NULL,
`causer_type` varchar(255) DEFAULT NULL,
`causer_id` bigint(20) unsigned DEFAULT NULL,
`attribute_changes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`attribute_changes`)),
`properties` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`properties`)),
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `subject` (`subject_type`,`subject_id`),
KEY `causer` (`causer_type`,`causer_id`),
KEY `activity_log_log_name_index` (`log_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `authors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `authors` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`website` varchar(500) DEFAULT NULL,
`user_id` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `authors_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `cache` (
`key` varchar(255) NOT NULL,
`value` mediumtext NOT NULL,
`expiration` bigint(20) NOT NULL,
PRIMARY KEY (`key`),
KEY `cache_expiration_index` (`expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cache_locks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `cache_locks` (
`key` varchar(255) NOT NULL,
`owner` varchar(255) NOT NULL,
`expiration` bigint(20) NOT NULL,
PRIMARY KEY (`key`),
KEY `cache_locks_expiration_index` (`expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `categories` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`restricted_to` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`restricted_to`)),
PRIMARY KEY (`id`),
UNIQUE KEY `categories_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entries`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entries` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('translations','romhacks','homebrew','utilities','documents','lua-scripts','tutorials') NOT NULL,
`title` varchar(255) DEFAULT NULL,
`slug` varchar(255) DEFAULT NULL,
`description` longtext DEFAULT NULL,
`main_image` varchar(255) DEFAULT NULL,
`state` enum('draft','pending','published','locked','rejected','hidden') NOT NULL DEFAULT 'draft',
`staff_comment` text DEFAULT NULL,
`rejected_at` timestamp NULL DEFAULT NULL,
`featured` tinyint(1) NOT NULL DEFAULT 0,
`featured_at` datetime DEFAULT NULL,
`game_id` bigint(20) unsigned DEFAULT NULL,
`platform_id` bigint(20) unsigned DEFAULT NULL,
`status_id` bigint(20) unsigned DEFAULT NULL,
`version` varchar(50) DEFAULT NULL,
`release_date` date DEFAULT NULL,
`staff_credits` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`staff_credits`)),
`relevant_link` varchar(500) DEFAULT NULL,
`youtube_link` varchar(500) DEFAULT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`comments_thread_id` bigint(20) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`complete_title` varchar(255) DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`level_id` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `entries_slug_unique` (`slug`),
KEY `entries_game_id_foreign` (`game_id`),
KEY `entries_platform_id_foreign` (`platform_id`),
KEY `entries_status_id_foreign` (`status_id`),
KEY `entries_type_state_game_id_platform_id_status_id_index` (`type`,`state`,`game_id`,`platform_id`,`status_id`),
KEY `entries_level_id_foreign` (`level_id`),
CONSTRAINT `entries_game_id_foreign` FOREIGN KEY (`game_id`) REFERENCES `games` (`id`) ON DELETE SET NULL,
CONSTRAINT `entries_level_id_foreign` FOREIGN KEY (`level_id`) REFERENCES `levels` (`id`) ON DELETE SET NULL,
CONSTRAINT `entries_platform_id_foreign` FOREIGN KEY (`platform_id`) REFERENCES `platforms` (`id`) ON DELETE SET NULL,
CONSTRAINT `entries_status_id_foreign` FOREIGN KEY (`status_id`) REFERENCES `statuses` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_authors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_authors` (
`entry_id` bigint(20) unsigned NOT NULL,
`author_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`entry_id`,`author_id`),
KEY `entry_authors_author_id_foreign` (`author_id`),
CONSTRAINT `entry_authors_author_id_foreign` FOREIGN KEY (`author_id`) REFERENCES `authors` (`id`) ON DELETE CASCADE,
CONSTRAINT `entry_authors_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_categories` (
`entry_id` bigint(20) unsigned NOT NULL,
`category_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`entry_id`,`category_id`),
KEY `entry_categories_category_id_foreign` (`category_id`),
CONSTRAINT `entry_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
CONSTRAINT `entry_categories_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_files` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`entry_id` bigint(20) unsigned NOT NULL,
`filename` varchar(1024) NOT NULL,
`filepath` varchar(1024) NOT NULL,
`favorite_server` varchar(11) NOT NULL,
`favorite_at` timestamp NOT NULL,
`filesize` bigint(20) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`file_uuid` uuid NOT NULL,
`state` enum('public','private','archived') NOT NULL DEFAULT 'public',
`online_patcher` tinyint(1) NOT NULL DEFAULT 0,
`secondary_online_patcher` tinyint(1) NOT NULL DEFAULT 0,
`download_count` bigint(20) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `entry_files_file_uuid_unique` (`file_uuid`),
KEY `entry_files_entry_id_foreign` (`entry_id`),
CONSTRAINT `entry_files_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_hashes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_hashes` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`entry_id` bigint(20) unsigned NOT NULL,
`filename` varchar(256) NOT NULL,
`hash_crc32` varchar(256) NOT NULL,
`hash_sha1` varchar(256) NOT NULL,
`verified` varchar(256) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `entry_hashes_entry_id_foreign` (`entry_id`),
CONSTRAINT `entry_hashes_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_languages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_languages` (
`entry_id` bigint(20) unsigned NOT NULL,
`language_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`entry_id`,`language_id`),
KEY `entry_languages_language_id_foreign` (`language_id`),
CONSTRAINT `entry_languages_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE,
CONSTRAINT `entry_languages_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_modifications`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_modifications` (
`entry_id` bigint(20) unsigned NOT NULL,
`modification_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`entry_id`,`modification_id`),
KEY `entry_modifications_modification_id_foreign` (`modification_id`),
CONSTRAINT `entry_modifications_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE,
CONSTRAINT `entry_modifications_modification_id_foreign` FOREIGN KEY (`modification_id`) REFERENCES `modifications` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_reviews`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_reviews` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`entry_id` bigint(20) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`rating` int(11) NOT NULL,
`description` text NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `entry_reviews_entry_id_foreign` (`entry_id`),
CONSTRAINT `entry_reviews_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entry_systems`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `entry_systems` (
`entry_id` bigint(20) unsigned NOT NULL,
`system_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`entry_id`,`system_id`),
KEY `entry_systems_system_id_foreign` (`system_id`),
CONSTRAINT `entry_systems_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE,
CONSTRAINT `entry_systems_system_id_foreign` FOREIGN KEY (`system_id`) REFERENCES `systems` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `failed_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(255) NOT NULL,
`connection` text NOT NULL,
`queue` text NOT NULL,
`payload` longtext NOT NULL,
`exception` longtext NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `galleries`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `galleries` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`galleryable_type` varchar(255) NOT NULL DEFAULT 'AppModelsEntry',
`galleryable_id` bigint(20) unsigned NOT NULL,
`image` varchar(255) NOT NULL,
`order` smallint(5) unsigned NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `entry_galleries_entry_id_foreign` (`galleryable_id`),
KEY `galleries_galleryable_type_galleryable_id_index` (`galleryable_type`,`galleryable_id`),
CONSTRAINT `entry_galleries_entry_id_foreign` FOREIGN KEY (`galleryable_id`) REFERENCES `entries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `games`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `games` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`platform_id` bigint(20) unsigned NOT NULL,
`genre_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `games_slug_unique` (`slug`),
KEY `games_platform_id_foreign` (`platform_id`),
KEY `games_genre_id_foreign` (`genre_id`),
CONSTRAINT `games_genre_id_foreign` FOREIGN KEY (`genre_id`) REFERENCES `genres` (`id`),
CONSTRAINT `games_platform_id_foreign` FOREIGN KEY (`platform_id`) REFERENCES `platforms` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `genres`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `genres` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `genres_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `job_batches`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `job_batches` (
`id` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`total_jobs` int(11) NOT NULL,
`pending_jobs` int(11) NOT NULL,
`failed_jobs` int(11) NOT NULL,
`failed_job_ids` longtext NOT NULL,
`options` mediumtext DEFAULT NULL,
`cancelled_at` int(11) DEFAULT NULL,
`created_at` int(11) NOT NULL,
`finished_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`queue` varchar(255) NOT NULL,
`payload` longtext NOT NULL,
`attempts` smallint(5) unsigned NOT NULL,
`reserved_at` int(10) unsigned DEFAULT NULL,
`available_at` int(10) unsigned NOT NULL,
`created_at` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `languages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `languages` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `languages_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `levels`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `levels` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `levels_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migration_game_plan`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `migration_game_plan` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`wp_game_id` bigint(20) unsigned NOT NULL,
`wp_platform_id` bigint(20) unsigned NOT NULL,
`game_id` bigint(20) unsigned DEFAULT NULL,
`wp_genre_id` bigint(20) unsigned DEFAULT NULL,
`post_count` int(10) unsigned NOT NULL DEFAULT 0,
`genre_conflict` tinyint(1) NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `migration_game_plan_wp_game_id_wp_platform_id_unique` (`wp_game_id`,`wp_platform_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migration_settings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `migration_settings` (
`key` varchar(255) NOT NULL,
`value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`value`)),
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migration_user_plan`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `migration_user_plan` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`wp_user_id` bigint(20) unsigned DEFAULT NULL,
`xf_user_id` bigint(20) unsigned DEFAULT NULL,
`match_type` varchar(255) NOT NULL,
`email` varchar(255) DEFAULT NULL,
`wp_username` varchar(255) DEFAULT NULL,
`xf_username` varchar(255) DEFAULT NULL,
`note` text DEFAULT NULL,
`status` varchar(255) NOT NULL DEFAULT 'pending',
`user_id` bigint(20) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`wp_password_bridge` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `migration_user_plan_match_type_index` (`match_type`),
KEY `migration_user_plan_status_index` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migrations_logs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations_logs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`source_system` varchar(255) NOT NULL,
`source_table` varchar(255) NOT NULL,
`source_id` bigint(20) unsigned NOT NULL,
`target_table` varchar(255) NOT NULL,
`target_id` bigint(20) unsigned NOT NULL,
`status` varchar(255) NOT NULL DEFAULT 'pending',
`migrated_at` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `modifications`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `modifications` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `news`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `news` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`category_id` bigint(20) unsigned DEFAULT NULL,
`description` longtext NOT NULL,
`state` enum('draft','pending','published','locked','rejected','hidden') NOT NULL DEFAULT 'draft',
`staff_comment` text DEFAULT NULL,
`rejected_at` timestamp NULL DEFAULT NULL,
`entry_id` bigint(20) unsigned DEFAULT NULL,
`relevant_link` varchar(500) DEFAULT NULL,
`youtube_link` varchar(500) DEFAULT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`comments_thread_id` bigint(20) unsigned DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `news_slug_unique` (`slug`),
KEY `news_category_id_foreign` (`category_id`),
KEY `news_entry_id_foreign` (`entry_id`),
CONSTRAINT `news_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL,
CONSTRAINT `news_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `entries` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `password_reset_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_reset_tokens` (
`email` varchar(255) NOT NULL,
`token` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `platforms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `platforms` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`slug` varchar(100) NOT NULL,
`short_name` varchar(30) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`play_online_core` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `platforms_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `play_online_settings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `play_online_settings` (
`file_id` bigint(20) unsigned NOT NULL,
`core` varchar(30) NOT NULL,
`threads` tinyint(1) NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`file_id`),
CONSTRAINT `play_online_settings_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `entry_files` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `sessions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `sessions` (
`id` varchar(255) NOT NULL,
`user_id` bigint(20) unsigned DEFAULT NULL,
`ip_address` varchar(45) DEFAULT NULL,
`user_agent` text DEFAULT NULL,
`payload` longtext NOT NULL,
`last_activity` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `sessions_user_id_index` (`user_id`),
KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `statuses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `statuses` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `status_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `systems`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `systems` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `systems_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) NOT NULL,
`remember_token` varchar(100) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*M!100616 SET NOTE_VERBOSITY=@OLD_NOTE_VERBOSITY */;
/*M!999999\- enable the sandbox mode */
SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'0001_01_01_000000_create_users_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'0001_01_01_000001_create_cache_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'0001_01_01_000002_create_jobs_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4,'2026_05_09_153326_create_platforms_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2026_05_09_153901_add_platform_timestamp',3);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2026_05_10_071323_create_genres_table',4);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2026_05_10_071400_create_games_table',5);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (8,'2026_05_10_072139_create_languages_table',6);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (9,'2026_05_10_072201_create_authors_table',6);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (10,'2026_05_10_072332_create_modifications_table',6);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (11,'2026_05_10_072441_create_status_table',6);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (12,'2026_05_10_072747_create_entries_table',7);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (13,'2026_05_10_074735_create_entry_authors_table',8);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2026_05_10_074830_create_entry_languages_table',8);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2026_05_10_074907_create_entry_modifications_table',8);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (16,'2026_05_12_114815_create_entry_files_table',9);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (19,'2026_05_12_115134_create_entry_hashes_table',10);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2026_05_13_084522_add_fields_to_entry_files',11);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2026_05_16_134002_create_entry_gallery_table',12);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2026_05_18_131712_change_staff_credits_field',13);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2026_05_19_090838_add_complete_title_to_entry',14);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2026_05_27_192635_add_fields_for_queue_to_entries',15);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2026_05_27_193235_add_rejected_state_to_entries',16);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2026_06_04_083346_make_entries_fields_draft_compatible',17);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (35,'2026_06_05_163235_add_online_patcher_fields_to_files',18);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (36,'2026_06_09_122425_create_category_table',18);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (37,'2026_06_09_122655_create_os_table',18);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (38,'2026_06_09_122817_create_level_table',18);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (39,'2026_06_09_123242_add_entry_level_id_field',18);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (40,'2026_06_09_123458_create_entry_systems_table',18);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (41,'2026_06_09_123533_create_entry_categories_table',18);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2026_06_09_124832_add_restricted_field_to_categories',19);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (43,'2026_06_10_084936_make_entry_galleries_polymorphic',20);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (44,'2026_06_10_090320_create_news_table',21);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (45,'2026_06_10_091105_add_fields_for_queue_to_news',22);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (46,'2026_06_11_155053_add_order_to_galleries_table',23);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (47,'2026_06_13_210606_add_featured_at_field_to_entries',24);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (48,'2026_06_14_163648_create_play_online_settings_table',25);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2026_06_14_174906_add_default_core_play_online_for_platforms',26);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (50,'2026_06_16_100941_create_activity_log_table',27);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (51,'2026_06_16_122812_add_download_field_to_entry_files',28);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2026_06_17_114641_create_reviews_table',29);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2026_06_18_084700_create_migration_user_plan_table',30);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2026_06_19_080416_create_migration_settings_table',31);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2026_06_19_125237_create_migrations_logs_table',32);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (57,'2026_06_19_134939_alter_migration_user_plan_table',33);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2026_06_21_085615_create_migration_game_plan_table',34);
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;

View File

@@ -10,7 +10,8 @@ body {
background-color: var(--bg);
color: var(--text);
display: flex;
height: 100vh;
height: 100dvh;
min-height: 100dvh;
overflow: hidden;
}
@@ -71,6 +72,9 @@ ul {
/* Menu settings */
--menu-size: 260px;
--menu-user-avatar-bg: #555;
/* Gap */
--gap: 15px;
}
.\$light-mode {
@@ -132,6 +136,8 @@ ul {
background-color: var(--bg2);
border: 1px solid var(--border);
display: flex;
min-width: 0;
max-width: 100%;
flex-direction: column;
transition: transform 0.2s, border-color 0.2s;
cursor: pointer;
@@ -144,6 +150,7 @@ ul {
.\$entry-cover-wrapper {
position: relative;
aspect-ratio: 4/3;
min-width: 0;
background-color: var(--bg);
border-bottom: 1px solid var(--border);
display: flex;
@@ -173,6 +180,7 @@ ul {
.\$entry-card-info {
padding: 15px;
flex-grow: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
@@ -183,12 +191,16 @@ ul {
font-size: 1.1rem;
margin-bottom: 5px;
line-height: 1.3;
overflow-wrap: anywhere;
word-break: break-word;
}
.\$entry-card-author {
color: var(--rhpz-orange);
font-size: 0.85rem;
margin-bottom: 10px;
overflow-wrap: anywhere;
word-break: break-word;
}
.\$entry-card-meta {
@@ -248,6 +260,9 @@ ul {
.\$entry-card-meta {
font-size: 0.75rem;
flex-direction: column;
align-items: flex-start;
gap: 6px;
}
}
@@ -328,6 +343,45 @@ ul {
background-color: rgba(129, 199, 132, 0.1);
}
.\$back-to-top {
display: none;
}
@media (max-width: 768px) {
.\$back-to-top {
display: none;
align-items: center;
justify-content: center;
gap: 8px;
position: fixed;
right: 14px;
bottom: 14px;
z-index: 1000;
padding: 10px 14px;
border-radius: 999px;
background-color: var(--bg2);
border: 1px solid var(--border);
color: var(--text);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
opacity: 0;
pointer-events: none;
transform: translateY(10px);
transition: opacity 0.2s ease, transform 0.2s ease;
}
.\$back-to-top.visible {
display: inline-flex;
opacity: 1;
pointer-events: auto;
transform: translateY(0);
}
.\$back-to-top span {
font-size: 0.78rem;
font-weight: 600;
}
}
/* BLOCK */
.\$block {
@@ -379,21 +433,36 @@ ul {
color: var(--text3);
border-color: var(--rhpz-orange);
}
.\$badge.blue, .\$badge.translations {
.\$badge.blue, .\$badge.romhacks {
background-color: var(--info);
color: var(--text);
border-color: var(--info);
}
.\$badge.green, .\$badge.romhacks {
.\$badge.green, .\$badge.translations {
background-color: var(--success2);
color: var(--text);
border-color: var(--success2);
}
.\$badge.red, .\$badge.homebrew {
background-color: #bf2323;
color: var(--text);
border-color: #bf2323;
}
.\$badge.yellow, .\$badge.utilities {
background-color: #fdeb0f;
color: #000;
border-color: #fdeb0f;
}
.\$badge.purple, .\$badge.documents{
background-color: #8b23bf;
color: var(--text);
border-color: #8b23bf;
}
.\$badge.brown, .\$badge.lua-scripts {
background-color: #b4825f;
color: var(--text);
border-color: #b4825f;
}
.\$topbar-badge {
position: absolute;
@@ -569,448 +638,6 @@ ul {
}
/* File: resources/css/components/database.css */
.\$filter-bar {
display: flex;
gap: 15px;
background-color: var(--bg2);
padding: 15px;
border: 1px solid var(--border);
margin-bottom: 20px;
flex-wrap: wrap;
align-items: center;
.\$filter-bar-search {
flex: 1;
max-width: 400px;
background-color: var(--bg);
border: 1px solid var(--border);
display: flex;
align-items: center;
padding: 8px 12px;
gap: 8px;
}
}
.\$database-wrapper {
display: flex;
gap: 20px;
align-items: flex-start;
.\$database-filters {
width: 300px;
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 2px;
background-color: var(--bg2);
border: 1px solid var(--border);
.\$filter-group {
border-bottom: 1px solid var(--border);
overflow: hidden;
&:last-child {
border-bottom: none;
}
}
.\$filter-title-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 14px;
background-color: var(--bg3);
cursor: pointer;
user-select: none;
.\$filter-title {
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.8px;
color: var(--text2);
margin: 0;
}
}
.\$filter-mode {
display: flex;
gap: 4px;
}
.\$filter-btn-mode {
background: none;
border: 1px solid var(--border);
color: var(--text2);
font-size: 0.7rem;
font-weight: 600;
padding: 2px 7px;
cursor: pointer;
font-family: var(--typography);
transition: all 0.15s;
letter-spacing: 0.5px;
&:hover {
border-color: var(--rhpz-orange);
color: var(--rhpz-orange);
}
&.\$active {
background-color: var(--rhpz-orange);
border-color: var(--rhpz-orange);
color: var(--text3);
}
}
.\$filter-options {
padding: 6px 0;
max-height: 180px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-track {
background: var(--bg2);
}
&::-webkit-scrollbar-thumb {
background: var(--border);
}
}
.\$filter-option {
display: flex;
align-items: center;
gap: 9px;
padding: 6px 14px;
font-size: 0.88rem;
color: var(--text);
cursor: pointer;
transition: background-color 0.1s;
&:hover {
background-color: var(--bg4);
}
}
.\$filter-option input[type="checkbox"] {
accent-color: var(--rhpz-orange);
width: 14px;
height: 14px;
cursor: pointer;
flex-shrink: 0;
}
}
.\$database-results {
flex: 1;
min-width: 0;
.\$database-sort {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid var(--border);
flex-wrap: wrap;
.\$btn {
font-size: 0.85rem;
padding: 6px 12px;
&.\$active {
border-color: var(--rhpz-orange);
color: var(--rhpz-orange);
}
}
}
.\$database-results-count {
margin-left: auto;
font-size: 0.85rem;
color: var(--text2);
}
.\$database-active-filters {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 15px;
}
.\$database-active-filter-tag {
display: inline-flex;
align-items: center;
gap: 6px;
background-color: var(--bg3);
border: 1px solid var(--border);
padding: 3px 10px;
font-size: 0.8rem;
color: var(--text);
.\$tag-type {
color: var(--rhpz-orange);
font-weight: 600;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
button {
background: none;
border: none;
color: var(--text2);
cursor: pointer;
padding: 0;
display: flex;
align-items: center;
transition: color 0.15s;
&:hover {
color: var(--text);
}
}
}
.\$database-empty {
grid-column: 1 / -1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
color: var(--text2);
background-color: var(--bg2);
border: 1px solid var(--border);
gap: 15px;
text-align: center;
i {
color: var(--border);
}
p {
font-size: 0.95rem;
}
}
}
}
.\$database-pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 4px;
margin-top: 20px;
.\$btn {
min-width: 36px;
padding: 6px 10px;
font-size: 0.85rem;
display: flex;
align-items: center;
justify-content: center;
}
.\$active {
background-color: var(--rhpz-orange);
border-color: var(--rhpz-orange);
color: #111;
font-weight: 600;
}
}
.\$database-search {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 20px;
}
@media (max-width: 900px) {
.\$database-layout {
flex-direction: column;
}
.\$database-wrapper {
flex-direction: column;
}
.\$database-filters {
width: 100%;
display: grid;
grid-template-columns: repeat(2,1fr);
}
.\$database-filter-group:last-child {
border-bottom: 1px solid var(--border);
}
.\$database-results-count {
margin-left: 0;
width: 100%;
}
}
@media (max-width: 768px) {
.\$database-search {
gap: 8px;
margin-bottom: 15px;
flex-wrap: wrap;
}
.\$database-wrapper {
flex-direction: column;
gap: 15px;
}
.\$database-filters {
width: 100%;
grid-template-columns: 1fr;
order: -1;
margin-bottom: 10px;
}
.\$database-filter-group {
padding: 12px 0;
}
.\$grid-entries {
grid-template-columns: repeat(3, 1fr);
gap: 15px;
}
}
@media (max-width: 600px) {
.\$database-search {
flex-direction: column;
}
.\$database-filters {
grid-template-columns: 1fr;
}
.\$grid-entries {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.\$database-filter-group {
padding: 10px 0;
}
}
@media (max-width: 420px) {
.\$grid-entries {
grid-template-columns: 1fr;
gap: 10px;
}
.\$database-search input {
font-size: 0.85rem;
padding: 6px 8px;
}
}
.\$filter-chevron {
transition: transform 0.2s ease;
color: var(--text2);
flex-shrink: 0;
}
.\$filter-chevron.rotated {
transform: rotate(-90deg);
}
.\$internal-filter-search {
display: flex;
align-items: center;
gap: 7px;
padding: 7px 14px;
border-bottom: 1px solid var(--border);
background-color: var(--bg);
i {
color: var(--text2);
flex-shrink: 0;
}
input {
background: none;
border: none;
outline: none;
color: var(--text);
font-family: var(--typography);
font-size: 0.85rem;
width: 100%;
&::placeholder {
color: var(--text2);
}
}
}
.\$filter-title-left {
display: flex;
align-items: center;
gap: 7px;
}
.\$filter-title-right {
display: flex;
align-items: center;
gap: 6px;
}
.\$internal-filter-count {
display: inline-flex;
align-items: center;
justify-content: center;
background-color: var(--rhpz-orange);
color: #111;
font-size: 0.7rem;
font-weight: 700;
min-width: 18px;
height: 18px;
padding: 0 5px;
line-height: 1;
}
.\$internal-filter-clear {
background: none;
border: 1px solid var(--border);
color: var(--text2);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
padding: 0;
transition: all 0.15s;
&:hover {
border-color: var(--error);
color: var(--error);
}
}
.\$filter-search-clear {
background: none;
border: none;
color: var(--text2);
cursor: pointer;
display: flex;
align-items: center;
padding: 0;
flex-shrink: 0;
transition: color 0.15s;
&:hover {
color: var(--text);
}
}
/* File: resources/css/components/drafts.css */
.\$drafts-count {
font-size: 0.85rem;
@@ -1791,6 +1418,37 @@ ul {
min-width: 20px;
text-align: center;
}
.\$gallery-mobile-controls {
display: none;
}
@media (max-width: 1024px) {
.\$gallery-mobile-controls {
display: flex;
justify-content: flex-end;
gap: 6px;
margin-top: 6px;
}
.\$gallery-move-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: 1px solid var(--border);
background-color: var(--bg2);
color: var(--text);
cursor: pointer;
padding: 0;
}
.\$gallery-move-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
}
.\$authors-list {
display: grid;
grid-template-columns: repeat(4, 1fr);
@@ -1908,13 +1566,30 @@ ul {
}
@media (max-width: 600px) {
.\$upload-item-actions {
.\$upload-item {
flex-direction: column;
align-items: stretch;
}
.\$upload-item-info {
width: 100%;
flex: 1 1 auto;
min-width: 0;
}
.\$upload-item-actions {
flex-direction: row;
justify-content: flex-end;
align-items: center;
gap: 8px;
width: 100%;
margin-top: 8px;
flex-basis: 100%;
}
.\$upload-item-actions .\$btn {
width: 100%;
width: auto;
flex: 0 0 auto;
}
}
.file-state-icon { width: 18px; height: 18px; }
@@ -2071,10 +1746,18 @@ ul {
.\$grid-hashes {
grid-template-columns: 1fr;
}
.\$grid-credits {
grid-template-columns: 1fr;
}
.\$grid-first {
display: none;
}
.\$hash-first {
display: none;
}
.\$author-search-selected {
display: none;
}
}
@media (max-width: 600px) {
@@ -2104,6 +1787,22 @@ ul {
.\$form-error-text {
font-size: 0.8rem;
}
.\$form-type-of-checkboxes {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
label {
box-sizing: border-box;
margin: 0;
}
input[type="checkbox"] {
transform: scale(1.5);
margin-right: 1.33rem;
}
}
}
@@ -2140,11 +1839,41 @@ ul {
.\$grid-entries {
display: grid;
grid-template-columns: repeat(6,1fr);
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 20px;
margin-bottom: 20px;
}
@media (max-width: 1400px) {
.\$grid-entries {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
}
@media (max-width: 1200px) {
.\$grid-entries {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 900px) {
.\$grid-entries {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 640px) {
.\$grid-entries {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 420px) {
.\$grid-entries {
grid-template-columns: 1fr;
}
}
/* File: resources/css/components/hovercard.css */
@@ -4018,7 +3747,7 @@ ul {
.\$activity-tl-card-description {
font-size: 0.8rem;
color: var(--text2);
white-space: nowrap;
word-break: break-word;
text-overflow: ellipsis;
line-height: 1.3;
}
@@ -4060,13 +3789,15 @@ ul {
@media (max-width: 600px) {
.activity-tl-header { flex-direction: column; align-items: flex-start; }
.activity-tl-thumb { display: none; }
.activity-tl-left { display: none; }
.activity-tl-card-description { display: none; }
.activity-day-sep { padding-left: 44px; }
.activity-tl-left { width: 44px; }
.\$activity-tl-date {
font-size: 0.75rem;
}
.\$activity-tl-content-title {
font-size: 0.9rem;
}
@@ -4074,7 +3805,7 @@ ul {
@media (max-width: 768px) {
.\$activity-timeline {
padding-left: 50px;
padding-left: 0px;
}
.\$activity-tl-left {
@@ -4356,6 +4087,7 @@ ul {
display: flex;
flex-direction: column;
overflow: hidden;
min-height: 0;
}
#topbar {
@@ -4668,6 +4400,30 @@ ul {
line-height: 1.6;
color: var(--text);
margin-bottom: 30px;
word-break: break-word;
p {
margin: 0 0 14px;
&:last-child {
margin-bottom: 0;
}
}
pre {
max-width: 100%;
overflow-x: auto;
white-space: pre-wrap;
word-break: break-word;
padding: 12px;
border-radius: 6px;
margin: 0 0 14px;
}
code {
white-space: pre-wrap;
word-break: break-word;
}
}
.\$entry-gallery {
@@ -4787,6 +4543,9 @@ ul {
overflow: hidden;
background-color: var(--bg4);
border: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: center;
img {
width: 100%;
@@ -5169,6 +4928,7 @@ ul {
flex-shrink: 0;
transition: transform 0.3s ease;
z-index: 100;
overflow: hidden;
.\$menu-header {
padding: 10px;
@@ -5206,9 +4966,12 @@ ul {
}
.\$menu-navigation {
flex-grow: 1;
flex: 1 1 auto;
min-height: 0;
padding: 10px 0;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
overscroll-behavior: contain;
.\$menu-group {
margin-bottom: 20px;
@@ -5258,7 +5021,9 @@ ul {
}
.\$menu-user {
padding: 15px 20px;
flex-shrink: 0;
margin-top: auto;
padding: 15px 20px calc(15px + env(safe-area-inset-bottom)) 20px;
border-top: 1px solid var(--border);
display: flex;
align-items: center;
@@ -5277,6 +5042,14 @@ ul {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
}
.\$menu-user-info {
display: flex;
@@ -5285,6 +5058,7 @@ ul {
&.\$username {
font-size: 0.9rem;
font-weight: 600;
text-decoration: none !important;
}
&.\$user_role {
font-size: 0.75rem;
@@ -5913,7 +5687,9 @@ ul {
position: fixed;
left: 0;
top: 60px;
height: calc(100vh - 60px);
height: calc(100dvh - 60px);
max-height: calc(100dvh - 60px);
min-height: 0;
transform: translateX(-100%);
transition: transform 0.3s ease-in-out;
z-index: 999;

24
origin_ca_rsa_root.pem Normal file
View File

@@ -0,0 +1,24 @@
-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIID+rOSdTGfGcwDQYJKoZIhvcNAQELBQAwgYsxCzAJBgNV
BAYTAlVTMRkwFwYDVQQKExBDbG91ZEZsYXJlLCBJbmMuMTQwMgYDVQQLEytDbG91
ZEZsYXJlIE9yaWdpbiBTU0wgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MRYwFAYDVQQH
Ew1TYW4gRnJhbmNpc2NvMRMwEQYDVQQIEwpDYWxpZm9ybmlhMB4XDTE5MDgyMzIx
MDgwMFoXDTI5MDgxNTE3MDAwMFowgYsxCzAJBgNVBAYTAlVTMRkwFwYDVQQKExBD
bG91ZEZsYXJlLCBJbmMuMTQwMgYDVQQLEytDbG91ZEZsYXJlIE9yaWdpbiBTU0wg
Q2VydGlmaWNhdGUgQXV0aG9yaXR5MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRMw
EQYDVQQIEwpDYWxpZm9ybmlhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
AQEAwEiVZ/UoQpHmFsHvk5isBxRehukP8DG9JhFev3WZtG76WoTthvLJFRKFCHXm
V6Z5/66Z4S09mgsUuFwvJzMnE6Ej6yIsYNCb9r9QORa8BdhrkNn6kdTly3mdnykb
OomnwbUfLlExVgNdlP0XoRoeMwbQ4598foiHblO2B/LKuNfJzAMfS7oZe34b+vLB
yrP/1bgCSLdc1AxQc1AC0EsQQhgcyTJNgnG4va1c7ogPlwKyhbDyZ4e59N5lbYPJ
SmXI/cAe3jXj1FBLJZkwnoDKe0v13xeF+nF32smSH0qB7aJX2tBMW4TWtFPmzs5I
lwrFSySWAdwYdgxw180yKU0dvwIDAQABo2YwZDAOBgNVHQ8BAf8EBAMCAQYwEgYD
VR0TAQH/BAgwBgEB/wIBAjAdBgNVHQ4EFgQUJOhTV118NECHqeuU27rhFnj8KaQw
HwYDVR0jBBgwFoAUJOhTV118NECHqeuU27rhFnj8KaQwDQYJKoZIhvcNAQELBQAD
ggEBAHwOf9Ur1l0Ar5vFE6PNrZWrDfQIMyEfdgSKofCdTckbqXNTiXdgbHs+TWoQ
wAB0pfJDAHJDXOTCWRyTeXOseeOi5Btj5CnEuw3P0oXqdqevM1/+uWp0CM35zgZ8
VD4aITxity0djzE6Qnx3Syzz+ZkoBgTnNum7d9A66/V636x4vTeqbZFBr9erJzgz
hhurjcoacvRNhnjtDRM0dPeiCJ50CP3wEYuvUzDHUaowOsnLCjQIkWbR7Ni6KEIk
MOz2U0OBSif3FTkhCgZWQKOOLo1P42jHC3ssUZAtVNXrCk3fw9/E15k8NPkBazZ6
0iykLhH1trywrKRMVw67F44IE8Y=
-----END CERTIFICATE-----

View File

@@ -9,7 +9,8 @@ body {
background-color: var(--bg);
color: var(--text);
display: flex;
height: 100vh;
height: 100dvh;
min-height: 100dvh;
overflow: hidden;
}

View File

@@ -30,6 +30,7 @@
border: 1px solid var(--border);
display: flex;
min-width: 0;
max-width: 100%;
flex-direction: column;
transition: transform 0.2s, border-color 0.2s;
cursor: pointer;
@@ -72,6 +73,7 @@
.entry-card-info {
padding: 15px;
flex-grow: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
@@ -82,13 +84,16 @@
font-size: 1.1rem;
margin-bottom: 5px;
line-height: 1.3;
word-wrap: break-word;
overflow-wrap: anywhere;
word-break: break-word;
}
.entry-card-author {
color: var(--rhpz-orange);
font-size: 0.85rem;
margin-bottom: 10px;
overflow-wrap: anywhere;
word-break: break-word;
}
.entry-card-meta {
@@ -148,6 +153,9 @@
.entry-card-meta {
font-size: 0.75rem;
flex-direction: column;
align-items: flex-start;
gap: 6px;
}
}

View File

@@ -43,6 +43,45 @@
background-color: rgba(129, 199, 132, 0.1);
}
.back-to-top {
display: none;
}
@media (max-width: 768px) {
.back-to-top {
display: none;
align-items: center;
justify-content: center;
gap: 8px;
position: fixed;
right: 14px;
bottom: 14px;
z-index: 1000;
padding: 10px 14px;
border-radius: 999px;
background-color: var(--bg2);
border: 1px solid var(--border);
color: var(--text);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
opacity: 0;
pointer-events: none;
transform: translateY(10px);
transition: opacity 0.2s ease, transform 0.2s ease;
}
.back-to-top.visible {
display: inline-flex;
opacity: 1;
pointer-events: auto;
transform: translateY(0);
}
.back-to-top span {
font-size: 0.78rem;
font-weight: 600;
}
}
/* BLOCK */
.block {
@@ -94,21 +133,36 @@
color: var(--text3);
border-color: var(--rhpz-orange);
}
.badge.blue, .badge.translations {
.badge.blue, .badge.romhacks {
background-color: var(--info);
color: var(--text);
border-color: var(--info);
}
.badge.green, .badge.romhacks {
.badge.green, .badge.translations {
background-color: var(--success2);
color: var(--text);
border-color: var(--success2);
}
.badge.red, .badge.homebrew {
background-color: #bf2323;
color: var(--text);
border-color: #bf2323;
}
.badge.yellow, .badge.utilities {
background-color: #fdeb0f;
color: #000;
border-color: #fdeb0f;
}
.badge.purple, .badge.documents{
background-color: #8b23bf;
color: var(--text);
border-color: #8b23bf;
}
.badge.brown, .badge.lua-scripts {
background-color: #b4825f;
color: var(--text);
border-color: #b4825f;
}
.topbar-badge {
position: absolute;

View File

@@ -227,8 +227,10 @@
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 4px;
margin-top: 20px;
width: 100%;
.btn {
min-width: 36px;
@@ -255,18 +257,20 @@
}
@media (max-width: 900px) {
.database-layout {
flex-direction: column;
}
.database-wrapper {
flex-direction: column;
width: 100%;
}
.database-filters {
width: 100%;
display: grid;
grid-template-columns: repeat(2,1fr);
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.database-results {
width: 100%;
min-width: 0;
}
.database-filter-group:last-child {
@@ -286,13 +290,32 @@
flex-wrap: wrap;
}
.filter-bar {
flex-direction: column;
align-items: stretch;
}
.filter-bar .filter-bar-search {
max-width: none;
flex: initial;
width: 100%;
}
.filter-bar .btn {
width: 100%;
justify-content: center;
}
.database-wrapper {
flex-direction: column;
gap: 15px;
width: 100%;
}
.database-filters {
width: 100%;
width: min(100%, 420px);
max-width: 420px;
margin: 0 auto;
grid-template-columns: 1fr;
order: -1;
margin-bottom: 10px;
@@ -303,7 +326,7 @@
}
.grid-entries {
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 15px;
}
}
@@ -311,6 +334,20 @@
@media (max-width: 600px) {
.database-search {
flex-direction: column;
align-items: stretch;
}
.filter-bar {
padding: 12px;
}
.filter-bar .filter-bar-search {
max-width: none;
}
.filter-bar .btn {
width: 100%;
justify-content: center;
}
.database-filters {
@@ -318,7 +355,7 @@
}
.grid-entries {
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}

View File

@@ -393,6 +393,37 @@
min-width: 20px;
text-align: center;
}
.gallery-mobile-controls {
display: none;
}
@media (max-width: 1024px) {
.gallery-mobile-controls {
display: flex;
justify-content: flex-end;
gap: 6px;
margin-top: 6px;
}
.gallery-move-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: 1px solid var(--border);
background-color: var(--bg2);
color: var(--text);
cursor: pointer;
padding: 0;
}
.gallery-move-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
}
.authors-list {
display: grid;
grid-template-columns: repeat(4, 1fr);
@@ -510,13 +541,30 @@
}
@media (max-width: 600px) {
.upload-item-actions {
.upload-item {
flex-direction: column;
align-items: stretch;
}
.upload-item-info {
width: 100%;
flex: 1 1 auto;
min-width: 0;
}
.upload-item-actions {
flex-direction: row;
justify-content: flex-end;
align-items: center;
gap: 8px;
width: 100%;
margin-top: 8px;
flex-basis: 100%;
}
.upload-item-actions .btn {
width: 100%;
width: auto;
flex: 0 0 auto;
}
}
.file-state-icon { width: 18px; height: 18px; }
@@ -673,10 +721,18 @@
.grid-hashes {
grid-template-columns: 1fr;
}
.grid-credits {
grid-template-columns: 1fr;
}
.grid-first {
display: none;
}
.hash-first {
display: none;
}
.author-search-selected {
display: none;
}
}
@media (max-width: 600px) {
@@ -706,4 +762,20 @@
.form-error-text {
font-size: 0.8rem;
}
.form-type-of-checkboxes {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
label {
box-sizing: border-box;
margin: 0;
}
input[type="checkbox"] {
transform: scale(1.5);
margin-right: 1.33rem;
}
}
}

View File

@@ -30,8 +30,38 @@
.grid-entries {
display: grid;
grid-template-columns: repeat(6,1fr);
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 20px;
margin-bottom: 20px;
}
@media (max-width: 1400px) {
.grid-entries {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
}
@media (max-width: 1200px) {
.grid-entries {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 900px) {
.grid-entries {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 640px) {
.grid-entries {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 420px) {
.grid-entries {
grid-template-columns: 1fr;
}
}

View File

@@ -223,7 +223,7 @@
.activity-tl-card-description {
font-size: 0.8rem;
color: var(--text2);
white-space: nowrap;
word-break: break-word;
text-overflow: ellipsis;
line-height: 1.3;
}
@@ -265,13 +265,15 @@
@media (max-width: 600px) {
.activity-tl-header { flex-direction: column; align-items: flex-start; }
.activity-tl-thumb { display: none; }
.activity-tl-left { display: none; }
.activity-tl-card-description { display: none; }
.activity-day-sep { padding-left: 44px; }
.activity-tl-left { width: 44px; }
.activity-tl-date {
font-size: 0.75rem;
}
.activity-tl-content-title {
font-size: 0.9rem;
}
@@ -279,7 +281,7 @@
@media (max-width: 768px) {
.activity-timeline {
padding-left: 50px;
padding-left: 0px;
}
.activity-tl-left {

View File

@@ -3,6 +3,7 @@
display: flex;
flex-direction: column;
overflow: hidden;
min-height: 0;
}
#topbar {

View File

@@ -101,6 +101,30 @@
line-height: 1.6;
color: var(--text);
margin-bottom: 30px;
word-break: break-word;
p {
margin: 0 0 14px;
&:last-child {
margin-bottom: 0;
}
}
pre {
max-width: 100%;
overflow-x: auto;
white-space: pre-wrap;
word-break: break-word;
padding: 12px;
border-radius: 6px;
margin: 0 0 14px;
}
code {
white-space: pre-wrap;
word-break: break-word;
}
}
.entry-gallery {
@@ -220,6 +244,9 @@
overflow: hidden;
background-color: var(--bg4);
border: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: center;
img {
width: 100%;

View File

@@ -7,6 +7,7 @@
flex-shrink: 0;
transition: transform 0.3s ease;
z-index: 100;
overflow: hidden;
.menu-header {
padding: 10px;
@@ -44,9 +45,12 @@
}
.menu-navigation {
flex-grow: 1;
flex: 1 1 auto;
min-height: 0;
padding: 10px 0;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
overscroll-behavior: contain;
.menu-group {
margin-bottom: 20px;
@@ -96,7 +100,9 @@
}
.menu-user {
padding: 15px 20px;
flex-shrink: 0;
margin-top: auto;
padding: 15px 20px calc(15px + env(safe-area-inset-bottom)) 20px;
border-top: 1px solid var(--border);
display: flex;
align-items: center;
@@ -115,6 +121,14 @@
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
}
.menu-user-info {
display: flex;
@@ -123,6 +137,7 @@
&.username {
font-size: 0.9rem;
font-weight: 600;
text-decoration: none !important;
}
&.user_role {
font-size: 0.75rem;

View File

@@ -8,7 +8,9 @@
position: fixed;
left: 0;
top: 60px;
height: calc(100vh - 60px);
height: calc(100dvh - 60px);
max-height: calc(100dvh - 60px);
min-height: 0;
transform: translateX(-100%);
transition: transform 0.3s ease-in-out;
z-index: 999;

View File

@@ -131,15 +131,38 @@ export function GalleryManager() {
this.dragSrcI = index;
},
moveImageUp(index){
if( index <= 0 )
return;
const moved = this.images.splice(index, 1)[0];
this.images.splice(index - 1, 0, moved);
},
moveImageDown(index){
if( index >= this.images.length - 1 )
return;
const moved = this.images.splice(index, 1)[0];
this.images.splice(index + 1, 0, moved);
},
reorderImages(from, to){
if( from === null || to === null || from === to )
return;
const moved = this.images.splice(from, 1)[0];
this.images.splice(to, 0, moved);
this.dragSrcI = to;
},
dragOver(e, index){
e.preventDefault();
if( this.dragSrcI === null || this.dragSrcI === index )
return;
const moved = this.images.splice(this.dragSrcI, 1)[0];
this.images.splice(index, 0, moved);
this.dragSrcI = index;
this.reorderImages(this.dragSrcI, index);
},
dragEnd(){

View File

@@ -14,6 +14,11 @@ export function HashesManager( wire ) {
*/
isCalculating: false,
/**
*
*/
manualHashesModal: false,
/**
* An error on hash calculation.
* @type {any|null}

View File

@@ -8,6 +8,7 @@ import notifications from "./notifications.js";
import conversations from "./conversations.js";
import settings from "./settings.js";
import { initMobileMenu } from "./mobile-menu.js";
import { initMobileBackToTop } from "./mobile-back-to-top.js"
/**
* Get config defined in meta.blade.php
@@ -47,3 +48,4 @@ Alpine.store('settings', settings() );
// Mobile Menu
document.addEventListener('DOMContentLoaded', initMobileMenu);
document.addEventListener( 'DOMContentLoaded', initMobileBackToTop );

View File

@@ -72,6 +72,7 @@ export default function hovercard(){
Alpine.nextTick(() => {
const card = document.querySelector('.hovercard');
if (card) window.refreshIcons(card);
this.updatePosition(this.anchorEl);
});
} catch( error ){
@@ -89,13 +90,26 @@ export default function hovercard(){
const RECT = anchorEl.getBoundingClientRect();
const SCROLL_X = window.scrollX;
const SCROLL_Y = window.scrollY;
const VIEWPORT_WIDTH = window.innerWidth;
const VIEWPORT_HEIGHT = window.innerHeight;
let x = RECT.left + SCROLL_X;
const CARD = document.querySelector('.hovercard');
const WIDTH = CARD?.offsetWidth || 280;
const HEIGHT = CARD?.offsetHeight || 320;
let x = RECT.right + SCROLL_X + 8;
let y = RECT.bottom + SCROLL_Y + 8;
const WIDTH = 280;
if( x + WIDTH > window.innerWidth ){
x = window.innerWidth - WIDTH - 16;
if( x + WIDTH > VIEWPORT_WIDTH - 8 && RECT.left + SCROLL_X - WIDTH - 8 >= 8 ){
x = RECT.left + SCROLL_X - WIDTH - 8;
} else {
x = Math.max(8, Math.min(x, VIEWPORT_WIDTH - WIDTH - 8));
}
if( y + HEIGHT > VIEWPORT_HEIGHT + SCROLL_Y - 8 && RECT.top + SCROLL_Y - HEIGHT - 8 >= 8 ){
y = RECT.top + SCROLL_Y - HEIGHT - 8;
} else {
y = Math.max(8, Math.min(y, VIEWPORT_HEIGHT + SCROLL_Y - HEIGHT - 8));
}
this.x = x;

View File

@@ -0,0 +1,18 @@
export function initMobileBackToTop(){
const backToTopButton = document.querySelector('.back-to-top');
const content = document.getElementById('content');
if (!backToTopButton || !content) {
return;
}
const toggleBackToTop = () => {
const shouldShow = window.innerWidth <= 768 && content.scrollTop > 320;
backToTopButton.classList.toggle('visible', shouldShow);
};
toggleBackToTop();
content.addEventListener('scroll', toggleBackToTop, { passive: true });
window.addEventListener('resize', toggleBackToTop, { passive: true });
}

View File

@@ -20,7 +20,7 @@
</div>
<div style="margin-bottom:10px">
<span class="badge {{ $entry->type }}">{{ \App\View\Components\EntryCard::ENTRY_TYPES_BADGE[$entry->type] ?? $entry->type }}</span>
@if( section_must_be('romhacks', $entry->type ) )
@if( section_must_be(['romhacks', 'lua-scripts'], $entry->type ) )
@foreach( $entry->modifications as $modif )
<span class="badge orange">{{ $modif->name }}</span>
@endforeach
@@ -28,7 +28,7 @@
@foreach( $entry->languages as $lang )
<span class="badge orange">{{ $lang->name }}</span>
@endforeach
@elseif( section_must_be( 'utilities', $entry->type ) )
@elseif( section_must_be( ['utilities', 'documents'], $entry->type ) )
@foreach( $entry->categories as $category )
<span class="badge orange">{{ $category->name }}</span>
@endforeach
@@ -46,7 +46,7 @@
@endif
</div>
<div class="entry-card-meta">
<span><i data-lucide="download" size="12"></i> x</span>
<span><i data-lucide="download" size="12"></i> {{ $entry->total_downloads ?? 0 }}</span>
<span>Added: {{ $entry->created_at->format('y-m-d') }}</span>
</div>
</div>

View File

@@ -2,20 +2,28 @@
<x-form-field-title name="Screenshots" helper="At least 1 Screenshot required, Maximum 20." required="{{ $required ? 'true' : 'false' }}" />
<div class="form-group main-image-grid">
<div class="form-upload" style="flex:1;" :class="{ 'disabled': isFull }">
<input type="file" id="gallery-field" accept="image/png, image/jpeg, image/webp" multiple :disabled="isFull" @change="handleSubmitFiles($event)">
<input type="file" id="gallery-field" accept="image/png, image/jpeg, image/webp, image/gif" multiple :disabled="isFull" @change="handleSubmitFiles($event)">
<div class="form-upload-placeholder level">
<i data-lucide="file-archive" size="36" style="margin-bottom:15px;color:var(--text2)"></i>
<div style="font-size: 1.1rem;color:var(--text);margin-bottom:5px;">
Click or drag'n drop files here.
</div>
<div style="font-size:0.85rem;color:var(--text2);">
Accepted: PNG, JPG or WebP
Accepted: PNG, JPG, GIF or WebP
</div>
</div>
</div>
<div class="form-gallery form-group level" style="flex:4;">
<template x-for="(image,i) in images" :key="image.key">
<div class="gallery-item" :class="{ 'gallery-item--dragging': dragSrcI === i }" draggable="true" @dragstart="dragStart(i)" @dragover="dragOver($event, i)" @dragend="dragEnd()">
<div
class="gallery-item"
:class="{ 'gallery-item--dragging': dragSrcI === i }"
draggable="true"
:data-gallery-index="i"
@dragstart="dragStart(i)"
@dragover="dragOver($event, i)"
@dragend="dragEnd()"
>
<div class="form-image-preview-wrap">
<div class="gallery-drag-handle" title="Drag to reorder">
<i data-lucide="grip-vertical" size="14"></i>
@@ -28,6 +36,14 @@
X
</button>
</div>
<div class="gallery-mobile-controls" aria-label="Reorder screenshot">
<button type="button" class="gallery-move-btn" @click="moveImageUp(i)" :disabled="i === 0" title="Move up">
<i data-lucide="chevron-up" size="14"></i>
</button>
<button type="button" class="gallery-move-btn" @click="moveImageDown(i)" :disabled="i === images.length - 1" title="Move down">
<i data-lucide="chevron-down" size="14"></i>
</button>
</div>
</div>
</template>
</div>

View File

@@ -3,14 +3,14 @@
<x-form-field-title name="Main image" helper="This will show up on the index and on top of the entry. A screenshot or custom cover is prefered else all entries of same game will look the same." required="{{ $required ? 'true' : 'false' }}" />
<div class="form-group main-image-grid">
<div class="form-upload" style="flex:4;">
<input type="file" id="main-image-field" accept="image/png, image/jpeg, image/webp" @change="handleSubmitFile($event)">
<input type="file" id="main-image-field" accept="image/png, image/jpeg, image/webp, image/gif" @change="handleSubmitFile($event)">
<div class="form-upload-placeholder level">
<i data-lucide="file-archive" size="36" style="margin-bottom:15px;color:var(--text2)"></i>
<div style="font-size: 1.1rem;color:var(--text);margin-bottom:5px;">
Click or drag'n drop files here.
</div>
<div style="font-size:0.85rem;color:var(--text2);">
Accepted: PNG, JPG or WebP
Accepted: PNG, JPG, GIF or WebP
</div>
</div>
<input type="hidden" name="main-image" x-model="serverFilePath">

View File

@@ -1,5 +1,7 @@
<div class="comment-block">
<x-xen-foro-avatar :user="$review->user_id" />
<div class="comment-avatar">
<x-xen-foro-avatar :user="$review->user_id" />
</div>
<div class="comment-content">
<div class="comment-meta">

View File

@@ -2,9 +2,9 @@
<x-form-field-title name="Staff/Credits" />
<template x-if="credits.length > 0">
<div class="form-group grid-credits">
<div><x-form-field-title name="Name" /></div>
<div><x-form-field-title name="Description" /></div>
<div><x-form-field-title name="Actions" /></div>
<div class="grid-first"><x-form-field-title name="Name" /></div>
<div class="grid-first"><x-form-field-title name="Description" /></div>
<div class="grid-first"><x-form-field-title name="Actions" /></div>
<template x-for="(credit,i) in credits" :key="i">
<div style="display:contents">
<div>

View File

@@ -26,7 +26,7 @@
</div>
@endif
<div>
@if( section_must_be( [ 'romhacks', 'homebrew' ], $section ) && !$isEdit )
@if( section_must_be( [ 'romhacks', 'homebrew' ], $section ) && !$isEdit && $VISITOR->nsfw_content === 1 )
<label class="nsfw-label"><input id="nsfw-checkbox" type="checkbox" name="nsfw-entry" x-model="nsfw" style="transform: scale(1.5)"> NSFW</label>
@endif
</div>

View File

@@ -1,6 +1,6 @@
@php $topbarModSeparator = false; $topbarAdminSeparator = false; @endphp
<header id="topbar">
<button class="mobile-toggle">
<button class="mobile-toggle" title="Open menu">
<i data-lucide="menu"></i>
</button>
@@ -14,7 +14,7 @@
<input type="text" id="search-input" placeholder="Search" autocomplete="off">
<button type="submit" class="search-button">
<button type="submit" class="search-button" title="Search">
<i data-lucide="search" size="18" color="var(--text2)"></i>
</button>
</form>
@@ -124,26 +124,28 @@
@endcan
@if( !\Auth::guest() )
<div x-data x-init="$store.notifications.unviewed = {{ \Auth::user()->alerts_unviewed }}" style="position:relative">
<button type="button" class="btn" :class="{ 'active': $store.notifications.start }" @click="$store.notifications.open($el)" @click.outside="$store.notifications.close()">
<button type="button" class="btn" title="Notifications" :class="{ 'active': $store.notifications.start }" @click="$store.notifications.open($el)" @click.outside="$store.notifications.close()">
<i data-lucide="bell" size="18"></i>
<span
class="topbar-badge"
:class="$store.notifications.unread > 9 ? 'topbar-badge--overflow' : ''"
x-show="$store.notifications.unread > 0"
x-text="$store.notifications.unread > 99 ? '99+' : $store.notifications.unread"
x-cloak
></span>
</button>
@include('components.notifications')
</div>
<div x-data x-init="$store.conversations.unviewed = {{ \Auth::user()->conversations_unread }}" style="position:relative">
<button type="button" class="btn" :class="{ 'active': $store.conversations.start }" @click="$store.conversations.open($el)" @click.outside="$store.conversations.close()">
<button type="button" class="btn" title="Messages" :class="{ 'active': $store.conversations.start }" @click="$store.conversations.open($el)" @click.outside="$store.conversations.close()">
<i data-lucide="mail" size="18"></i>
<span
class="topbar-badge"
:class="$store.conversations.unread > 9 ? 'topbar-badge--overflow' : ''"
x-show="$store.conversations.unread > 0"
x-text="$store.conversations.unread > 99 ? '99+' : $store.conversations.unread"
x-cloak
></span>
</button>
@@ -154,6 +156,7 @@
<button
type="button"
class="btn"
title="Settings"
:class="{ 'active': $store.settings.start }"
@click="$store.settings.open()"
@click.outside="$store.settings.close()"

View File

@@ -42,7 +42,9 @@
@continue
@else
<div class="comment-block">
<div class="comment-avatar">
<x-xen-foro-avatar :user="$comment['user_id']" />
</div>
<div class="comment-content">
<div class="comment-meta">
@@ -52,7 +54,7 @@
</div>
<div class="comment-body">
{!! $comment['message'] !!}
{!! \App\Helpers\EntryHelpers::stripBbCode($comment['message']) !!}
</div>
</div>
</div>

View File

@@ -122,6 +122,9 @@
<x-entry-meta-item label="Release Date" value="{{ $entry->release_date->format('Y-m-d') }}"
route="none"/>
@endif
@if( $entry->total_downloads )
<x-entry-meta-item label="Downloads" value="{{ $entry->total_downloads }}" route="none" />
@endif
</div>
<div class="hack-actions" style="display:flex;gap:10px;">
@if($entry->state === 'pending')

View File

@@ -0,0 +1,6 @@
@extends('layouts.app')
@section('content')
<x-error-block error-type="page-not-allowed" message="Unknown" />
<a class="btn" href="javascript:history.go(-1)">Go back to the previous page</a>
@endsection

View File

@@ -0,0 +1,6 @@
@extends('layouts.app')
@section('content')
<x-error-block error-type="not-found" />
<a class="btn" href="javascript:history.go(-1)">Go back to the previous page</a>
@endsection

View File

@@ -0,0 +1,6 @@
@extends('layouts.app')
@section('content')
<x-error-block error-type="custom" message="{{ $exception->getMessage() }}" />
<a class="btn" href="javascript:history.go(-1)">Go back to the previous page</a>
@endsection

View File

@@ -0,0 +1,305 @@
<html>
<head>
<title>500 - Internal server error - Romhack Plaza</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
:root {
/* RHPZ color */
--rhpz-orange: #ff7300;
--rhpz-orange-hover: #e56700;
/* Background colors */
--bg: #1e1e1e;
--bg2: #252526;
--bg3: #2d2d30;
--bg4: #3e3e42;
/* Text */
--text: #f1f1f1;
--text2: #a1a1aa;
--text3: #111111;
/* Elements */
--border: #3f3f46;
--error: #e57373;
--info: #1976d2;
--success: #81c784;
--success2: #388e3c;
/* Typo */
--typography: 'Segoe UI', 'San Francisco', 'Helvetica Neue', sans-serif;
/* Menu settings */
--menu-size: 260px;
--menu-user-avatar-bg: #555;
/* Gap */
--gap: 15px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--typography);
background-color: var(--bg);
color: var(--text);
display: flex;
height: 100vh;
overflow: hidden;
}
a {
color: var(--rhpz-orange);
text-decoration: none;
transition: color 0.2s;
}
a:hover {
color: var(--rhpz-orange-hover);
text-decoration: underline;
}
#app {
display: flex;
width: 100%;
height: 100%;
}
ul {
margin-left: 20px;
margin-bottom: 20px;
list-style-type: square;
}
[x-cloak] {display: none !important;}
/* BUTTONS */
.btn {
background-color: var(--bg3);
border: 1px solid var(--border);
color: var(--text);
padding: 8px 16px;
font-size: 0.9rem;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 8px;
transition: all 0.1s;
}
.btn:hover {
background-color: var(--bg4);
border-color: var(--menu-user-avatar-bg);
}
.btn.primary {
background-color: var(--rhpz-orange);
color: var(--text3);
border-color: var(--rhpz-orange);
font-weight: 600;
}
.btn.primary:hover {
background-color: var(--rhpz-orange-hover);
border-color: var(--rhpz-orange-hover);
}
.btn.danger {
background-color: transparent;
color: var(--error);
border-color: var(--error);
}
.btn.danger:hover {
background-color: rgba(229, 115, 115, 0.1);
}
.btn.success {
background-color: transparent;
color: var(--success);
border-color: var(--success);
}
.btn.success:hover {
background-color: rgba(129, 199, 132, 0.1);
}
/* BLOCK */
.block {
background-color: var(--bg2);
border: 1px solid var(--border);
padding: 20px;
margin-bottom: 20px;
}
.block.featured {
border-left: 3px solid var(--rhpz-orange);
}
.block-header {
font-size: 1.2rem;
color: var(--text);
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 10px;
border-bottom: 1px solid var(--border);
padding-bottom: 10px;
}
.block-success {
background-color: var(--success);
border: 1px solid var(--success);
color: var(--text);
padding: 20px;
margin-bottom: 20px;
}
.block-error {
background-color: var(--error);
border: 1px solid var(--error);
color: var(--text);
padding: 20px;
margin-bottom: 20px;
}
/* PAGE */
.page-title {
font-size: 1.8rem;
font-weight: 300;
margin-bottom: 20px;
color: var(--text);
flex-shrink: 0;
}
/* TEXTS */
.whisper {
color: var(--text2);
margin-bottom: 15px;
}
.content-title {
color: var(--text);
margin: 30px 0 15px 0;
border-left: 3px solid var(--rhpz-orange);
padding-left: 10px;
}
.quote {
background-color: var(--bg);
border-left: 4px solid #1976d2;
padding: 15px;
margin-top: 30px;
font-style: italic;
}
@media (max-width: 768px) {
.btn {
padding: 7px 12px;
font-size: 0.85rem;
gap: 6px;
}
.block {
padding: 15px;
margin-bottom: 15px;
}
.block-header {
font-size: 1.05rem;
margin-bottom: 12px;
padding-bottom: 8px;
}
.page-title {
font-size: 1.5rem;
margin-bottom: 15px;
}
.content-title {
margin: 20px 0 12px 0;
padding-left: 8px;
}
.quote {
padding: 12px;
margin-top: 20px;
font-size: 0.95rem;
}
.whisper {
margin-bottom: 12px;
font-size: 0.9rem;
}
.breadcrumb {
font-size: 0.85rem;
}
}
@media (max-width: 600px) {
.btn {
padding: 6px 10px;
font-size: 0.8rem;
gap: 4px;
justify-content: center;
}
.btn.primary, .btn.danger, .btn.success {
width: 100%;
}
.block {
padding: 12px;
margin-bottom: 12px;
}
.block-header {
font-size: 0.95rem;
margin-bottom: 10px;
padding-bottom: 6px;
}
.page-title {
font-size: 1.2rem;
margin-bottom: 12px;
}
.badge {
padding: 2px 6px;
font-size: 0.7rem;
}
.topbar-badge {
min-width: 16px;
height: 16px;
padding: 0 3px;
font-size: 0.6rem;
}
}
</style>
</head>
<body>
<div id="app" style="display:flex;flex-direction: column;align-items: center;justify-content: center;">
<main id="main-wrapper">
<main id="content">
<div class="block">
<div class="page-title">500 - Internal server error</div>
<p>To resolve the issue quickly, please report it on Gitea, Discord, or the forum with the following information.</p>
<ul>
<li>Your error code: {{ $errorId ?? "" }}</li>
<li>What you were doing before the error occurred.</li>
</ul>
</div>
<div>
<a href="https://code.romhackplaza.org/RHPZAdmin/RomhackPlaza/issues" class="btn primary">Report the problem on Gitea</a>
<a href="https://community.romhackplaza.org/forums/bug-reports.6/" class="btn primary">Report the problem on the forum</a>
<a href="https://community.romhackplaza.org/misc/contact/" class="btn">Report the problem with the contact form</a>
<a href="https://discord.gg/5CKzeWmZZU" class="btn">Report the problem on Discord</a>
</div>
</main>
</main>
</div>
</body>
</html>

View File

@@ -4,8 +4,6 @@
@section('content')
{{ dd( $VISITOR ) }}
@include('activity.latest-news')
@include('activity.featured-entries')

View File

@@ -3,11 +3,11 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{!! SEO::generate() !!}
@include('meta')
@vite(['resources/css/app.css', 'resources/js/app.js'])
@livewireStyles
@stack('styles')
<title>@yield('page-title', 'Romhack Plaza')</title>
</head>
<body>
@@ -24,12 +24,20 @@
@if(session('error'))
<x-error-block error-type="custom" :message="session('error')" />
@endif
@if(isset($errors) && $errors->has('maintenance'))
<x-error-block error-type="custom" :message="$errors->get('maintenance')[0]" />
@endif
@yield('content')
</div>
</main>
</div>
<button type="button" class="back-to-top" aria-label="Back to top" onclick="document.getElementById('content')?.scrollTo({ top: 0, behavior: 'smooth' });">
<i data-lucide="arrow-up"></i>
<span>Top</span>
</button>
@include('components.hovercard')
@livewireScripts
@stack('scripts')

View File

@@ -16,8 +16,11 @@
@foreach( $menu['items'] as $item )
@if( !isset( $item['requires_auth'] ) || $item['requires_auth'] === true && $VISITOR->loggedIn() )
<a href="{{ isset($item['xf_route']) ? xfRoute($item['xf_route']) : route($item['route']) }}"
@class(['menu-item', 'active' => request()->routeIs( $item['route'] ?? '' )]) >
<a href="{{ isset($item['xf_route']) ? xfRoute($item['xf_route']) : $item['custom_route'] ?? route($item['route']) }}"
@class(['menu-item', 'active' => request()->routeIs( $item['route'] ?? '' )])
style="{{ isset( $item['color'] ) ? 'color:' . $item['color'] . ';' : '' }}"
{{ isset( $item['custom_route'] ) ? 'target="_blank"' : '' }}
>
<i data-lucide="{{ $item['icon'] }}"></i><span>{{ $item['name'] }}</span>
</a>
@endif
@@ -35,7 +38,11 @@
</div>
<div class="menu-user-info">
<span class="username">
{{ $VISITOR->username ?? "Guest" }}
@if( $VISITOR->guest() )
Guest
@else
<x-xf-username-link :user-id="$VISITOR->user_id" />
@endif
</span>
<span class="user_role">
<a href="{{ $VISITOR->guest() ? xfRoute('login') : xfRoute('logout') . '?t=' . xfCsrfToken() }}">

View File

@@ -27,10 +27,12 @@
<div class="modcp-nav-group">
<span class="modcp-nav-label">Content</span>
<a href="{{ route('modcp.locked') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.locked') ? 'active' : '' }}>
<i data-lucide="lock" size="15"></i>
Locked entries
</a>
@can('moderate','\App\Models\Entry')
<a href="{{ route('modcp.locked') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.locked') ? 'active' : '' }}>
<i data-lucide="lock" size="15"></i>
Locked entries
</a>
@endcan
@can('is-admin')
<a href="{{ route('modcp.draft') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.draft') ? 'active' : '' }}>
<i data-lucide="scissors" size="15"></i>
@@ -74,6 +76,14 @@
<i data-lucide="box" size="15"></i>
Genres
</a>
<a href="{{ route('modcp.levels.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.levels.*') ? 'active' : '' }}">
<i data-lucide="weight" size="15"></i>
Levels
</a>
<a href="{{ route('modcp.modifications.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.modifications.*') ? 'active' : '' }}">
<i data-lucide="pencil-ruler" size="15"></i>
Modifications
</a>
@endcan
</div>

View File

@@ -203,7 +203,7 @@
</div>
<div class="log-pagination">
{{ $logs->links() }}
{{ $logs->links('modcp.pagination') }}
</div>
@endif

View File

@@ -59,7 +59,55 @@
<span x-show="error" x-text="error" class="form-error-text" x-cloak></span>
<button type="button" class="btn primary" :disabled="isCalculating" @click="handleSubmitFile()">Add Hashes</button>
<button type="button" class="btn" :disabled="isCalculating" @click="manualHashesModal = true;">Provide hash manually</button>
<button type="button" class="btn primary" :disabled="isCalculating" @click="handleSubmitFile()">Add hashes</button>
</div>
<div
class="modal-overlay"
x-show="manualHashesModal"
x-effect="manualHashesModal && $nextTick(() => window.refreshIcons($el))"
x-cloak
x-transition.opacity.duration.300ms
@keydown.escape.window="manualHashesModal = false"
@focus="window.refreshIcons($el)"
@close-manual-modal.window="manualHashesModal = false"
>
<div @click.outside="manualHashesModal = false" class="modal-window">
<div class="modal-header">
<span class="modal-title">Provide hash manually</span>
<button type="button" @click="manualHashesModal = false" class="modal-close">
<i data-lucide="x" size="18"></i>
</button>
</div>
<div class="modal-content">
<div class="form-group">
<label class="form-label">Filename</label>
<input type="text" wire:model="manualFilename" class="form-input" maxlength="512">
@error('manualFilename') <span class="form-error-text">{{ $message }}</span> @enderror
</div>
<div class="form-group">
<label class="form-label">CRC32</label>
<input type="text" wire:model="manualCRC32" class="form-input" maxlength="512">
@error('manualCRC32') <span class="form-error-text">{{ $message }}</span> @enderror
</div>
<div class="form-group">
<label class="form-label">SHA-1</label>
<input type="text" wire:model="manualSHA1" class="form-input" maxlength="512">
@error('manualSHA1') <span class="form-error-text">{{ $message }}</span> @enderror
</div>
<button type="button" class="btn primary" style="width: 100%; justify-content: center;" wire:click="addManualHash" wire:loading.attr="disabled">
<i data-lucide="plus" size="14"></i> Add
</button>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,299 @@
<html>
<head>
<title>500 - Internal server error - Romhack Plaza</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
:root {
/* RHPZ color */
--rhpz-orange: #ff7300;
--rhpz-orange-hover: #e56700;
/* Background colors */
--bg: #1e1e1e;
--bg2: #252526;
--bg3: #2d2d30;
--bg4: #3e3e42;
/* Text */
--text: #f1f1f1;
--text2: #a1a1aa;
--text3: #111111;
/* Elements */
--border: #3f3f46;
--error: #e57373;
--info: #1976d2;
--success: #81c784;
--success2: #388e3c;
/* Typo */
--typography: 'Segoe UI', 'San Francisco', 'Helvetica Neue', sans-serif;
/* Menu settings */
--menu-size: 260px;
--menu-user-avatar-bg: #555;
/* Gap */
--gap: 15px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--typography);
background-color: var(--bg);
color: var(--text);
display: flex;
height: 100vh;
overflow: hidden;
}
a {
color: var(--rhpz-orange);
text-decoration: none;
transition: color 0.2s;
}
a:hover {
color: var(--rhpz-orange-hover);
text-decoration: underline;
}
#app {
display: flex;
width: 100%;
height: 100%;
}
ul {
margin-left: 20px;
margin-bottom: 20px;
list-style-type: square;
}
[x-cloak] {display: none !important;}
/* BUTTONS */
.btn {
background-color: var(--bg3);
border: 1px solid var(--border);
color: var(--text);
padding: 8px 16px;
font-size: 0.9rem;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 8px;
transition: all 0.1s;
}
.btn:hover {
background-color: var(--bg4);
border-color: var(--menu-user-avatar-bg);
}
.btn.primary {
background-color: var(--rhpz-orange);
color: var(--text3);
border-color: var(--rhpz-orange);
font-weight: 600;
}
.btn.primary:hover {
background-color: var(--rhpz-orange-hover);
border-color: var(--rhpz-orange-hover);
}
.btn.danger {
background-color: transparent;
color: var(--error);
border-color: var(--error);
}
.btn.danger:hover {
background-color: rgba(229, 115, 115, 0.1);
}
.btn.success {
background-color: transparent;
color: var(--success);
border-color: var(--success);
}
.btn.success:hover {
background-color: rgba(129, 199, 132, 0.1);
}
/* BLOCK */
.block {
background-color: var(--bg2);
border: 1px solid var(--border);
padding: 20px;
margin-bottom: 20px;
}
.block.featured {
border-left: 3px solid var(--rhpz-orange);
}
.block-header {
font-size: 1.2rem;
color: var(--text);
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 10px;
border-bottom: 1px solid var(--border);
padding-bottom: 10px;
}
.block-success {
background-color: var(--success);
border: 1px solid var(--success);
color: var(--text);
padding: 20px;
margin-bottom: 20px;
}
.block-error {
background-color: var(--error);
border: 1px solid var(--error);
color: var(--text);
padding: 20px;
margin-bottom: 20px;
}
/* PAGE */
.page-title {
font-size: 1.8rem;
font-weight: 300;
margin-bottom: 20px;
color: var(--text);
flex-shrink: 0;
}
/* TEXTS */
.whisper {
color: var(--text2);
margin-bottom: 15px;
}
.content-title {
color: var(--text);
margin: 30px 0 15px 0;
border-left: 3px solid var(--rhpz-orange);
padding-left: 10px;
}
.quote {
background-color: var(--bg);
border-left: 4px solid #1976d2;
padding: 15px;
margin-top: 30px;
font-style: italic;
}
@media (max-width: 768px) {
.btn {
padding: 7px 12px;
font-size: 0.85rem;
gap: 6px;
}
.block {
padding: 15px;
margin-bottom: 15px;
}
.block-header {
font-size: 1.05rem;
margin-bottom: 12px;
padding-bottom: 8px;
}
.page-title {
font-size: 1.5rem;
margin-bottom: 15px;
}
.content-title {
margin: 20px 0 12px 0;
padding-left: 8px;
}
.quote {
padding: 12px;
margin-top: 20px;
font-size: 0.95rem;
}
.whisper {
margin-bottom: 12px;
font-size: 0.9rem;
}
.breadcrumb {
font-size: 0.85rem;
}
}
@media (max-width: 600px) {
.btn {
padding: 6px 10px;
font-size: 0.8rem;
gap: 4px;
justify-content: center;
}
.btn.primary, .btn.danger, .btn.success {
width: 100%;
}
.block {
padding: 12px;
margin-bottom: 12px;
}
.block-header {
font-size: 0.95rem;
margin-bottom: 10px;
padding-bottom: 6px;
}
.page-title {
font-size: 1.2rem;
margin-bottom: 12px;
}
.badge {
padding: 2px 6px;
font-size: 0.7rem;
}
.topbar-badge {
min-width: 16px;
height: 16px;
padding: 0 3px;
font-size: 0.6rem;
}
}
</style>
</head>
<body>
<div id="app" style="display:flex;flex-direction: column;align-items: center;justify-content: center;">
<main id="main-wrapper">
<main id="content">
<div class="block">
<div class="page-title">Maintenance is in progress.</div>
<p>Please wait until maintenance is complete. Follow the Discord server or the forum if this is unscheduled maintenance.</p>
</div>
<div>
<a href="https://community.romhackplaza.org/" class="btn primary">Go to the forum</a>
<a href="https://discord.gg/5CKzeWmZZU" class="btn">Go to Discord</a>
</div>
</main>
</main>
</div>
</body>
</html>

View File

@@ -84,6 +84,6 @@
@endforelse
</div>
{{ $items->links() }}
{{ $items->links('modcp.pagination') }}
@endsection

View File

@@ -55,7 +55,7 @@
</div>
@endforeach
</div>
{{ $entries->links() }}
{{ $entries->links('modcp.pagination') }}
@endif
@endsection

View File

@@ -47,6 +47,6 @@
</div>
@endforeach
</div>
{{ $entries->links() }}
{{ $entries->links( 'modcp.pagination' ) }}
@endif
@endsection

Some files were not shown because too many files have changed in this diff Show More