From 735d028bb2a29974a0b48de1ea202443c2ea1fea Mon Sep 17 00:00:00 2001 From: itinerare Date: Thu, 28 May 2020 10:41:12 -0400 Subject: [PATCH 01/43] Turn HTMLPurifier caching off for testing purposes --- app/Helpers/Helpers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Helpers/Helpers.php b/app/Helpers/Helpers.php index 558aa0e676..bfae15b475 100644 --- a/app/Helpers/Helpers.php +++ b/app/Helpers/Helpers.php @@ -97,6 +97,7 @@ function parse($text, &$pings = null) { $config->set('Attr.EnableID', true); $config->set('HTML.DefinitionID', 'include'); $config->set('HTML.DefinitionRev', 2); + $config->set('Cache.DefinitionImpl', null); // TODO: remove this later! if ($def = $config->maybeGetRawHTMLDefinition()) { $def->addElement('include', 'Block', 'Empty', 'Common', array('file*' => 'URI', 'height' => 'Text', 'width' => 'Text')); $def->addAttribute('a', 'data-toggle', 'Enum#collapse'); From 7c6fce9ca6a697b1bdf6cdabdb439c4c15ea5cfa Mon Sep 17 00:00:00 2001 From: itinerare Date: Thu, 28 May 2020 11:02:14 -0400 Subject: [PATCH 02/43] Pushing precisely the version of the config where it works, apparently --- app/Helpers/Helpers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Helpers/Helpers.php b/app/Helpers/Helpers.php index bfae15b475..1a2511a575 100644 --- a/app/Helpers/Helpers.php +++ b/app/Helpers/Helpers.php @@ -102,6 +102,7 @@ function parse($text, &$pings = null) { $def->addElement('include', 'Block', 'Empty', 'Common', array('file*' => 'URI', 'height' => 'Text', 'width' => 'Text')); $def->addAttribute('a', 'data-toggle', 'Enum#collapse'); $def->addAttribute('a', 'aria-expanded', 'Enum#true,false'); + } $purifier = new HTMLPurifier($config); From 80c16c82a7b01e8ff749457beb6f4393c226a331 Mon Sep 17 00:00:00 2001 From: itinerare Date: Thu, 28 May 2020 11:27:43 -0400 Subject: [PATCH 03/43] Add accordion support. --- app/Helpers/Helpers.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Helpers/Helpers.php b/app/Helpers/Helpers.php index 1a2511a575..1003dc8434 100644 --- a/app/Helpers/Helpers.php +++ b/app/Helpers/Helpers.php @@ -102,6 +102,8 @@ function parse($text, &$pings = null) { $def->addElement('include', 'Block', 'Empty', 'Common', array('file*' => 'URI', 'height' => 'Text', 'width' => 'Text')); $def->addAttribute('a', 'data-toggle', 'Enum#collapse'); $def->addAttribute('a', 'aria-expanded', 'Enum#true,false'); + $def->addAttribute('a', 'data-target', 'Text'); + $def->addAttribute('div', 'data-parent', 'Text'); } From aaec1bbd577d89291e8c2c6831d5ea8225a560cf Mon Sep 17 00:00:00 2001 From: itinerare Date: Thu, 28 May 2020 11:37:20 -0400 Subject: [PATCH 04/43] Add tab --- app/Helpers/Helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/Helpers.php b/app/Helpers/Helpers.php index 1003dc8434..348b989265 100644 --- a/app/Helpers/Helpers.php +++ b/app/Helpers/Helpers.php @@ -100,7 +100,7 @@ function parse($text, &$pings = null) { $config->set('Cache.DefinitionImpl', null); // TODO: remove this later! if ($def = $config->maybeGetRawHTMLDefinition()) { $def->addElement('include', 'Block', 'Empty', 'Common', array('file*' => 'URI', 'height' => 'Text', 'width' => 'Text')); - $def->addAttribute('a', 'data-toggle', 'Enum#collapse'); + $def->addAttribute('a', 'data-toggle', 'Enum#collapse,tab'); $def->addAttribute('a', 'aria-expanded', 'Enum#true,false'); $def->addAttribute('a', 'data-target', 'Text'); $def->addAttribute('div', 'data-parent', 'Text'); From 5fecd50fbdcf520bdb8c8acd48d68eeebe7d8bd4 Mon Sep 17 00:00:00 2001 From: itinerare Date: Wed, 10 Jun 2020 17:31:46 -0400 Subject: [PATCH 05/43] Fix for bug around editing character desc/notes and then trying to open a modal --- resources/views/character/_image_js.blade.php | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/resources/views/character/_image_js.blade.php b/resources/views/character/_image_js.blade.php index 678dc833f1..425b5a7000 100644 --- a/resources/views/character/_image_js.blade.php +++ b/resources/views/character/_image_js.blade.php @@ -6,10 +6,27 @@ }); $('.edit-notes').on('click', function(e) { e.preventDefault(); - $( "div.imagenoteseditingparse" ).load("{{ url('admin/character/image') }}/"+$(this).data('id')+"/notes", 'Edit Image Notes'); - $( "div.imagenoteseditingparse" ).attr('id', 'modal'); + $( "div.imagenoteseditingparse" ).load("{{ url('admin/character/image') }}/"+$(this).data('id')+"/notes", function() { + tinymce.init({ + selector: '.imagenoteseditingparse .wysiwyg', + height: 500, + menubar: false, + convert_urls: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen spoiler', + 'insertdatetime media table paste code help wordcount' + ], + toolbar: 'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | spoiler-add spoiler-remove | removeformat | code', + content_css: [ + '{{ asset('css/app.css') }}', + '{{ asset('css/lorekeeper.css') }}' + ], + spoiler_caption: 'Toggle Spoiler', + target_list: false + }); + }); $( ".edit-notes" ).remove(); - //loadModal("{{ url('admin/character/image') }}/"+$(this).data('id')+"/notes", 'Edit Image Notes'); }); $('.edit-credits').on('click', function(e) { e.preventDefault(); @@ -37,10 +54,27 @@ }); $('.edit-description').on('click', function(e) { e.preventDefault(); - $( "div.descriptioneditingparse" ).load("{{ url($character->is_myo_slot ? 'admin/myo/' : 'admin/character/') }}/"+$(this).data('{{ $character->is_myo_slot ? 'id' : 'slug' }}')+"/description", 'Edit Description'); - $( "div.descriptioneditingparse" ).attr('id', 'modal'); + $( "div.descriptioneditingparse" ).load("{{ url($character->is_myo_slot ? 'admin/myo/' : 'admin/character/') }}/"+$(this).data('{{ $character->is_myo_slot ? 'id' : 'slug' }}')+"/description", function() { + tinymce.init({ + selector: '.descriptioneditingparse .wysiwyg', + height: 500, + menubar: false, + convert_urls: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen spoiler', + 'insertdatetime media table paste code help wordcount' + ], + toolbar: 'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | spoiler-add spoiler-remove | removeformat | code', + content_css: [ + '{{ asset('css/app.css') }}', + '{{ asset('css/lorekeeper.css') }}' + ], + spoiler_caption: 'Toggle Spoiler', + target_list: false + }); + }); $( ".edit-description" ).remove(); - //loadModal("{{ url($character->is_myo_slot ? 'admin/myo/' : 'admin/character/') }}/"+$(this).data('{{ $character->is_myo_slot ? 'id' : 'slug' }}')+"/description", 'Edit Description'); }); $('.delete-character').on('click', function(e) { e.preventDefault(); From 1d26649bdb1cc9de610a952a5250bc19b9633cd6 Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 14 Jun 2020 15:06:31 -0400 Subject: [PATCH 06/43] Adjust dashboard timestamp mobile css slightly --- public/css/lorekeeper.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/css/lorekeeper.css b/public/css/lorekeeper.css index f645ada896..c32522e2f5 100644 --- a/public/css/lorekeeper.css +++ b/public/css/lorekeeper.css @@ -180,6 +180,11 @@ main > .row { @media (max-width: 767px) { .site-mobile-header { top: 54px !important; + } + + .timestamp { + margin-left: 1rem!important; + margin-right: 1rem!important; } } @@ -258,11 +263,6 @@ main > .row { .site-footer .navbar .navbar-nav { flex-wrap: wrap; justify-content: center; } - - .timestamp { - margin-left: 1rem!important; - margin-right: 1rem!important; - } } /* Footer */ From f907c7fe68efedfa4349634703f153507b337470 Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 23 Jun 2020 22:29:13 -0400 Subject: [PATCH 07/43] Add meta tags for social media, discord, etc previews. --- config/lorekeeper/settings.php | 12 ++++++++++++ public/images/meta-image.png | Bin 0 -> 21619 bytes resources/views/layouts/app.blade.php | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 public/images/meta-image.png diff --git a/config/lorekeeper/settings.php b/config/lorekeeper/settings.php index 1adb85423a..214de62f6b 100644 --- a/config/lorekeeper/settings.php +++ b/config/lorekeeper/settings.php @@ -26,6 +26,18 @@ | */ 'site_name' => 'Lorekeeper', + + /* + |-------------------------------------------------------------------------- + | Site Description + |-------------------------------------------------------------------------- + | + | This is the description used for the site in meta tags-- previews + | displayed on various social media sites, discord, and the like. + | It is not, however, displayed on the site itself. This should be kept short and snappy! + | + */ + 'site_desc' => 'A Lorekeeper ARPG', /* |-------------------------------------------------------------------------- diff --git a/public/images/meta-image.png b/public/images/meta-image.png new file mode 100644 index 0000000000000000000000000000000000000000..72d8d8a2f7ff5350be08602c4ba5790ab4826c25 GIT binary patch literal 21619 zcmV)rK$*XZP)YAX9X8WNB|8RBvx=!KdMT001BW zNkl;!c6Z;`_r5pt-_M)5uan)DWJQWOXA&ex zBAof5*7DgnDgad=px_3+kDmg8LWR9{SUW||Idoo~SLc=diaG%4ygIKAKsv9^s{@eE ztMlprr1R>$Iso}Md=OC-0q6tJ3!oc7#9ui8B>+VLMdw_pbGJGG`Mrao3&1dc1_AUF z7&!o4{IM?wpaP&Qpa3`pa01{6z^QYt(z&x8fPBrM7zA($z$if>OOXTy`)3sV8G@z+ z;2b~!Kpw!JbMB;b$G;+gL{T(CExGTUEB+gSVhF%x0Am0K2#PKWyQ4)Y86hw7&k}zJ zzCXv$_8MSyCs>;bk8uLv5WtRe?zki7Um!rDC>jRvEg$wVfC*~21?Sws?>v^60x(V& zO0E-(i*!nje+1wFz*$-s$;2uH07hty1`;e%gD~?To|g&G`LE@^|2qKWK7gwP$SQz)d}w_Xp7)I&7UP#|5;*7FPK(d655Ocf?XGj~ zG_Zo#7(?_KOHnqg68Jk=$~=Hw09($vLP}wl#*b)mP66bdbLAFX-*o`fbj85)TWa-v z>;R;>hcgb~A%GL-+%M*V-J({@1DLB9lkolbO<=q0oO{`VbL$0glYs5#@wWlIr7wSn zTDX@k(jH?eu}5cg7afl?0AL@$dLzMR9C4FzS-1UF5JMFCo!b|2Nf{5`C5smE+_wNM zcU-Q|3y=uF4-~S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l*pkqHyHzow?wa-BoE zT*ru8Q&oE2$2db{c#6TXHF!aj06Xqf2OwXqyQT6IM*)7v5);KFrv%9@cqS{)_~anr zm^TpDSZRugl7dTLdWl5m)d5HnNCxR{jZ*m67?@AMXSOx?-~_>nWpkVnf=G!$QNpXu z&KmB#Iso}nKw=Yi8almdhD49Uk007-U^M{W*|*%GYdZk>y?{hL<#MYQOu^y^;z4iW zV7Oky`H^wsejV_$Cmm7g0Oa=ulG}(WS*YPK>zhu^d$fX}hc21etWGIN=k>b>NEc#eOUpiWv1hargYf+v+8mqjh(+i1Zvha3 zWDs$VWHk7dS~kmwXI*u28lBg_A3z9_Vfe*5w#v4PvBp+M6gsbeTYwNGy@<2n#dfR< z?z}nx>AX6x4nR7u&a3n40HpKkygC5sygILozW#q}Wh_uiYvFDH0000{{ config('lorekeeper.settings.site_name', 'Lorekeeper') }} - @yield('title') + + + + + + + + + + + + + + + + + + From 7572de3c3903dc0fb5cd0d1cf37985f69cee4d66 Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 23 Jun 2020 22:37:03 -0400 Subject: [PATCH 08/43] Tweak on account of bug/in case of large character images --- resources/views/layouts/app.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index db54228634..abbf6614da 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -16,14 +16,14 @@ - + - + From 797518a72af3a7bbfdcb22432536692eb718a2ba Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 23 Jun 2020 23:17:00 -0400 Subject: [PATCH 09/43] Fix for bug re displaying character images when a user profile is linked, switch to character thumbs for character link previews --- resources/views/layouts/app.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index abbf6614da..3452cde7ef 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -16,14 +16,14 @@ - + - + From 1db6abc723fab8ddcd586c1812004fdc4c7564bf Mon Sep 17 00:00:00 2001 From: itinerare Date: Wed, 24 Jun 2020 20:11:05 -0400 Subject: [PATCH 10/43] Collapse character and user profile page titles into one line for the sake of meta tags --- resources/views/character/layout.blade.php | 5 +---- resources/views/user/layout.blade.php | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/resources/views/character/layout.blade.php b/resources/views/character/layout.blade.php index 805779e22d..ccd40bf80b 100644 --- a/resources/views/character/layout.blade.php +++ b/resources/views/character/layout.blade.php @@ -1,9 +1,6 @@ @extends('layouts.app') -@section('title') - Character :: - @yield('profile-title') -@endsection +@section('title') Character :: @yield('profile-title') @endsection @section('sidebar') @include('character.'.($isMyo ? 'myo.' : '').'_sidebar') diff --git a/resources/views/user/layout.blade.php b/resources/views/user/layout.blade.php index 9d5ff6b527..1c92537c95 100644 --- a/resources/views/user/layout.blade.php +++ b/resources/views/user/layout.blade.php @@ -1,9 +1,6 @@ @extends('layouts.app') -@section('title') - User :: - @yield('profile-title') -@endsection +@section('title') User :: @yield('profile-title') @endsection @section('sidebar') @include('user._sidebar') From dbe462ed3f195577148cf5c430e836e3117a3280 Mon Sep 17 00:00:00 2001 From: itinerare Date: Wed, 24 Jun 2020 20:20:47 -0400 Subject: [PATCH 11/43] Remove extra spaces in user and character page titles. --- resources/views/character/layout.blade.php | 2 +- resources/views/user/layout.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/character/layout.blade.php b/resources/views/character/layout.blade.php index ccd40bf80b..31f52a6371 100644 --- a/resources/views/character/layout.blade.php +++ b/resources/views/character/layout.blade.php @@ -1,6 +1,6 @@ @extends('layouts.app') -@section('title') Character :: @yield('profile-title') @endsection +@section('title')Character ::@yield('profile-title')@endsection @section('sidebar') @include('character.'.($isMyo ? 'myo.' : '').'_sidebar') diff --git a/resources/views/user/layout.blade.php b/resources/views/user/layout.blade.php index 1c92537c95..a9c33336f4 100644 --- a/resources/views/user/layout.blade.php +++ b/resources/views/user/layout.blade.php @@ -1,6 +1,6 @@ @extends('layouts.app') -@section('title') User :: @yield('profile-title') @endsection +@section('title')User ::@yield('profile-title')@endsection @section('sidebar') @include('user._sidebar') From 0403283cc5a94edc753a727ef9e3379efb57c364 Mon Sep 17 00:00:00 2001 From: itinerare Date: Wed, 24 Jun 2020 20:32:13 -0400 Subject: [PATCH 12/43] Remove extra space present in all page titles --- resources/views/character/layout.blade.php | 2 +- resources/views/layouts/app.blade.php | 2 +- resources/views/user/layout.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/character/layout.blade.php b/resources/views/character/layout.blade.php index 31f52a6371..13d8b8f4e3 100644 --- a/resources/views/character/layout.blade.php +++ b/resources/views/character/layout.blade.php @@ -1,6 +1,6 @@ @extends('layouts.app') -@section('title')Character ::@yield('profile-title')@endsection +@section('title') Character ::@yield('profile-title')@endsection @section('sidebar') @include('character.'.($isMyo ? 'myo.' : '').'_sidebar') diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 3452cde7ef..77bc0a26ac 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -10,7 +10,7 @@ {{ config('lorekeeper.settings.site_name', 'Lorekeeper') }} - @yield('title') - + diff --git a/resources/views/user/layout.blade.php b/resources/views/user/layout.blade.php index a9c33336f4..97bdc0644e 100644 --- a/resources/views/user/layout.blade.php +++ b/resources/views/user/layout.blade.php @@ -1,6 +1,6 @@ @extends('layouts.app') -@section('title')User ::@yield('profile-title')@endsection +@section('title') User ::@yield('profile-title')@endsection @section('sidebar') @include('user._sidebar') From f0648d8695a9975535f40112b60cf6ddd8035f8e Mon Sep 17 00:00:00 2001 From: itinerare Date: Wed, 24 Jun 2020 20:47:37 -0400 Subject: [PATCH 13/43] Add meta tag image to site images admin panel. --- config/lorekeeper/image_files.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/lorekeeper/image_files.php b/config/lorekeeper/image_files.php index 7c3982e0e8..da52e42a14 100644 --- a/config/lorekeeper/image_files.php +++ b/config/lorekeeper/image_files.php @@ -46,5 +46,10 @@ 'name' => 'MYO Default Image (Thumbnail)', 'description' => 'The default masterlist thumbnail used for MYO slots when no image is uploaded. PNG format, size of masterlist thumbnails.', 'filename' => 'myo-th.png' + ], + 'meta-image' => [ + 'name' => 'Meta Tag Image', + 'description' => 'The image displayed in meta tag previews on social media, discord, and the like. PNG format, no size restriction.', + 'filename' => 'meta-image.png' ] ]; From d94101e2814c45028bb9af27fcb410800953e326 Mon Sep 17 00:00:00 2001 From: itinerare Date: Wed, 24 Jun 2020 23:43:06 -0400 Subject: [PATCH 14/43] Remove extra space from page title, meta tag title --- resources/views/layouts/app.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 77bc0a26ac..0140413cef 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -7,7 +7,7 @@ - {{ config('lorekeeper.settings.site_name', 'Lorekeeper') }} - @yield('title') + {{ config('lorekeeper.settings.site_name', 'Lorekeeper') }} -@yield('title') @@ -17,14 +17,14 @@ - + - + From f09f78552d8f339bc0f8b90b6b1655d48e0c2993 Mon Sep 17 00:00:00 2001 From: itinerare Date: Sat, 27 Jun 2020 11:54:33 -0400 Subject: [PATCH 15/43] Change to cleaner and more extensible way of populating meta tag info per page if desired --- resources/views/character/bank.blade.php | 2 ++ resources/views/character/character.blade.php | 2 ++ resources/views/character/character_logs.blade.php | 2 ++ resources/views/character/currency_logs.blade.php | 2 ++ resources/views/character/edit_profile.blade.php | 2 ++ resources/views/character/images.blade.php | 2 ++ resources/views/character/ownership_logs.blade.php | 2 ++ resources/views/character/profile.blade.php | 2 ++ resources/views/character/submission_logs.blade.php | 2 ++ resources/views/character/transfer.blade.php | 2 ++ resources/views/character/update_form.blade.php | 2 ++ resources/views/layouts/app.blade.php | 10 +++++----- 12 files changed, 27 insertions(+), 5 deletions(-) diff --git a/resources/views/character/bank.blade.php b/resources/views/character/bank.blade.php index fbd1400152..c0110f5c08 100644 --- a/resources/views/character/bank.blade.php +++ b/resources/views/character/bank.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }}'s Bank @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, "Bank" => $character->url.'/bank']) !!} diff --git a/resources/views/character/character.blade.php b/resources/views/character/character.blade.php index a4f73edb7d..2fd9aeae07 100644 --- a/resources/views/character/character.blade.php +++ b/resources/views/character/character.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }} @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url]) !!} diff --git a/resources/views/character/character_logs.blade.php b/resources/views/character/character_logs.blade.php index b058b9c48b..6b616df5f4 100644 --- a/resources/views/character/character_logs.blade.php +++ b/resources/views/character/character_logs.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }}'s Change Log @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, 'Change Log' => $character->url.'/change-log']) !!} diff --git a/resources/views/character/currency_logs.blade.php b/resources/views/character/currency_logs.blade.php index 2829d1a069..1d4c4bbb93 100644 --- a/resources/views/character/currency_logs.blade.php +++ b/resources/views/character/currency_logs.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }}'s Currency Logs @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, "Bank" => $character->url.'/bank', 'Logs' => $character->url.'/currency-logs']) !!} diff --git a/resources/views/character/edit_profile.blade.php b/resources/views/character/edit_profile.blade.php index e53181f6c9..25be48180e 100644 --- a/resources/views/character/edit_profile.blade.php +++ b/resources/views/character/edit_profile.blade.php @@ -2,6 +2,8 @@ @section('profile-title') Editing {{ $character->fullName }}'s Profile @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, 'Editing Profile' => $character->url . '/profile/edit']) !!} diff --git a/resources/views/character/images.blade.php b/resources/views/character/images.blade.php index 26f1bd0b02..7db905479d 100644 --- a/resources/views/character/images.blade.php +++ b/resources/views/character/images.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }}'s Images @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, 'Images' => $character->url . '/images']) !!} diff --git a/resources/views/character/ownership_logs.blade.php b/resources/views/character/ownership_logs.blade.php index df0ad7a885..537f8bc1a9 100644 --- a/resources/views/character/ownership_logs.blade.php +++ b/resources/views/character/ownership_logs.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }}'s Ownership History @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, 'Ownership History' => $character->url.'/ownership']) !!} diff --git a/resources/views/character/profile.blade.php b/resources/views/character/profile.blade.php index 49513ca886..ac90f6e7cf 100644 --- a/resources/views/character/profile.blade.php +++ b/resources/views/character/profile.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }}'s Profile @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, 'Profile' => $character->url . '/profile']) !!} diff --git a/resources/views/character/submission_logs.blade.php b/resources/views/character/submission_logs.blade.php index 652324c23e..72ed903101 100644 --- a/resources/views/character/submission_logs.blade.php +++ b/resources/views/character/submission_logs.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->fullName }}'s Submissions @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, 'Submissions' => $character->url.'/submissions']) !!} diff --git a/resources/views/character/transfer.blade.php b/resources/views/character/transfer.blade.php index a35c3f3863..15795102c0 100644 --- a/resources/views/character/transfer.blade.php +++ b/resources/views/character/transfer.blade.php @@ -2,6 +2,8 @@ @section('profile-title') Transferring {{ $character->fullName }} @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, 'Transfer' => $character->url . '/transfer']) !!} diff --git a/resources/views/character/update_form.blade.php b/resources/views/character/update_form.blade.php index efe0464772..8b3db257f8 100644 --- a/resources/views/character/update_form.blade.php +++ b/resources/views/character/update_form.blade.php @@ -2,6 +2,8 @@ @section('profile-title') {{ $character->is_myo_slot ? 'MYO Approval' : 'Design Update' }} for {{ $character->fullName }} @endsection +@section('meta-img') {{ $character->image->thumbnailUrl }} @endsection + @section('profile-content') {!! breadcrumbs([($character->is_myo_slot ? 'MYO Slot Masterlist' : 'Character Masterlist') => ($character->is_myo_slot ? 'myos' : 'masterlist'), $character->fullName => $character->url, ($character->is_myo_slot ? 'MYO Approval' : 'Design Update') => $character->url.'/approval']) !!} diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 0140413cef..ffb833df01 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -11,21 +11,21 @@ - + - + - + - + - + From 81d1f6a006352005172387cf80bbc9adfc45071f Mon Sep 17 00:00:00 2001 From: itinerare Date: Fri, 31 Jul 2020 14:46:26 -0400 Subject: [PATCH 16/43] Fix for bug with subtypes pre-assigned to MYOs being absent after approval --- app/Services/CharacterManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index 1d25f8c563..5e55ec7036 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -1805,7 +1805,7 @@ public function approveRequest($data, $request, $user) 'y0' => $request->y0, 'y1' => $request->y1, 'species_id' => $request->species_id, - 'subtype_id' => $request->subtype_id, + 'subtype_id' => ($request->character->is_myo_slot && isset($request->character->image->subtype_id)) ? $request->character->image->subtype_id : $request->subtype_id, 'rarity_id' => $request->rarity_id, 'sort' => 0, ]); From e64d4ed83f5ec07427e0817e0cc7bd99f054569e Mon Sep 17 00:00:00 2001 From: itinerare Date: Fri, 31 Jul 2020 15:57:00 -0400 Subject: [PATCH 17/43] Fix for bug with approved MYO submissions being listed as approved design updates. Not retroactive. --- .../Character/CharacterDesignUpdate.php | 6 ++-- app/Services/CharacterManager.php | 12 ++++++- ...7_31_185640_add_type_to_design_updates.php | 34 +++++++++++++++++++ ..._31_193235_set_design_update_type_null.php | 30 ++++++++++++++++ 4 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 database/migrations/2020_07_31_185640_add_type_to_design_updates.php create mode 100644 database/migrations/2020_07_31_193235_set_design_update_type_null.php diff --git a/app/Models/Character/CharacterDesignUpdate.php b/app/Models/Character/CharacterDesignUpdate.php index 47ddf2f939..86401d25b6 100644 --- a/app/Models/Character/CharacterDesignUpdate.php +++ b/app/Models/Character/CharacterDesignUpdate.php @@ -24,7 +24,7 @@ class CharacterDesignupdate extends Model 'use_cropper', 'x0', 'x1', 'y0', 'y1', 'hash', 'species_id', 'subtype_id', 'rarity_id', 'has_comments', 'has_image', 'has_addons', 'has_features', - 'submitted_at' + 'submitted_at', 'update_type' ]; /** @@ -173,7 +173,7 @@ public function scopeActive($query) */ public function scopeMyos($query) { - $query->select('design_updates.*')->join('characters', 'design_updates.character_id', 'characters.id')->where('characters.is_myo_slot', 1); + $query->select('design_updates.*')->where('update_type', 'MYO'); } /** @@ -184,7 +184,7 @@ public function scopeMyos($query) */ public function scopeCharacters($query) { - $query->select('design_updates.*')->join('characters', 'design_updates.character_id', 'characters.id')->where('characters.is_myo_slot', 0); + $query->select('design_updates.*')->where('update_type', 'Character'); } /********************************************************************************************** diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index 5e55ec7036..b1246e781b 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -1427,6 +1427,7 @@ public function createDesignUpdateRequest($character, $user) 'character_id' => $character->id, 'status' => 'Draft', 'hash' => randomString(10), + 'update_type' => $character->is_myo_slot ? 'MYO' : 'Character', // Set some data based on the character's existing stats 'rarity_id' => $character->image->rarity_id, @@ -1434,7 +1435,6 @@ public function createDesignUpdateRequest($character, $user) 'subtype_id' => $character->image->subtype_id ]; - $request = CharacterDesignUpdate::create($data); // If the character is not a MYO slot, make a copy of the previous image's traits @@ -1728,6 +1728,10 @@ public function submitRequest($request) try { if($request->status != 'Draft') throw new \Exception("This request cannot be resubmitted to the queue."); + // Recheck and set update type, as insurance/in case of pre-existing drafts + if($request->character->is_myo_slot) + $request->update_type = 'MYO'; + else $request->update_type = 'Character'; // We've done validation and all section by section, // so it's safe to simply set the status to Pending here $request->status = 'Pending'; @@ -1862,6 +1866,12 @@ public function approveRequest($data, $request, $user) // Add a log for the character and user $this->createLog($user->id, null, $request->character->user_id, $request->character->user->alias, $request->character->id, $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated', '[#'.$image->id.']', 'character'); $this->createLog($user->id, null, $request->character->user_id, $request->character->user->alias, $request->character->id, $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated', '[#'.$image->id.']', 'user'); + + // Final recheck and setting of update type, as insurance + if($request->character->is_myo_slot) + $request->update_type = 'MYO'; + else $request->update_type = 'Character'; + $request->save(); // If this is for a MYO, set user's FTO status and the MYO status of the slot if($request->character->is_myo_slot) diff --git a/database/migrations/2020_07_31_185640_add_type_to_design_updates.php b/database/migrations/2020_07_31_185640_add_type_to_design_updates.php new file mode 100644 index 0000000000..912eae90a0 --- /dev/null +++ b/database/migrations/2020_07_31_185640_add_type_to_design_updates.php @@ -0,0 +1,34 @@ +enum('update_type', ['MYO', 'Character'])->nullable()->default('Character'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('design_updates', function (Blueprint $table) { + // + $table->dropColumn('update_type'); + }); + } +} diff --git a/database/migrations/2020_07_31_193235_set_design_update_type_null.php b/database/migrations/2020_07_31_193235_set_design_update_type_null.php new file mode 100644 index 0000000000..a4b63e9a14 --- /dev/null +++ b/database/migrations/2020_07_31_193235_set_design_update_type_null.php @@ -0,0 +1,30 @@ + Date: Fri, 31 Jul 2020 23:04:45 -0400 Subject: [PATCH 18/43] Add sorting options to user list. --- app/Http/Controllers/BrowseController.php | 33 +++++++++++++++++++++-- resources/views/browse/users.blade.php | 11 ++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index 12a96826a7..a06e8c6a3b 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -38,14 +38,43 @@ class BrowseController extends Controller public function getUsers(Request $request) { $query = User::visible()->join('ranks','users.rank_id', '=', 'ranks.id')->select('ranks.name AS rank_name', 'users.*'); - + $sort = $request->only(['sort']); + if($request->get('name')) $query->where(function($query) use ($request) { $query->where('users.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('users.alias', 'LIKE', '%' . $request->get('name') . '%'); }); if($request->get('rank_id')) $query->where('rank_id', $request->get('rank_id')); + if(isset($sort['sort'])) + { + switch($sort['sort']) { + case 'alpha': + $query->orderBy('name'); + break; + case 'alpha-reverse': + $query->orderBy('name', 'DESC'); + break; + case 'alias': + $query->orderBy('alias', 'ASC'); + break; + case 'alias-reverse': + $query->orderBy('alias', 'DESC'); + break; + case 'rank': + $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + break; + case 'newest': + $query->orderBy('created_at', 'DESC'); + break; + case 'oldest': + $query->orderBy('created_at', 'ASC'); + break; + } + } + else $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + return view('browse.users', [ - 'users' => $query->orderBy('ranks.sort', 'DESC')->orderBy('name')->paginate(30)->appends($request->query()), + 'users' => $query->paginate(30)->appends($request->query()), 'ranks' => [0 => 'Any Rank'] + Rank::orderBy('ranks.sort', 'DESC')->pluck('name', 'id')->toArray(), 'blacklistLink' => Settings::get('blacklist_link') ]); diff --git a/resources/views/browse/users.blade.php b/resources/views/browse/users.blade.php index 01b8f5d194..d27caa4efa 100644 --- a/resources/views/browse/users.blade.php +++ b/resources/views/browse/users.blade.php @@ -19,6 +19,17 @@
{!! Form::select('rank_id', $ranks, Request::get('rank_id'), ['class' => 'form-control']) !!}
+
+ {!! Form::select('sort', [ + 'alpha' => 'Sort Alphabetically (A-Z)', + 'alpha-reverse' => 'Sort Alphabetically (Z-A)', + 'alias' => 'Sort by Alias (A-Z)', + 'alias-reverse' => 'Sort by Alias (Z-A)', + 'rank' => 'Sort by Rank (Default)', + 'newest' => 'Newest First', + 'oldest' => 'Oldest First' + ], Request::get('sort') ? : 'category', ['class' => 'form-control']) !!} +
{!! Form::submit('Search', ['class' => 'btn btn-primary']) !!}
From ff18802a70256f5788cc569aa4c283eb4b041b37 Mon Sep 17 00:00:00 2001 From: itinerare Date: Fri, 31 Jul 2020 23:14:50 -0400 Subject: [PATCH 19/43] Add sorting to admin user list as well. --- .../Admin/Users/UserController.php | 31 ++++++++++++++++++- resources/views/admin/users/index.blade.php | 11 +++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/Users/UserController.php b/app/Http/Controllers/Admin/Users/UserController.php index 16e2fc74ec..290ece6508 100644 --- a/app/Http/Controllers/Admin/Users/UserController.php +++ b/app/Http/Controllers/Admin/Users/UserController.php @@ -26,14 +26,43 @@ class UserController extends Controller public function getIndex(Request $request) { $query = User::join('ranks','users.rank_id', '=', 'ranks.id')->select('ranks.name AS rank_name', 'users.*'); + $sort = $request->only(['sort']); if($request->get('name')) $query->where(function($query) use ($request) { $query->where('users.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('users.alias', 'LIKE', '%' . $request->get('name') . '%'); }); if($request->get('rank_id')) $query->where('rank_id', $request->get('rank_id')); + if(isset($sort['sort'])) + { + switch($sort['sort']) { + case 'alpha': + $query->orderBy('name'); + break; + case 'alpha-reverse': + $query->orderBy('name', 'DESC'); + break; + case 'alias': + $query->orderBy('alias', 'ASC'); + break; + case 'alias-reverse': + $query->orderBy('alias', 'DESC'); + break; + case 'rank': + $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + break; + case 'newest': + $query->orderBy('created_at', 'DESC'); + break; + case 'oldest': + $query->orderBy('created_at', 'ASC'); + break; + } + } + else $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + return view('admin.users.index', [ - 'users' => $query->orderBy('ranks.sort', 'DESC')->orderBy('name')->paginate(30)->appends($request->query()), + 'users' => $query->paginate(30)->appends($request->query()), 'ranks' => [0 => 'Any Rank'] + Rank::orderBy('ranks.sort', 'DESC')->pluck('name', 'id')->toArray(), 'count' => $query->count() ]); diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php index 92a8013d57..c11bedc86a 100644 --- a/resources/views/admin/users/index.blade.php +++ b/resources/views/admin/users/index.blade.php @@ -17,6 +17,17 @@
{!! Form::select('rank_id', $ranks, Request::get('rank_id'), ['class' => 'form-control']) !!}
+
+ {!! Form::select('sort', [ + 'alpha' => 'Sort Alphabetically (A-Z)', + 'alpha-reverse' => 'Sort Alphabetically (Z-A)', + 'alias' => 'Sort by Alias (A-Z)', + 'alias-reverse' => 'Sort by Alias (Z-A)', + 'rank' => 'Sort by Rank (Default)', + 'newest' => 'Newest First', + 'oldest' => 'Oldest First' + ], Request::get('sort') ? : 'category', ['class' => 'form-control']) !!} +
{!! Form::submit('Search', ['class' => 'btn btn-primary']) !!}
From c18c6f732d6bc18bcb45fecd5f14ed16985ffccd Mon Sep 17 00:00:00 2001 From: itinerare Date: Sat, 1 Aug 2020 12:08:15 -0400 Subject: [PATCH 20/43] Fix for bug with duplicate character features sometimes being consumed when editing an existing character's features. Thanks to https://github.com/Draginraptor for discovering the fix itself --- .../views/character/admin/_edit_features_modal.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/character/admin/_edit_features_modal.blade.php b/resources/views/character/admin/_edit_features_modal.blade.php index b6b14c4f22..b9a64616d5 100644 --- a/resources/views/character/admin/_edit_features_modal.blade.php +++ b/resources/views/character/admin/_edit_features_modal.blade.php @@ -19,8 +19,8 @@
@foreach($image->features as $feature)
- {!! Form::select('feature_id['.$feature->id.']', $features, $feature->feature_id, ['class' => 'form-control mr-2 feature-select original', 'placeholder' => 'Select Trait']) !!} - {!! Form::text('feature_data['.$feature->id.']', $feature->data, ['class' => 'form-control mr-2', 'placeholder' => 'Extra Info (Optional)']) !!} + {!! Form::select('feature_id[]', $features, $feature->feature_id, ['class' => 'form-control mr-2 feature-select original', 'placeholder' => 'Select Trait']) !!} + {!! Form::text('feature_data[]', $feature->data, ['class' => 'form-control mr-2', 'placeholder' => 'Extra Info (Optional)']) !!} ×
@endforeach From 3c8a859117b41cc4859b4f44a6ad68392bc32f58 Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 18 Aug 2020 12:48:33 -0400 Subject: [PATCH 21/43] Add subtype display to design update request traits panel --- resources/views/character/design/features.blade.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/views/character/design/features.blade.php b/resources/views/character/design/features.blade.php index 55919b3d45..e806e12990 100644 --- a/resources/views/character/design/features.blade.php +++ b/resources/views/character/design/features.blade.php @@ -83,6 +83,18 @@
Species
{!! $request->species ? $request->species->displayName : 'None Selected' !!}
+ @if($request->subtype_id) +
+
Subtype
+
+ @if($request->character->is_myo_slot && $request->character->image->subtype_id) + {!! $request->character->image->subtype->displayName !!} + @else + {!! $request->subtype_id ? $request->subtype->displayName : 'None Selected' !!} + @endif +
+
+ @endif
Rarity
{!! $request->rarity ? $request->rarity->displayName : 'None Selected' !!}
From 2ab59cd15d17f136c984a314ccb060abcd84bddd Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 18 Aug 2020 13:45:22 -0400 Subject: [PATCH 22/43] Fix for bug with design update approval attempting to move image to nonexistent folder --- app/Services/CharacterManager.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index b1246e781b..641b32a610 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -1830,6 +1830,17 @@ public function approveRequest($data, $request, $user) // Shift the image features over to the new image $request->rawFeatures()->update(['character_image_id' => $image->id, 'character_type' => 'Character']); + // Make the image directory if it doesn't exist + if(!file_exists($image->imagePath)) + { + // Create the directory. + if (!mkdir($image->imagePath, 0755, true)) { + $this->setError('error', 'Failed to create image directory.'); + return false; + } + chmod($image->imagePath, 0755); + } + // Move the image file to the new image File::move($request->imagePath . '/' . $request->imageFileName, $image->imagePath . '/' . $image->imageFileName); File::move($request->thumbnailPath . '/' . $request->thumbnailFileName, $image->thumbnailPath . '/' . $image->thumbnailFileName); From 20037c83a0c518ea0fda655c3955c650d5478382 Mon Sep 17 00:00:00 2001 From: itinerare Date: Thu, 20 Aug 2020 17:36:55 -0400 Subject: [PATCH 23/43] Set shop image max width for the sake of smaller screens. --- resources/views/shops/shop.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/shops/shop.blade.php b/resources/views/shops/shop.blade.php index 3ccebde446..e36cc1910f 100644 --- a/resources/views/shops/shop.blade.php +++ b/resources/views/shops/shop.blade.php @@ -10,7 +10,7 @@
- +

{!! $shop->parsed_description !!}

From 03df16a4b56691ec0d6821ef5ad5397a6991e659 Mon Sep 17 00:00:00 2001 From: itinerare Date: Wed, 26 Aug 2020 22:14:53 -0400 Subject: [PATCH 24/43] Fix bug with character design update rejection notification going to processing staff rather than user. --- app/Services/CharacterManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index 641b32a610..4ffe21b448 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -1965,7 +1965,7 @@ public function rejectRequest($data, $request, $user, $forceReject = false) $request->save(); // Notify the user - Notifications::create('DESIGN_REJECTED', $user, [ + Notifications::create('DESIGN_REJECTED', $request->user, [ 'design_url' => $request->url, 'character_url' => $request->character->url, 'name' => $request->character->fullName From a5371311961d9e85a0630495cda211bd4e9e0e77 Mon Sep 17 00:00:00 2001 From: itinerare Date: Thu, 27 Aug 2020 18:18:05 -0400 Subject: [PATCH 25/43] Fix bug with individual raffles having duplicate winners --- app/Services/RaffleManager.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Services/RaffleManager.php b/app/Services/RaffleManager.php index f8234182ce..58d28255e4 100644 --- a/app/Services/RaffleManager.php +++ b/app/Services/RaffleManager.php @@ -166,7 +166,7 @@ private function rollWinners($raffle) $winner->update(['position' => $i + 1]); // save the winning ticket's user id - if($winner->user_id) $winners['ids'][] = $winner->user_id; + if(isset($winner->user_id)) $winners['ids'][] = $winner->user_id; else $winners['aliases'][] = $winner->alias; // remove ticket from the ticket pool after pulled @@ -178,13 +178,14 @@ private function rollWinners($raffle) // remove tickets for the same user...I'm unsure how this is going to hold up with 3000 tickets, foreach($ticketPool as $key=>$ticket) { - if($ticket->user_id == $winner->user_id) + if(($ticket->user_id != null && $ticket->user_id == $winner->user_id) || ($ticket->user_id == null && $ticket->alias == $winner->alias)) { $ticketPool->forget($key); - $ticketPool = $ticketPool->values(); - $ticketCount--; } + } + $ticketPool = $ticketPool->values(); + $ticketCount = $ticketPool->count(); } return $winners; } From 528ef848489e6693d14e5f645eb7dad9dc77e0db Mon Sep 17 00:00:00 2001 From: itinerare Date: Sat, 29 Aug 2020 11:40:43 -0400 Subject: [PATCH 26/43] - Adjust character update logs to use request update type column - Remove MYO slot creations and design update approvals from approving staff's ownership log --- app/Models/User/User.php | 2 +- app/Services/CharacterManager.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Models/User/User.php b/app/Models/User/User.php index 3db9aca747..dbc3ea709d 100644 --- a/app/Models/User/User.php +++ b/app/Models/User/User.php @@ -395,7 +395,7 @@ public function getOwnershipLogs() { $user = $this; $query = UserCharacterLog::with('sender.rank')->with('recipient.rank')->with('character')->where(function($query) use ($user) { - $query->where('sender_id', $user->id)->where('log_type', '!=', 'Character Created'); + $query->where('sender_id', $user->id)->whereNotIn('log_type', ['Character Created', 'MYO Slot Created', 'Character Design Updated', 'MYO Design Approved']); })->orWhere(function($query) use ($user) { $query->where('recipient_id', $user->id); })->orderBy('id', 'DESC'); diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index 641b32a610..3b1dcb2a32 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -1874,15 +1874,15 @@ public function approveRequest($data, $request, $user) $request->character->character_image_id = $image->id; } - // Add a log for the character and user - $this->createLog($user->id, null, $request->character->user_id, $request->character->user->alias, $request->character->id, $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated', '[#'.$image->id.']', 'character'); - $this->createLog($user->id, null, $request->character->user_id, $request->character->user->alias, $request->character->id, $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated', '[#'.$image->id.']', 'user'); - // Final recheck and setting of update type, as insurance if($request->character->is_myo_slot) $request->update_type = 'MYO'; else $request->update_type = 'Character'; $request->save(); + + // Add a log for the character and user + $this->createLog($user->id, null, $request->character->user_id, $request->character->user->alias, $request->character->id, $request->update_type == 'MYO' ? 'MYO Design Approved' : 'Character Design Updated', '[#'.$image->id.']', 'character'); + $this->createLog($user->id, null, $request->character->user_id, $request->character->user->alias, $request->character->id, $request->update_type == 'MYO' ? 'MYO Design Approved' : 'Character Design Updated', '[#'.$image->id.']', 'user'); // If this is for a MYO, set user's FTO status and the MYO status of the slot if($request->character->is_myo_slot) From b09f0b49e6f3564db517ac3ab7facd5d437470ba Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 11:05:21 -0400 Subject: [PATCH 27/43] Fix bug with hidden images on characters being completely invisible even to permitted staff --- app/Models/Character/Character.php | 2 +- app/Models/Character/CharacterImage.php | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/app/Models/Character/Character.php b/app/Models/Character/Character.php index 2b77a11678..6de259a977 100644 --- a/app/Models/Character/Character.php +++ b/app/Models/Character/Character.php @@ -149,7 +149,7 @@ public function image() */ public function images() { - return $this->hasMany('App\Models\Character\CharacterImage', 'character_id')->guest(); + return $this->hasMany('App\Models\Character\CharacterImage', 'character_id')->images(); } /** diff --git a/app/Models/Character/CharacterImage.php b/app/Models/Character/CharacterImage.php index ad5a8ac18f..57362ba972 100644 --- a/app/Models/Character/CharacterImage.php +++ b/app/Models/Character/CharacterImage.php @@ -4,6 +4,7 @@ use Config; use DB; +use Auth; use App\Models\Model; use App\Models\Feature\FeatureCategory; use App\Models\Character\CharacterCategory; @@ -159,20 +160,10 @@ public function artists() * @param \Illuminate\Database\Eloquent\Builder $query * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeGuest($query) + public function scopeImages($query) { - return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); - } - - /** - * Scope a query to include images visible to staff with the required viewing powers. - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder - */ - public function scopeMod($query) - { - return $query->orderBy('sort')->orderBy('id', 'DESC'); + if(Auth::check() ? Auth::user()->hasPower('manage_masterlist') : FALSE) return $query->orderBy('sort')->orderBy('id', 'DESC'); + else return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); } /********************************************************************************************** From c40ccd87973a93641b77b2e96db5091ceb43d5bb Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 11:09:31 -0400 Subject: [PATCH 28/43] ; --- app/Models/Character/CharacterImage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Character/CharacterImage.php b/app/Models/Character/CharacterImage.php index 57362ba972..39ec0de11a 100644 --- a/app/Models/Character/CharacterImage.php +++ b/app/Models/Character/CharacterImage.php @@ -162,7 +162,7 @@ public function artists() */ public function scopeImages($query) { - if(Auth::check() ? Auth::user()->hasPower('manage_masterlist') : FALSE) return $query->orderBy('sort')->orderBy('id', 'DESC'); + if(Auth::check() ? Auth::user()->hasPower('manage_characters') : FALSE) return $query->orderBy('sort')->orderBy('id', 'DESC'); else return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); } From b164e9f8313e8af75385d332cde63bfe03da046e Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 11:50:17 -0400 Subject: [PATCH 29/43] Tidier fix, adjust browse controller to suit --- app/Http/Controllers/BrowseController.php | 6 +----- app/Models/Character/CharacterImage.php | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index a06e8c6a3b..3a77cd0fbb 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -122,11 +122,7 @@ public function getCharacters(Request $request) { $query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(0); - $imageQuery = CharacterImage::with('features')->with('rarity')->with('species')->with('features'); - if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) { - $query->visible(); - $imageQuery->guest(); - } + $imageQuery = CharacterImage::images()->with('features')->with('rarity')->with('species')->with('features'); if($request->get('name')) $query->where(function($query) use ($request) { $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%'); diff --git a/app/Models/Character/CharacterImage.php b/app/Models/Character/CharacterImage.php index 39ec0de11a..a3980acb22 100644 --- a/app/Models/Character/CharacterImage.php +++ b/app/Models/Character/CharacterImage.php @@ -162,8 +162,8 @@ public function artists() */ public function scopeImages($query) { - if(Auth::check() ? Auth::user()->hasPower('manage_characters') : FALSE) return $query->orderBy('sort')->orderBy('id', 'DESC'); - else return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); + if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); + else return $query->orderBy('sort')->orderBy('id', 'DESC'); } /********************************************************************************************** From d97ca9729d8c0d8799137ab83e986aad7a3d99ee Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 13:54:43 -0400 Subject: [PATCH 30/43] - Sort news posts by last updated in both user and admin lists - Add ability to bump existing news posts via a toggle in the edit form - Change news post header to include time of last edit and move staff attribution there --- app/Http/Controllers/Admin/NewsController.php | 4 ++-- app/Http/Controllers/NewsController.php | 2 +- app/Services/NewsService.php | 1 + .../admin/news/create_edit_news.blade.php | 18 +++++++++++++++--- resources/views/news/_news.blade.php | 2 +- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Admin/NewsController.php b/app/Http/Controllers/Admin/NewsController.php index 68def02bca..05d2686f7d 100644 --- a/app/Http/Controllers/Admin/NewsController.php +++ b/app/Http/Controllers/Admin/NewsController.php @@ -21,7 +21,7 @@ class NewsController extends Controller public function getIndex() { return view('admin.news.news', [ - 'newses' => News::orderBy('post_at', 'DESC')->paginate(20) + 'newses' => News::orderBy('updated_at', 'DESC')->paginate(20) ]); } @@ -64,7 +64,7 @@ public function postCreateEditNews(Request $request, NewsService $service, $id = { $id ? $request->validate(News::$updateRules) : $request->validate(News::$createRules); $data = $request->only([ - 'title', 'text', 'post_at', 'is_visible' + 'title', 'text', 'post_at', 'is_visible', 'bump' ]); if($id && $service->updateNews(News::find($id), $data, Auth::user())) { flash('News updated successfully.')->success(); diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php index 0d647c863d..e5e2945d05 100644 --- a/app/Http/Controllers/NewsController.php +++ b/app/Http/Controllers/NewsController.php @@ -28,7 +28,7 @@ class NewsController extends Controller public function getIndex() { if(Auth::check() && Auth::user()->is_news_unread) Auth::user()->update(['is_news_unread' => 0]); - return view('news.index', ['newses' => News::visible()->orderBy('id', 'DESC')->paginate(10)]); + return view('news.index', ['newses' => News::visible()->orderBy('updated_at', 'DESC')->paginate(10)]); } /** diff --git a/app/Services/NewsService.php b/app/Services/NewsService.php index 0433d37e1a..ad6148f3c1 100644 --- a/app/Services/NewsService.php +++ b/app/Services/NewsService.php @@ -62,6 +62,7 @@ public function updateNews($news, $data, $user) $data['parsed_text'] = parse($data['text']); $data['user_id'] = $user->id; if(!isset($data['is_visible'])) $data['is_visible'] = 0; + if(isset($data['bump']) && $data['bump'] == 1) $this->alertUsers(); $news->update($data); diff --git a/resources/views/admin/news/create_edit_news.blade.php b/resources/views/admin/news/create_edit_news.blade.php index 9faa239697..c4f98c72aa 100644 --- a/resources/views/admin/news/create_edit_news.blade.php +++ b/resources/views/admin/news/create_edit_news.blade.php @@ -36,9 +36,21 @@ {!! Form::textarea('text', $news->text, ['class' => 'form-control wysiwyg']) !!}
-
- {!! Form::checkbox('is_visible', 1, $news->id ? $news->is_visible : 1, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} - {!! Form::label('is_visible', 'Is Viewable', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If this is turned off, the post will not be visible. If the post time is set, it will automatically become visible at/after the given post time, so make sure the post time is empty if you want it to be completely hidden.') !!} +
+
+
+ {!! Form::checkbox('is_visible', 1, $news->id ? $news->is_visible : 1, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} + {!! Form::label('is_visible', 'Is Viewable', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If this is turned off, the post will not be visible. If the post time is set, it will automatically become visible at/after the given post time, so make sure the post time is empty if you want it to be completely hidden.') !!} +
+
+ @if($news->id) +
+
+ {!! Form::checkbox('bump', 1, null, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} + {!! Form::label('bump', 'Bump News', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If toggled on, this will alert users that there is new news. Best in conjunction with a clear notification of changes!') !!} +
+
+ @endif
diff --git a/resources/views/news/_news.blade.php b/resources/views/news/_news.blade.php index 0aa4c6bacb..bd2a4ea1ba 100644 --- a/resources/views/news/_news.blade.php +++ b/resources/views/news/_news.blade.php @@ -2,7 +2,7 @@

{!! $news->displayName !!}

- Posted {!! $news->post_at ? format_date($news->post_at) : format_date($news->created_at) !!} by {!! $news->user->displayName !!} + Posted {!! $news->post_at ? format_date($news->post_at) : format_date($news->created_at) !!} :: Last edited {!! format_date($news->updated_at) !!} by {!! $news->user->displayName !!}
From b404a4a7f89682739635c8b91f8d0e266ba8775c Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 11:50:17 -0400 Subject: [PATCH 31/43] Tidier fix, adjust browse controller to suit --- app/Http/Controllers/BrowseController.php | 6 +----- app/Models/Character/CharacterImage.php | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index a06e8c6a3b..3a77cd0fbb 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -122,11 +122,7 @@ public function getCharacters(Request $request) { $query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(0); - $imageQuery = CharacterImage::with('features')->with('rarity')->with('species')->with('features'); - if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) { - $query->visible(); - $imageQuery->guest(); - } + $imageQuery = CharacterImage::images()->with('features')->with('rarity')->with('species')->with('features'); if($request->get('name')) $query->where(function($query) use ($request) { $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%'); diff --git a/app/Models/Character/CharacterImage.php b/app/Models/Character/CharacterImage.php index 39ec0de11a..a3980acb22 100644 --- a/app/Models/Character/CharacterImage.php +++ b/app/Models/Character/CharacterImage.php @@ -162,8 +162,8 @@ public function artists() */ public function scopeImages($query) { - if(Auth::check() ? Auth::user()->hasPower('manage_characters') : FALSE) return $query->orderBy('sort')->orderBy('id', 'DESC'); - else return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); + if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); + else return $query->orderBy('sort')->orderBy('id', 'DESC'); } /********************************************************************************************** From 758ab210901cb30064444ea554c54996298e39a9 Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 14:13:57 -0400 Subject: [PATCH 32/43] Tweak bump option to only be available for visible news --- app/Services/NewsService.php | 2 +- resources/views/admin/news/create_edit_news.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/NewsService.php b/app/Services/NewsService.php index ad6148f3c1..46482b3c04 100644 --- a/app/Services/NewsService.php +++ b/app/Services/NewsService.php @@ -62,7 +62,7 @@ public function updateNews($news, $data, $user) $data['parsed_text'] = parse($data['text']); $data['user_id'] = $user->id; if(!isset($data['is_visible'])) $data['is_visible'] = 0; - if(isset($data['bump']) && $data['bump'] == 1) $this->alertUsers(); + if(isset($data['bump']) && $data['is_visible'] == 1 && $data['bump'] == 1) $this->alertUsers(); $news->update($data); diff --git a/resources/views/admin/news/create_edit_news.blade.php b/resources/views/admin/news/create_edit_news.blade.php index c4f98c72aa..f5b4c51ba3 100644 --- a/resources/views/admin/news/create_edit_news.blade.php +++ b/resources/views/admin/news/create_edit_news.blade.php @@ -43,7 +43,7 @@ {!! Form::label('is_visible', 'Is Viewable', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If this is turned off, the post will not be visible. If the post time is set, it will automatically become visible at/after the given post time, so make sure the post time is empty if you want it to be completely hidden.') !!}
- @if($news->id) + @if($news->id && $news->is_visible)
{!! Form::checkbox('bump', 1, null, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} From 4b0959798966f1a170000d62b50817d4163f2960 Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 14:41:25 -0400 Subject: [PATCH 33/43] Set raffle group visibility setting to cascade to any raffles in the group on editing the group --- app/Services/RaffleService.php | 1 + resources/views/admin/raffle/_group_create_edit.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/RaffleService.php b/app/Services/RaffleService.php index 258a9474fd..8b5125b9a3 100644 --- a/app/Services/RaffleService.php +++ b/app/Services/RaffleService.php @@ -91,6 +91,7 @@ public function updateRaffleGroup($data, $group) DB::beginTransaction(); if(!isset($data['is_active'])) $data['is_active'] = 0; $group->update(array_only($data, ['name', 'is_active'])); + foreach($group->raffles as $raffle) $raffle->update(['is_active' => $data['is_active']]); DB::commit(); return $group; } diff --git a/resources/views/admin/raffle/_group_create_edit.blade.php b/resources/views/admin/raffle/_group_create_edit.blade.php index 75b82ed303..b9f79aa1d2 100644 --- a/resources/views/admin/raffle/_group_create_edit.blade.php +++ b/resources/views/admin/raffle/_group_create_edit.blade.php @@ -11,7 +11,7 @@
From d746dd96673ad2346650ffd2d5a38788661dccd8 Mon Sep 17 00:00:00 2001 From: itinerare Date: Sun, 30 Aug 2020 20:47:18 -0400 Subject: [PATCH 34/43] Apply imageQuery fix to MYO masterlist --- app/Http/Controllers/BrowseController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index 3a77cd0fbb..4c3b37d614 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -226,11 +226,7 @@ public function getMyos(Request $request) { $query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(1); - $imageQuery = CharacterImage::with('features')->with('rarity')->with('species')->with('features'); - if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) { - $query->visible(); - $imageQuery->guest(); - } + $imageQuery = CharacterImage::images()->with('features')->with('rarity')->with('species')->with('features'); if($request->get('name')) $query->where(function($query) use ($request) { $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%'); From 84b06467eafb118be06f8a01dfaa897afbcdac04 Mon Sep 17 00:00:00 2001 From: itinerare Date: Mon, 31 Aug 2020 19:25:51 -0400 Subject: [PATCH 35/43] Fix bug reuploading character image with non-cropped thumbnail --- app/Services/CharacterManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index c5844d0cdf..1ac9f420b4 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -618,7 +618,7 @@ public function reuploadImage($data, $image, $user) // Save thumbnail if(isset($data['use_cropper'])) $this->cropThumbnail(array_only($data, ['x0','x1','y0','y1']), $image); - else $this->handleImage($data['thumbnail'], $image->thumbnailDirectory, $image->thumbnailFileName); + else $this->handleImage($data['thumbnail'], $image->thumbnailPath, $image->thumbnailFileName); // Add a log for the character // This logs all the updates made to the character From d109b8b782af488f7e6706365c2fff436aa37a09 Mon Sep 17 00:00:00 2001 From: itinerare Date: Sat, 5 Sep 2020 21:45:30 -0400 Subject: [PATCH 36/43] Add an "ask first" option to the gift art option on character profiles. --- app/Http/Controllers/BrowseController.php | 12 +++++++++++- app/Services/CharacterManager.php | 2 +- resources/views/browse/_masterlist_content.blade.php | 11 ++++++----- resources/views/character/edit_profile.blade.php | 4 ++-- resources/views/character/profile.blade.php | 4 ++-- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index 3a77cd0fbb..67e2bd03f9 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -134,7 +134,17 @@ public function getCharacters(Request $request) if($request->get('sale_value_max')) $query->where('sale_value', '<=', $request->get('sale_value_max')); if($request->get('is_trading')) $query->where('is_trading', 1); - if($request->get('is_gift_art_allowed')) $query->where('is_gift_art_allowed', 1); + if($request->get('is_gift_art_allowed')) switch($request->get('is_gift_art_allowed')) { + case 1: + $query->where('is_gift_art_allowed', 1); + break; + case 2: + $query->where('is_gift_art_allowed', 2); + break; + case 3: + $query->where('is_gift_art_allowed', 1)->orWhere('is_gift_art_allowed', 2); + break; + } if($request->get('is_sellable')) $query->where('is_sellable', 1); if($request->get('is_tradeable')) $query->where('is_tradeable', 1); if($request->get('is_giftable')) $query->where('is_giftable', 1); diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index c5844d0cdf..eed281ea16 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -981,7 +981,7 @@ public function updateCharacterProfile($data, $character, $user, $isAdmin = fals if($character->is_trading != isset($data['is_trading'])) $notifyTrading = true; if($character->is_gift_art_allowed != isset($data['is_gift_art_allowed'])) $notifyGiftArt = true; - $character->is_gift_art_allowed = isset($data['is_gift_art_allowed']); + $character->is_gift_art_allowed = isset($data['is_gift_art_allowed']) ? $data['is_gift_art_allowed'] : 0; $character->is_trading = isset($data['is_trading']); $character->save(); } diff --git a/resources/views/browse/_masterlist_content.blade.php b/resources/views/browse/_masterlist_content.blade.php index ac1953af59..61975dac30 100644 --- a/resources/views/browse/_masterlist_content.blade.php +++ b/resources/views/browse/_masterlist_content.blade.php @@ -46,16 +46,17 @@ {!! Form::label('sale_value_max', 'Resale Maximum ($): ') !!} {!! Form::text('sale_value_max', Request::get('sale_value_max'), ['class' => 'form-control']) !!}
- {{-- Setting the width and height on the toggles as they don't seem to calculate correctly if the div is collapsed. --}} -
- {!! Form::checkbox('is_trading', 1, Request::get('is_trading'), ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Open For Trade', 'data-off' => 'Any Trading Status', 'data-width' => '200', 'data-height' => '46']) !!} -
@if(!$isMyo)
- {!! Form::checkbox('is_gift_art_allowed', 1, Request::get('is_gift_art_allowed'), ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Open For Gift Art', 'data-off' => 'Any Gift Art Status', 'data-width' => '195', 'data-height' => '46']) !!} + {!! Form::label('is_gift_art_allowed', 'Gift Art Status: ') !!} + {!! Form::select('is_gift_art_allowed', [0 => 'Any', 2 => 'Ask First', 1 => 'Yes', 3 => 'Yes OR Ask First'], Request::get('is_gift_art_allowed'), ['class' => 'form-control']) !!}
@endif
+ {{-- Setting the width and height on the toggles as they don't seem to calculate correctly if the div is collapsed. --}} +
+ {!! Form::checkbox('is_trading', 1, Request::get('is_trading'), ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Open For Trade', 'data-off' => 'Any Trading Status', 'data-width' => '200', 'data-height' => '46']) !!} +
{!! Form::checkbox('is_sellable', 1, Request::get('is_sellable'), ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Can Be Sold', 'data-off' => 'Any Sellable Status', 'data-width' => '204', 'data-height' => '46']) !!}
diff --git a/resources/views/character/edit_profile.blade.php b/resources/views/character/edit_profile.blade.php index 25be48180e..0aa400a436 100644 --- a/resources/views/character/edit_profile.blade.php +++ b/resources/views/character/edit_profile.blade.php @@ -30,8 +30,8 @@ @if($character->user_id == Auth::user()->id) @if(!$character->is_myo_slot)
- {!! Form::checkbox('is_gift_art_allowed', 1, $character->is_gift_art_allowed, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} - {!! Form::label('is_gift_art_allowed', 'Allow Gift Art', ['class' => 'form-check-label ml-3']) !!} {!! add_help('This will place the character on the list of characters that can be drawn for gift art. This does not have any other functionality, but allow users looking for characters to draw to find your character easily.') !!} + {!! Form::label('is_gift_art_allowed', 'Allow Gift Art', ['class' => 'form-check-label mb-3']) !!} {!! add_help('This will place the character on the list of characters that can be drawn for gift art. This does not have any other functionality, but allow users looking for characters to draw to find your character easily.') !!} + {!! Form::select('is_gift_art_allowed', [0 => 'No', 1 => 'Yes', 2 => 'Ask First'], $character->is_gift_art_allowed, ['class' => 'form-control user-select']) !!}
@endif @if($character->is_tradeable || $character->is_sellable) diff --git a/resources/views/character/profile.blade.php b/resources/views/character/profile.blade.php index ac90f6e7cf..2b360ef35c 100644 --- a/resources/views/character/profile.blade.php +++ b/resources/views/character/profile.blade.php @@ -33,8 +33,8 @@
@if($character->is_trading || $character->is_gift_art_allowed)
    - @if($character->is_gift_art_allowed && !$character->is_myo_slot) -
  • Gift art is allowed
  • + @if($character->is_gift_art_allowed >= 1 && !$character->is_myo_slot) +
  • {{ $character->is_gift_art_allowed == 1 ? 'Gift art is allowed' : 'Please ask before gift art' }}
  • @endif @if($character->is_trading)
  • Open for trades
  • From 00bff4fdf1e68549ad7e08ec5b1465f890647006 Mon Sep 17 00:00:00 2001 From: itinerare Date: Sat, 5 Sep 2020 22:05:11 -0400 Subject: [PATCH 37/43] Slightly more checking on setting gift art status --- app/Services/CharacterManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php index ba75149850..5756f800c8 100644 --- a/app/Services/CharacterManager.php +++ b/app/Services/CharacterManager.php @@ -981,7 +981,7 @@ public function updateCharacterProfile($data, $character, $user, $isAdmin = fals if($character->is_trading != isset($data['is_trading'])) $notifyTrading = true; if($character->is_gift_art_allowed != isset($data['is_gift_art_allowed'])) $notifyGiftArt = true; - $character->is_gift_art_allowed = isset($data['is_gift_art_allowed']) ? $data['is_gift_art_allowed'] : 0; + $character->is_gift_art_allowed = isset($data['is_gift_art_allowed']) && $data['is_gift_art_allowed'] <= 2 ? $data['is_gift_art_allowed'] : 0; $character->is_trading = isset($data['is_trading']); $character->save(); } From db83d8cb1753041e675428ca607c133c7e633a85 Mon Sep 17 00:00:00 2001 From: itinerare Date: Thu, 10 Sep 2020 22:40:35 -0400 Subject: [PATCH 38/43] Add an extension service for handling misc general tasks relating to extensions. For the moment it only serves as a home for a function to adjust the type ID of existing notifications within the DB. --- app/Services/ExtensionService.php | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 app/Services/ExtensionService.php diff --git a/app/Services/ExtensionService.php b/app/Services/ExtensionService.php new file mode 100644 index 0000000000..ca931880e1 --- /dev/null +++ b/app/Services/ExtensionService.php @@ -0,0 +1,46 @@ +count(); + if($count && isset($destination)) { + DB::beginTransaction(); + try { + Notification::where('notification_type_id', $source)->update(['notification_type_id' => $destination]); + + return $this->commitReturn(true); + } catch(\Exception $e) { + $this->setError('error', $e->getMessage()); + } + return $this->rollbackReturn(false); + } + } +} \ No newline at end of file From dd864cc6ed36f06252b9513e4167eb1069616cfc Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 6 Oct 2020 13:55:26 -0400 Subject: [PATCH 39/43] Revert "Add an extension service for handling misc general tasks relating to extensions." This reverts commit db83d8cb1753041e675428ca607c133c7e633a85. --- app/Services/ExtensionService.php | 46 ------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 app/Services/ExtensionService.php diff --git a/app/Services/ExtensionService.php b/app/Services/ExtensionService.php deleted file mode 100644 index ca931880e1..0000000000 --- a/app/Services/ExtensionService.php +++ /dev/null @@ -1,46 +0,0 @@ -count(); - if($count && isset($destination)) { - DB::beginTransaction(); - try { - Notification::where('notification_type_id', $source)->update(['notification_type_id' => $destination]); - - return $this->commitReturn(true); - } catch(\Exception $e) { - $this->setError('error', $e->getMessage()); - } - return $this->rollbackReturn(false); - } - } -} \ No newline at end of file From c0237eab628f5f90f24bacec0be61e349751b33d Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 6 Oct 2020 13:57:03 -0400 Subject: [PATCH 40/43] - Remove isset on switch in browse/admin user controllers in favor of default - Move auth out of character image model --- .../Admin/Users/UserController.php | 53 +++++++++-------- app/Http/Controllers/BrowseController.php | 57 +++++++++---------- app/Models/Character/CharacterImage.php | 5 +- resources/views/character/images.blade.php | 2 +- 4 files changed, 57 insertions(+), 60 deletions(-) diff --git a/app/Http/Controllers/Admin/Users/UserController.php b/app/Http/Controllers/Admin/Users/UserController.php index 290ece6508..f3f9e86dc5 100644 --- a/app/Http/Controllers/Admin/Users/UserController.php +++ b/app/Http/Controllers/Admin/Users/UserController.php @@ -33,33 +33,32 @@ public function getIndex(Request $request) }); if($request->get('rank_id')) $query->where('rank_id', $request->get('rank_id')); - if(isset($sort['sort'])) - { - switch($sort['sort']) { - case 'alpha': - $query->orderBy('name'); - break; - case 'alpha-reverse': - $query->orderBy('name', 'DESC'); - break; - case 'alias': - $query->orderBy('alias', 'ASC'); - break; - case 'alias-reverse': - $query->orderBy('alias', 'DESC'); - break; - case 'rank': - $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); - break; - case 'newest': - $query->orderBy('created_at', 'DESC'); - break; - case 'oldest': - $query->orderBy('created_at', 'ASC'); - break; - } - } - else $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + switch($sort['sort']) { + default: + $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + break; + case 'alpha': + $query->orderBy('name'); + break; + case 'alpha-reverse': + $query->orderBy('name', 'DESC'); + break; + case 'alias': + $query->orderBy('alias', 'ASC'); + break; + case 'alias-reverse': + $query->orderBy('alias', 'DESC'); + break; + case 'rank': + $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + break; + case 'newest': + $query->orderBy('created_at', 'DESC'); + break; + case 'oldest': + $query->orderBy('created_at', 'ASC'); + break; + } return view('admin.users.index', [ 'users' => $query->paginate(30)->appends($request->query()), diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php index de08f22a12..db9b466f91 100644 --- a/app/Http/Controllers/BrowseController.php +++ b/app/Http/Controllers/BrowseController.php @@ -45,33 +45,32 @@ public function getUsers(Request $request) }); if($request->get('rank_id')) $query->where('rank_id', $request->get('rank_id')); - if(isset($sort['sort'])) - { - switch($sort['sort']) { - case 'alpha': - $query->orderBy('name'); - break; - case 'alpha-reverse': - $query->orderBy('name', 'DESC'); - break; - case 'alias': - $query->orderBy('alias', 'ASC'); - break; - case 'alias-reverse': - $query->orderBy('alias', 'DESC'); - break; - case 'rank': - $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); - break; - case 'newest': - $query->orderBy('created_at', 'DESC'); - break; - case 'oldest': - $query->orderBy('created_at', 'ASC'); - break; - } - } - else $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + switch($sort['sort']) { + default: + $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + break; + case 'alpha': + $query->orderBy('name'); + break; + case 'alpha-reverse': + $query->orderBy('name', 'DESC'); + break; + case 'alias': + $query->orderBy('alias', 'ASC'); + break; + case 'alias-reverse': + $query->orderBy('alias', 'DESC'); + break; + case 'rank': + $query->orderBy('ranks.sort', 'DESC')->orderBy('name'); + break; + case 'newest': + $query->orderBy('created_at', 'DESC'); + break; + case 'oldest': + $query->orderBy('created_at', 'ASC'); + break; + } return view('browse.users', [ 'users' => $query->paginate(30)->appends($request->query()), @@ -122,7 +121,7 @@ public function getCharacters(Request $request) { $query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(0); - $imageQuery = CharacterImage::images()->with('features')->with('rarity')->with('species')->with('features'); + $imageQuery = CharacterImage::images(Auth::check() ? Auth::user() : null)->with('features')->with('rarity')->with('species')->with('features'); if($request->get('name')) $query->where(function($query) use ($request) { $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%'); @@ -236,7 +235,7 @@ public function getMyos(Request $request) { $query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(1); - $imageQuery = CharacterImage::images()->with('features')->with('rarity')->with('species')->with('features'); + $imageQuery = CharacterImage::images(Auth::check() ? Auth::user() : null)->with('features')->with('rarity')->with('species')->with('features'); if($request->get('name')) $query->where(function($query) use ($request) { $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%'); diff --git a/app/Models/Character/CharacterImage.php b/app/Models/Character/CharacterImage.php index a3980acb22..cf051750e2 100644 --- a/app/Models/Character/CharacterImage.php +++ b/app/Models/Character/CharacterImage.php @@ -4,7 +4,6 @@ use Config; use DB; -use Auth; use App\Models\Model; use App\Models\Feature\FeatureCategory; use App\Models\Character\CharacterCategory; @@ -160,9 +159,9 @@ public function artists() * @param \Illuminate\Database\Eloquent\Builder $query * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeImages($query) + public function scopeImages($query, $user = null) { - if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); + if(!$user || !$user->hasPower('manage_characters')) return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC'); else return $query->orderBy('sort')->orderBy('id', 'DESC'); } diff --git a/resources/views/character/images.blade.php b/resources/views/character/images.blade.php index 7db905479d..047bce681d 100644 --- a/resources/views/character/images.blade.php +++ b/resources/views/character/images.blade.php @@ -10,7 +10,7 @@ @include('character._header', ['character' => $character])
    - @foreach($character->images()->with('features.feature')->with('species')->with('rarity')->get() as $image) + @foreach($character->images(Auth::check() ? Auth::user() : null)->with('features.feature')->with('species')->with('rarity')->get() as $image)
    From 71aee3ce6ca86d351977d09e6155bd87de2c55e1 Mon Sep 17 00:00:00 2001 From: itinerare Date: Tue, 6 Oct 2020 14:37:43 -0400 Subject: [PATCH 41/43] Properly display/search hidden character images again --- app/Http/Controllers/Characters/CharacterController.php | 1 + resources/views/character/images.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Characters/CharacterController.php b/app/Http/Controllers/Characters/CharacterController.php index 2ab72e9826..4925f19641 100644 --- a/app/Http/Controllers/Characters/CharacterController.php +++ b/app/Http/Controllers/Characters/CharacterController.php @@ -133,6 +133,7 @@ public function postEditCharacterProfile(Request $request, CharacterManager $ser public function getCharacterImages($slug) { return view('character.images', [ + 'user' => Auth::check() ? Auth::user() : null, 'character' => $this->character, ]); } diff --git a/resources/views/character/images.blade.php b/resources/views/character/images.blade.php index 047bce681d..65da4d4030 100644 --- a/resources/views/character/images.blade.php +++ b/resources/views/character/images.blade.php @@ -10,7 +10,7 @@ @include('character._header', ['character' => $character])
    - @foreach($character->images(Auth::check() ? Auth::user() : null)->with('features.feature')->with('species')->with('rarity')->get() as $image) + @foreach($character->images($user)->with('features.feature')->with('species')->with('rarity')->get() as $image)
    @@ -32,7 +32,7 @@