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
m
Tag: 2017 source edit
 
(12 intermediate revisions by the same user not shown)
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=testing|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.
+
{| style="padding: .5rem; border-radius: .5rem; background: #cf8a8a;"
 +
|-
 +
| '''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 only)"''.
 +
|-
 +
| Notice that v2 of this extension is no longer supported, and this documentation only covers installation of Free MYOs v3, although the installation instructions are the same.
 +
|}
  
Afterwards, run the following commands in your console:
+
1. Pull and merge the branch ([[Tutorial: Installing Extensions]]) making sure to address any merge issues.
  
<code>php artisan migrate</code>
+
2. Run the following commands in your console:
  
<code>php artisan add-site-settings</code>
+
* <code>php artisan migrate</code>
  
<code>php artisan update-extension-tracker</code>
+
* <code>php artisan add-site-settings</code>
  
<code>php artisan optimize</code> (may need to run twice)
+
* <code>php artisan update-extension-tracker</code>
  
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).
+
* <code>php artisan optimize</code> (may need to run twice)
 +
 
 +
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 <code>config\lorekeeper\free_myos.php</code> 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!
 
  
 +
* '''!! Important !!''' You must run <code>php artisan optimize</code> to apply changes published to your configuration file.
  
'''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).
+
'''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.  
  
'''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:'''
+
'''Release the Feature to Users'''
Go to your site settings page, then update the free_myos_open to 1, allowing users to create their free MYO slots.
+
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.
+
* 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.
+
* (when closed) only prevents new slots from being created. It does not halt design submissions for pre-existing slots.
* Closed by default to allow time for any initial setup while the site is live.*
+
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!
+
Please see [[User: AnimatedCritter]] for contact information regarding questions, bug reports, or anything inbetween! c:
  
'''Known Issue:'''
+
'''Known Issue (v2 only)'''
 
* 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.
+
** 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]]

Latest revision as of 13:52, 25 May 2025

Free MYOs
Description Allow users to create free MYOs
Author(s) AnimatedCritter
Status testing
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 only)".
Notice that v2 of this extension is no longer supported, and this documentation only covers installation of Free MYOs v3, although the installation instructions are the same.

1. Pull and merge the branch (Tutorial: Installing Extensions) 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.

  • !! Important !! You must run php artisan optimize to apply changes published to your configuration file.


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

Please see User: AnimatedCritter for contact information regarding questions, bug reports, or anything inbetween! c:

Known Issue (v2 only)

  • 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)
    • 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