Difference between revisions of "Extensions:Comments"
Tag: 2017 source edit |
Tag: 2017 source edit |
||
Line 14: | Line 14: | ||
Please note that currently, this composer package is not a standalone host and relies on GitHub API. This means you may be denied installing from the repository for a period of time. I unfortunately cannot predict how long. I am working on seeing if I can host it as a live package. | Please note that currently, this composer package is not a standalone host and relies on GitHub API. This means you may be denied installing from the repository for a period of time. I unfortunately cannot predict how long. I am working on seeing if I can host it as a live package. | ||
+ | |||
+ | Once both processes have completed, run <code>php artisan migrate</code> | ||
+ | |||
+ | You will now (hopefully) have comments locally. | ||
+ | |||
+ | |||
+ | I recommend playing with comments before repeating the process for your production site. This will allow you to catch any errors before it can affect your site. Please let me know if you happen to find any. | ||
+ | |||
+ | |||
+ | Once comfortable with the state of the package, push any files to your site that sourcetree detects. You may need to include composer.lock in this push if you are on a limited hosting plan. | ||
+ | |||
+ | |||
+ | Once pushed, run <code>composer install</code> in <code>sitename.com/www</code> | ||
+ | |||
+ | Finally, run <code>php artisan migrate</code> | ||
+ | |||
+ | After, you should have comments installed. | ||
+ | |||
+ | |||
+ | If you encounter any errors please let me know! | ||
== Configuration == | == Configuration == | ||
Comments come with the following extensions installed: | Comments come with the following extensions installed: |
Revision as of 14:52, 12 September 2020
Description | Adds comments and a sales area to lorekeeper. |
---|---|
Author(s) | Ne-wt, Preimpression |
Status | stable |
Github | Please Follow the Guide |
LK Version | Unspecified |
Contains a Migration | |
Uses a Package | |
Thanks
Special thank you to Uri (Preimpression) who not only helped make this project possible, but significantly reduced its development time. Please consider donating to their ko-fi!
https://ko-fi.com/preimpression
Installation
PLEASE NOTE THAT THIS EXTENSION IS INSTALLED IN A DIFFERENT MANNER THAN USUAL EXTENSIONS. IF YOU ARE NOT WELL EXPERIENCED WITH YOUR SITE AND USING YOUR IDE, PLEASE CONSIDER ASKING FOR HELP INSTALLING.
I highly recommend installing locally before pushing to production
Pull the branch Comment-Addons
from https://github.com/Ne-wt/lorekeeper.git
Once pulled, run the command composer install
on your local folder. This will install the config files for comments.
If you forget this step, your comments will not work and you will receive 500 errors on all models containing comment code.
Please note that currently, this composer package is not a standalone host and relies on GitHub API. This means you may be denied installing from the repository for a period of time. I unfortunately cannot predict how long. I am working on seeing if I can host it as a live package.
Once both processes have completed, run php artisan migrate
You will now (hopefully) have comments locally.
I recommend playing with comments before repeating the process for your production site. This will allow you to catch any errors before it can affect your site. Please let me know if you happen to find any.
Once comfortable with the state of the package, push any files to your site that sourcetree detects. You may need to include composer.lock in this push if you are on a limited hosting plan.
Once pushed, run composer install
in sitename.com/www
Finally, run php artisan migrate
After, you should have comments installed.
If you encounter any errors please let me know!
Configuration
Comments come with the following extensions installed:
- User Avatars
- Sales Page Addon
- User Ranks Icon Addon
If you do not wish to use these please consider removing before pushing to your site.
If you make any local changes to your vendor folder, you *can ftp your comments folder directly to your server, as git does not track the vendor folder.*
Usage
To add comments to a new page, add the following:
- Add
use Laravelista\Comments\Commentable;
to the top of your model - Add
use Commentable;
within the curly brackets (e.g Controller extends Controller{ use Commentable;)
- Add
@comments([ 'model' => $modelvariable,'approved' => true ])
to your view
Troubleshooting
If you need support please @ me in the lorekeeper discord, Newt#7776. Please note I heavily advise testing on local before pushing to production.