Skip to content

Commit 6d8b39d

Browse files
committed
Merge branch 'master' into feature/laravel-tests
2 parents 2ed49a5 + f447da6 commit 6d8b39d

File tree

451 files changed

+21360
-2953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+21360
-2953
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ npm-debug.log
1111
yarn-error.log
1212
/composer.lock
1313
*.env
14-
/.idea
14+
/composer.phar

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Lorekeeper Contribution Guide
2+
3+
For support and general questions and discussions, please visit the [support Discord server](https://discord.gg/U4JZfsu)! Please do not use the issue tracker for general support questions. Please also remember that unless explicitly stated otherwise/you have hired services to that end, all support is free and offered on a volunteer basis, and there is no guarantee or obligation upon maintainers and/or community members to provide support.
4+
5+
The following are accepted uses for the [issue tracker](https://github.com/corowne/Lorekeeper/issues):
6+
- Bug reports
7+
- Feature or enhancement requests (within reason)-- note that these may be denied if they are deemed out of scope of the project and/or are not feasible to implement for any reason.
8+
9+
## Opening an Issue
10+
### Reporting a bug
11+
12+
File bugs in the [issue tracker](https://github.com/corowne/Lorekeeper/issues). Please follow these guidelines:
13+
14+
- Search existing issues first! Make sure your issue hasn't already been reported.
15+
- Stay on topic, but describe the issue in detail so that others can reproduce it.
16+
- Don't use one issue for multiple bugs! Keeping them 1:1 helps with tracking and fixing problems. Similarly, don't make multiple issues for one bug.
17+
- Provide screenshot(s) if possible.
18+
19+
### Feature requests
20+
21+
It's recommended to discuss potential new features in the [support Discord](https://discord.gg/U4JZfsu) before creating an issue, as this helps check that it is valid for a feature request and if it would be useful to others-- something which increases its likelihood of being implemented. Please also check that your request has not already been posted on the [issue tracker](https://github.com/corowne/Lorekeeper/issues).
22+
23+
Avoid listing multiple requests in one issue. One issue per request makes it easier to track and discuss it. If need be, you may make multiple issues (within reason), but do not spam. Do not make multiple issues for the same request.
24+
25+
## Contributing Code
26+
27+
Please see the full [Contribution Guide](http://wiki.lorekeeper.me/index.php?title=Contributing_to_Lorekeeper) for more information!
28+
29+
### About abandoned pull requests
30+
31+
In the case where a pull request is started but not finished and the contributor is nonresponsive despite efforts to contact them, the pull request will be closed regardless of its status. It is up to contributors to finish work, make any requested changes, etc., not maintainers.
32+
33+
However, knowledge from the issue and/or pull request may be used to create a new pull request, potentially based on the changes from the closed pull request.

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Lorekeeper is a framework for managing deviantART-based ARPGs/closed species masterlists coded using the Laravel framework. In simple terms - you will be able to make a copy of the site, do some minor setup/enter data about your species and game, and it'll provide you with the automation to keep track of your species, players and ARPG submissions.
44

5-
Demo site: [http://lorekeeper.me/](http://lorekeeper.me/)
6-
Wiki for users: [http://lorekeeper-arpg.wikidot.com/](http://lorekeeper-arpg.wikidot.com/)
5+
- Demo site: [http://lorekeeper.me/](http://lorekeeper.me/)
6+
- Wiki: [http://wiki.lorekeeper.me](http://wiki.lorekeeper.me/index.php?title=Main_Page)
77

88
# Features
99

@@ -19,11 +19,11 @@ Wiki for users: [http://lorekeeper-arpg.wikidot.com/](http://lorekeeper-arpg.wik
1919
- Speaking of which, you can search for characters based on traits, rarity, etc. Also, trait/item/etc. data get their own searchable lists - no need to create additional pages detailing restrictions on how a trait should be drawn/described.
2020
- Unless you want to, in which case you can add custom pages in HTML without touching the codebase!
2121
- A raffle roller for consecutive raffles! Mods can add/remove tickets and users who have already won something will be automatically removed from future raffles in the sequence.
22-
- ...and more! Please refer to the [Wiki](http://lorekeeper-arpg.wikidot.com/) for more information and instructions for usage.
22+
- ...and more! Please refer to the [Wiki](http://wiki.lorekeeper.me/index.php?title=Category:Documentation) for more information and instructions for usage.
2323

2424
# Setup
2525

26-
Important: For those who are not familiar with web dev, please refer to the [Wiki](http://lorekeeper-arpg.wikidot.com/) for a much more detailed set of instructions!!
26+
Important: For those who are not familiar with web dev, please refer to the [Wiki](http://wiki.lorekeeper.me/index.php?title=Tutorial:_Setting_Up) for a much more detailed set of instructions!!
2727

2828
## Obtain a copy of the code
2929

@@ -37,16 +37,12 @@ $ git clone https://github.com/corowne/lorekeeper.git
3737
$ cp .env.example .env
3838
```
3939

40-
deviantART client ID and secret are required for this step.
41-
While obtaining the ID and secret, also add whitelist entries for redirection for your site URL (if being hosted) or localhost (if working locally).
40+
Client ID and secret for at least one supported social media platform are required for this step. See [the Wiki](http://wiki.lorekeeper.me/index.php?title=Category:Social_Media_Authentication) for platform-specific instructions.
41+
4242
Add the following to .env, filling them in as required (also fill in the rest of .env where relevant):
4343
```
4444
CONTACT_ADDRESS=(contact email address)
4545
DEVIANTART_ACCOUNT=(username of ARPG group account)
46-
47-
DEVIANTART_CLIENT_ID=(client ID as supplied by deviantART)
48-
DEVIANTART_CLIENT_SECRET=(client secret as supplied by deviantART)
49-
DEVIANTART_CALLBACK_URL=/
5046
```
5147

5248
## Setting up
@@ -74,8 +70,8 @@ Finally, set up the admin account for logging in:
7470
$ php artisan setup-admin-user
7571
```
7672

77-
You will need to send yourself the verification email and then link your dA account as prompted.
73+
You will need to send yourself the verification email and then link your social media account as prompted.
7874

7975
## Contact
8076

81-
If you have any questions, please feel free to contact me through email: corowne@gmail.com
77+
If you have any questions, please feel free to contact me through email: corowne@gmail.com

app/Console/Commands/AddSiteSettings.php

Lines changed: 48 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,30 @@ public function __construct()
3232
parent::__construct();
3333
}
3434

35+
/**
36+
* Add a site setting.
37+
*
38+
* Example usage:
39+
* $this->addSiteSetting("site_setting_key", 1, "0: does nothing. 1: does something.");
40+
*
41+
* @param string $key
42+
* @param int $value
43+
* @param string $description
44+
*/
45+
private function addSiteSetting($key, $value, $description) {
46+
if(!DB::table('site_settings')->where('key', $key)->exists()) {
47+
DB::table('site_settings')->insert([
48+
[
49+
'key' => $key,
50+
'value' => $value,
51+
'description' => $description,
52+
],
53+
]);
54+
$this->info( "Added: ".$key." / Default: ".$value);
55+
}
56+
else $this->line("Skipped: ".$key);
57+
}
58+
3559
/**
3660
* Execute the console command.
3761
*
@@ -45,137 +69,41 @@ public function handle()
4569

4670
$this->line("Adding site settings...existing entries will be skipped.\n");
4771

48-
if(!DB::table('site_settings')->where('key', 'is_registration_open')->exists()) {
49-
DB::table('site_settings')->insert([
50-
[
51-
'key' => 'is_registration_open',
52-
'value' => 1,
53-
'description' => '0: Registration closed, 1: Registration open. When registration is closed, invitation keys can still be used to register.'
54-
]
72+
$this->addSiteSetting('is_registration_open', 1, '0: Registration closed, 1: Registration open. When registration is closed, invitation keys can still be used to register.');
5573

56-
]);
57-
$this->info("Added: is_registration_open / Default: 1");
58-
}
59-
else $this->line("Skipped: is_registration_open");
60-
61-
if(!DB::table('site_settings')->where('key', 'transfer_cooldown')->exists()) {
62-
DB::table('site_settings')->insert([
63-
[
64-
'key' => 'transfer_cooldown',
65-
'value' => 0,
66-
'description' => 'Number of days to add to the cooldown timer when a character is transferred.'
67-
]
74+
$this->addSiteSetting('transfer_cooldown', 0, 'Number of days to add to the cooldown timer when a character is transferred.');
6875

69-
]);
70-
$this->info("Added: transfer_cooldown / Default: 0");
71-
}
72-
else $this->line("Skipped: transfer_cooldown");
73-
74-
if(!DB::table('site_settings')->where('key', 'open_transfers_queue')->exists()) {
75-
DB::table('site_settings')->insert([
76-
[
77-
'key' => 'open_transfers_queue',
78-
'value' => 0,
79-
'description' => '0: Character transfers do not need mod approval, 1: Transfers must be approved by a mod.'
80-
]
76+
$this->addSiteSetting('open_transfers_queue', 0, '0: Character transfers do not need mod approval, 1: Transfers must be approved by a mod.');
8177

82-
]);
83-
$this->info("Added: open_transfers_queue / Default: 0");
84-
}
85-
else $this->line("Skipped: open_transfers_queue");
86-
87-
if(!DB::table('site_settings')->where('key', 'is_prompts_open')->exists()) {
88-
DB::table('site_settings')->insert([
89-
[
90-
'key' => 'is_prompts_open',
91-
'value' => 1,
92-
'description' => '0: New prompt submissions cannot be made (mods can work on the queue still), 1: Prompts are submittable.'
93-
]
78+
$this->addSiteSetting('is_prompts_open', 1, '0: New prompt submissions cannot be made (mods can work on the queue still), 1: Prompts are submittable.');
9479

95-
]);
96-
$this->info("Added: is_prompts_open / Default: 1");
97-
}
98-
else $this->line("Skipped: is_prompts_open");
99-
100-
if(!DB::table('site_settings')->where('key', 'is_claims_open')->exists()) {
101-
DB::table('site_settings')->insert([
102-
[
103-
'key' => 'is_claims_open',
104-
'value' => 1,
105-
'description' => '0: New claims cannot be made (mods can work on the queue still), 1: Claims are submittable.'
106-
]
80+
$this->addSiteSetting('is_claims_open', 1, '0: New claims cannot be made (mods can work on the queue still), 1: Claims are submittable.');
10781

108-
]);
109-
$this->info("Added: is_claims_open / Default: 1");
110-
}
111-
else $this->line("Skipped: is_claims_open");
112-
113-
if(!DB::table('site_settings')->where('key', 'is_myos_open')->exists()) {
114-
DB::table('site_settings')->insert([
115-
[
116-
'key' => 'is_myos_open',
117-
'value' => 1,
118-
'description' => '0: MYO slots cannot be submitted for design approval, 1: MYO slots can be submitted for approval.'
119-
]
82+
$this->addSiteSetting('is_reports_open', 1, '0: New reports cannot be made (mods can work on the queue still), 1: Reports are submittable.');
12083

121-
]);
122-
$this->info("Added: is_myos_open / Default: 1");
123-
}
124-
else $this->line("Skipped: is_myos_open");
125-
126-
if(!DB::table('site_settings')->where('key', 'is_design_updates_open')->exists()) {
127-
DB::table('site_settings')->insert([
128-
[
129-
'key' => 'is_design_updates_open',
130-
'value' => 1,
131-
'description' => '0: Characters cannot be submitted for design update approval, 1: Characters can be submitted for design update approval.'
132-
]
84+
$this->addSiteSetting('is_myos_open', 1, '0: MYO slots cannot be submitted for design approval, 1: MYO slots can be submitted for approval.');
13385

134-
]);
135-
$this->info("Added: is_design_updates_open / Default: 1");
136-
}
137-
else $this->line("Skipped: is_design_updates_open");
138-
139-
if(!DB::table('site_settings')->where('key', 'blacklist_privacy')->exists()) {
140-
DB::table('site_settings')->insert([
141-
[
142-
'key' => 'blacklist_privacy',
143-
'value' => 0,
144-
'description' => 'Who can view the blacklist? 0: Admin only, 1: Staff only, 2: Members only, 3: Public.'
145-
]
86+
$this->addSiteSetting('is_design_updates_open', 1, '0: Characters cannot be submitted for design update approval, 1: Characters can be submitted for design update approval.');
14687

147-
]);
148-
$this->info("Added: blacklist_privacy / Default: 0");
149-
}
150-
else $this->line("Skipped: blacklist_privacy");
151-
152-
if(!DB::table('site_settings')->where('key', 'blacklist_link')->exists()) {
153-
DB::table('site_settings')->insert([
154-
[
155-
'key' => 'blacklist_link',
156-
'value' => 0,
157-
'description' => '0: No link to the blacklist is displayed anywhere, 1: Link to the blacklist is shown on the user list.'
158-
]
88+
$this->addSiteSetting('blacklist_privacy', 0, 'Who can view the blacklist? 0: Admin only, 1: Staff only, 2: Members only, 3: Public.');
15989

160-
]);
161-
$this->info("Added: blacklist_link / Default: 0");
162-
}
163-
else $this->line("Skipped: blacklist_link");
164-
165-
if(!DB::table('site_settings')->where('key', 'blacklist_key')->exists()) {
166-
DB::table('site_settings')->insert([
167-
[
168-
'key' => 'blacklist_key',
169-
'value' => 0,
170-
'description' => 'Optional key to view the blacklist. Enter "0" to not require one.'
171-
]
90+
$this->addSiteSetting('blacklist_link', 0, '0: No link to the blacklist is displayed anywhere, 1: Link to the blacklist is shown on the user list.');
17291

173-
]);
174-
$this->info("Added: blacklist_key / Default: 0");
175-
}
176-
else $this->line("Skipped: blacklist_key");
92+
$this->addSiteSetting('blacklist_key', 0, 'Optional key to view the blacklist. Enter "0" to not require one.');
93+
94+
$this->addSiteSetting('design_votes_needed', 3, 'Number of approval votes needed for a design update or MYO submission to be considered as having approval.');
95+
96+
$this->addSiteSetting('admin_user', 1, 'ID of the site\'s admin user.');
97+
98+
$this->addSiteSetting('gallery_submissions_open', 1, '0: Gallery submissions closed, 1: Gallery submissions open.');
99+
100+
$this->addSiteSetting('gallery_submissions_require_approval', 1, '0: Gallery submissions do not require approval, 1: Gallery submissions require approval.');
101+
102+
$this->addSiteSetting('gallery_submissions_reward_currency', 0, '0: Gallery submissions do not reward currency, 1: Gallery submissions reward currency.');
103+
104+
$this->addSiteSetting('group_currency', 1, 'ID of the group currency to award from gallery submissions (if enabled).');
177105

178106
$this->line("\nSite settings up to date!");
179-
107+
180108
}
181109
}

app/Console/Commands/AssignArtCreditsToIds.php

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
namespace App\Console\Commands;
4+
5+
use Illuminate\Console\Command;
6+
use App\Services\SalesService;
7+
8+
class CheckSales extends Command
9+
{
10+
/**
11+
* The name and signature of the console command.
12+
*
13+
* @var string
14+
*/
15+
protected $signature = 'check-sales';
16+
17+
/**
18+
* The console command description.
19+
*
20+
* @var string
21+
*/
22+
protected $description = 'Checks if there are any sales posts to update.';
23+
24+
/**
25+
* Create a new command instance.
26+
*
27+
* @return void
28+
*/
29+
public function __construct()
30+
{
31+
parent::__construct();
32+
}
33+
34+
/**
35+
* Execute the console command.
36+
*
37+
* @return mixed
38+
*/
39+
public function handle()
40+
{
41+
//
42+
(new SalesService)->updateQueue();
43+
}
44+
}

0 commit comments

Comments
 (0)