Difference between revisions of "Extensions:Comments"
Tag: 2017 source edit |
m (Added updating to v2 link) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | {{Extensioninfobox|title= | + | {{Extensioninfobox|title=Comments|desc=Adds comments and a sales area to lorekeeper.|auth=Ne-wt, Preimpression|status=stable|github={{Github|user=ne-wt|branch=comments-addon}}|migration=yes|package=no|modified-main=yes}} |
Add comments to your sites! Comments will notify users when commented on and replied to. | Add comments to your sites! Comments will notify users when commented on and replied to. | ||
Line 45: | Line 45: | ||
== See Also == | == See Also == | ||
If you have errors, try [https://www.tutsmake.com/laravel-clear-cache-using-artisan-command-cli/ clearing your laravel caches] before anything! | If you have errors, try [https://www.tutsmake.com/laravel-clear-cache-using-artisan-command-cli/ clearing your laravel caches] before anything! | ||
+ | * [[Updating:_to_2.0.0]] |
Latest revision as of 09:09, 25 March 2024
Description | Adds comments and a sales area to lorekeeper. |
---|---|
Author(s) | Ne-wt, Preimpression |
Status | stable |
Github | comments-addon |
LK Version | Unspecified |
Contains a Migration | |
Is part of LK v2 (modified-main) | |
Add comments to your sites! Comments will notify users when commented on and replied to.
Mentions are not yet developed, unfortunately.
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
Also thanks to Laravelista for providing the original package.
Installation
As of October 8, 2020, the Comments extension has been separated from the original package. As always, we highly recommend installing locally and testing on a local testing server (via XAMPP or something similar) to ensure everything is working.
- Pull the branch (comments-addon) and merge. Make sure to check your conflicts manually - don't rely on Sourcetree to handle the merge!
- Run the command:
composer update
so that your server will ensure it has some of the minor packages (such as Honeypot by Spatie, which is spam-prevention package).- You may need to include composer.lock in this push if you are on a limited hosting plan and composer complains about memory.
- Run the command:
php artisan migrate
so that Laravel will update the database accordingly. - If you had the package prior to the October 8 update, run
php artisan view:clear
to clear your view caches.
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. 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.
Usage
To add comments to a new page, add the following:
- Add
use App\Traits\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, 'perPage' => 5 ])
to your view - You will also need to update your Notifications inside CommentController to handle whatever new system you're adding comments to.
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.
See Also
If you have errors, try clearing your laravel caches before anything!