Difference between revisions of "Extensions:Free MYOs"

From Lorekeeper Wiki
Jump to navigation Jump to search
(Update to reflect the changes made on Free MYOs v2)
Tag: 2017 source edit
Tag: 2017 source edit
Line 1: Line 1:
 
{{Extensioninfobox|title=Free MYOs|desc=Allow users to create free MYOs|auth=AnimatedCritter|status=stable|github={{Github|user=AnimatedCritter|branch=extension/free-myos}}|LKVer=3.0.0|migration=yes|package=no}}
 
{{Extensioninfobox|title=Free MYOs|desc=Allow users to create free MYOs|auth=AnimatedCritter|status=stable|github={{Github|user=AnimatedCritter|branch=extension/free-myos}}|LKVer=3.0.0|migration=yes|package=no}}
'''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**. Notice that v2 of this extension is no longer supported.
 
  
 
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!
 
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!
Line 7: 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 ==
Pull and merge the branch, making sure to address any merge issues.
+
'''This extension is on Lorekeeper v3.0.0 as of May 25, 2025!'''
  
Afterwards, run the following commands in your console:
+
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.
 +
 
 +
1. Pull and merge the branch, making sure to address any merge issues.
 +
 
 +
2. Run the following commands in your console:
  
 
<code>php artisan migrate</code>
 
<code>php artisan migrate</code>
Line 19: Line 21:
 
<code>php artisan optimize</code> (may need to run twice)
 
<code>php artisan optimize</code> (may need to run twice)
  
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*:'''
 
'''Set species to is_free_myo_usable*:'''
Line 33: Line 35:
  
 
'''Configure the free_myos file:'''
 
'''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.
 
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!
 
'''!! 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:'''
 
'''Set free_myos_open to open:'''
 +
 
Go to your site settings page, then update the free_myos_open to 1, allowing users to create their free MYO slots.
 
Go to your site settings page, then update the free_myos_open to 1, allowing users to create their free MYO slots.
 
* Determines if users can access the free MYO page.
 
* Determines if users can access the free MYO page.
Line 46: Line 51:
 
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!
  
'''Known Issue:'''
+
'''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.
 
** Currently pushing a commit to fix this.

Revision as of 12:14, 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**. Notice that v2 of this extension is no longer supported.

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

Set species to is_free_myo_usable*:

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 php artisan optimize for the changes to be applied!

Set free_myos_open to open:

Go to your site settings page, then update the free_myos_open to 1, allowing users to create their free MYO slots.

  • Determines if users can access the free MYO page.
  • This only prevents new slots from being created. This does not halt design submissions for pre-existing slots.
  • Closed by default to allow time for any initial setup while the site is live.*

*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.

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)
    • Currently pushing a commit to fix this.
    • 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