Difference between revisions of "Extensions:Free MYOs"

From Lorekeeper Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
Tag: 2017 source edit
Line 5: Line 5:
 
A "Create Free MYO" button is added to the navbar and /characters/myos page, redirecting users to a form and admin-select pool of species/subtypes they can select to create a free MYO slot with. Depending on how the extension is set up, users can create as many MYOs as they'd like!
 
A "Create Free MYO" button is added to the navbar and /characters/myos page, redirecting users to a form and admin-select pool of species/subtypes they can select to create a free MYO slot with. Depending on how the extension is set up, users can create as many MYOs as they'd like!
 
== Installation ==
 
== Installation ==
'''This extension is on Lorekeeper v3.0.0 as of May 25, 2025!'''
+
{| style="padding: .5rem; border: 1px solid #a31f1f; background: #cf8a8a;"
 
+
|-
Users on Lorkeeper v2 should pull only to commit c25637d and apply the change described under **Known Issue**. Notice that v2 of this extension is no longer supported.
+
| This extension is on Lorekeeper v3.0.0 as of May 25, 2025
 +
|-
 +
| Users on Lorkeeper v2 should pull only to commit c25637d and apply the change described under Known Issue v2. Notice that v2 of this extension is no longer supported, and this documentation only covers installation of Free MYOs v3.
 +
|}
  
 
1. Pull and merge the branch, making sure to address any merge issues.
 
1. Pull and merge the branch, making sure to address any merge issues.
Line 23: Line 26:
 
3. If upgrading from Free MYOs v1.0.0 you will also need to run <code>php artisan delete-obsolete-settings</code> after applying your current settings to the free MYOs configruation file (config\lorekeeper\free_myos.php).
 
3. If upgrading from Free MYOs v1.0.0 you will also need to run <code>php artisan delete-obsolete-settings</code> after applying your current settings to the free MYOs configruation file (config\lorekeeper\free_myos.php).
 
== Configuration ==
 
== Configuration ==
'''Set species to is_free_myo_usable*:'''
+
'''Configure Free MYO Preferences'''
 
+
Located at config\lorekeeper\free_myos.php is the extension configuration file. There are comments in the code that describe what each setting is and the accepted values it will take.
'''This is required for setup!''' If no species with this value set to true are found, the creation page will instruct users to submit a bug report, and they will not be able to create free MYOs.
 
 
 
To set a species as is_free_myo_usable, go into your admin menu and find your species data. When you click edit (or create) you will find a toggle next to the name field. Turn it on and submit the form. Users will now be able to select that species for their free MYO slot!
 
 
 
 
 
'''Set subtypes to is_free_myo_usable*:'''
 
 
 
The same process as species, although subtypes aren't required--even if you have free_myos_require_subtypes enabled in site settings (see below).
 
 
 
'''Configure the free_myos file:'''
 
 
 
located at config\lorekeeper\free_myos.php, this is the master file for all details pertaining to free MYO limitations and preferences. There is inline documentation that explains each setting.
 
 
 
'''!! IMPORTANT !!''' Anytime you update a configuration file, you must run <code>php artisan optimize</code> for the changes to be applied!
 
  
'''Set free_myos_open to open:'''
+
'''Enable Species/Subtypes for Free MYOs'''
 +
After following the installation instructions, you can now see a "Free MYO Usable" toggle on each species/subtype's respective page. You may toggle as many or as few on or off as desired. Be aware that if there are no species available for Free MYOs, users who visit the free MYO page will not be able to create MYOs and be prompted to submit a bug report.
  
Go to your site settings page, then update the free_myos_open to 1, allowing users to create their free MYO slots.
+
'''Release the Feature to Users'''
* Determines if users can access the free MYO page.
+
After following the installation instructions, there is a free_myos_open setting available on your site settings page. This setting:
* This only prevents new slots from being created. This does not halt design submissions for pre-existing slots.
+
* determines if users can access the free MYO page.
* Closed by default to allow time for any initial setup while the site is live.*
+
* (when closed) only prevents new slots from being created. It does not halt design submissions for pre-existing slots.
 +
When you're site is ready, change this setting to 1 to allow users to create free MYOs. You may disable the Free MYOs creation at anytime by resetting the value to 0.
  
<small>*If you plan on changing is_free_myo_usable values while your site is live, I highly suggest that you temporarily disable free_myos_open in site settings.</small>
 
 
== Troubleshooting ==
 
== Troubleshooting ==
 
I am no longer on Discord. Instead, please contact me through CritterCodes (https://crittercodes.neocities.org/). Thank you!
 
I am no longer on Discord. Instead, please contact me through CritterCodes (https://crittercodes.neocities.org/). Thank you!
Line 53: Line 43:
 
'''Known Issue (v1)'''
 
'''Known Issue (v1)'''
 
* When MYO limit is set, users cannot create a free MYO/can still create MYOs (depending on the number of MYO user ID 1 has made)
 
* When MYO limit is set, users cannot create a free MYO/can still create MYOs (depending on the number of MYO user ID 1 has made)
** Currently pushing a commit to fix this.
 
 
** For now, please go into your `app/Services/CharacterManager.php` and update <code>UserSettings::find($data['user_id'])->pluck('free_myos_made')->first()</code>
 
** For now, please go into your `app/Services/CharacterManager.php` and update <code>UserSettings::find($data['user_id'])->pluck('free_myos_made')->first()</code>
 
with <code>UserSettings::where('user_id', $data['user_id'])->pluck('free_myos_made')->first()</code>
 
with <code>UserSettings::where('user_id', $data['user_id'])->pluck('free_myos_made')->first()</code>
 
== Images ==
 
== Images ==
 
[[File:Screenshot 2022-10-06 214731.png|none|thumb]][[File:Screenshot 2022-10-06 214822.png|none|thumb]]
 
[[File:Screenshot 2022-10-06 214731.png|none|thumb]][[File:Screenshot 2022-10-06 214822.png|none|thumb]]

Revision as of 12:28, 25 May 2025

Free MYOs
Description Allow users to create free MYOs
Author(s) AnimatedCritter
Status stable
Github extension/free-myos
LK Version 3.0.0
Contains a Migration






An alternative to the slot-box system, this extension was made in an attempt to reduce the amount of menuing required to access free MYO slots!

A "Create Free MYO" button is added to the navbar and /characters/myos page, redirecting users to a form and admin-select pool of species/subtypes they can select to create a free MYO slot with. Depending on how the extension is set up, users can create as many MYOs as they'd like!

Installation

This extension is on Lorekeeper v3.0.0 as of May 25, 2025
Users on Lorkeeper v2 should pull only to commit c25637d and apply the change described under Known Issue v2. Notice that v2 of this extension is no longer supported, and this documentation only covers installation of Free MYOs v3.

1. Pull and merge the branch, making sure to address any merge issues.

2. Run the following commands in your console:

php artisan migrate

php artisan add-site-settings

php artisan update-extension-tracker

php artisan optimize (may need to run twice)

3. If upgrading from Free MYOs v1.0.0 you will also need to run php artisan delete-obsolete-settings after applying your current settings to the free MYOs configruation file (config\lorekeeper\free_myos.php).

Configuration

Configure Free MYO Preferences Located at config\lorekeeper\free_myos.php is the extension configuration file. There are comments in the code that describe what each setting is and the accepted values it will take.

Enable Species/Subtypes for Free MYOs After following the installation instructions, you can now see a "Free MYO Usable" toggle on each species/subtype's respective page. You may toggle as many or as few on or off as desired. Be aware that if there are no species available for Free MYOs, users who visit the free MYO page will not be able to create MYOs and be prompted to submit a bug report.

Release the Feature to Users After following the installation instructions, there is a free_myos_open setting available on your site settings page. This setting:

  • determines if users can access the free MYO page.
  • (when closed) only prevents new slots from being created. It does not halt design submissions for pre-existing slots.

When you're site is ready, change this setting to 1 to allow users to create free MYOs. You may disable the Free MYOs creation at anytime by resetting the value to 0.

Troubleshooting

I am no longer on Discord. Instead, please contact me through CritterCodes (https://crittercodes.neocities.org/). Thank you!

Known Issue (v1)

  • When MYO limit is set, users cannot create a free MYO/can still create MYOs (depending on the number of MYO user ID 1 has made)
    • For now, please go into your `app/Services/CharacterManager.php` and update UserSettings::find($data['user_id'])->pluck('free_myos_made')->first()

with UserSettings::where('user_id', $data['user_id'])->pluck('free_myos_made')->first()

Images

Screenshot 2022-10-06 214731.png
Screenshot 2022-10-06 214822.png