From b267682ab9603f471c7d9d5c388b675bea91158c Mon Sep 17 00:00:00 2001 From: Jav Date: Fri, 9 Apr 2021 12:17:37 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/README.md b/README.md index fdbb756..0534f52 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,130 @@ This theme is an example on how to handle some basic functions for the interface Feel free to use it as a starting point + +# Where the user select his characters to send items to? + +## Shop plugin +If you were to create your own theme, or modifying one that you bought, look for the file : **`ressources/themes/MY_SUPER_THEME/views/plugins/shop/cart/index.blade.php`** + +(if it doesn't exists you can copy the original file from `plugins/shop/cart/index.blade.php` and place it here **`ressources/themes/MY_SUPER_THEME/views/plugins/shop/cart/index.blade.php`** + +Then within the file, look for `
` and paste under the `
` + +```blade +
+ @php + $characters = flyff_user(auth()->user())->characters; + @endphp + +
+ @csrf + + + + +
+
+``` + +## Vote plugin +If you were to create your own theme, or modifying one that you bought, look for the file : **`ressources/themes/MY_SUPER_THEME/views/plugins/vote/index.blade.php`** + +(if it doesn't exists you can copy the original file from `plugins/vote/index.blade.php` and place it here **`ressources/themes/MY_SUPER_THEME/views/plugins/vote/index.blade.php`** + +Then within the file, look for **`
`** and replace everything under until you see : + +**`

{{ trans('vote::messages.sections.top') }}

`** + +with the snippet below + +```blade +@guest + +
You need to login before you vote (click here)
+
+@else + +
+ +
+ @php + $characters = flyff_user(auth()->user())->characters; + @endphp + +
+ @csrf + + + + +
+
+ +
+
+
+
+ + @forelse($sites as $site) + {{ $site->name }} + @empty + + @endforelse +
+
+

+
+
+@endguest + +``` + + From b7316ebd5fe62be552836f416861bb8a7bdf9883 Mon Sep 17 00:00:00 2001 From: Jav Date: Fri, 9 Apr 2021 13:52:27 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 0534f52..42b57f3 100644 --- a/README.md +++ b/README.md @@ -88,25 +88,29 @@ with the snippet below
@php - $characters = flyff_user(auth()->user())->characters; + $characters = flyff_user(auth()->user())->characters; @endphp -
- @csrf - - - - -
+ @if($characters->count() > 0) +
+ @csrf + + + + +
+ @else +
You need to create a in-game character before you vote
+ @endif
@@ -115,10 +119,10 @@ with the snippet below
@forelse($sites as $site) - {{ $site->name }} + {{ $site->name }} @empty - + @endforelse