Difference between revisions of "Extensions:Comments"

From Lorekeeper Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
Tag: 2017 source edit
Line 4: Line 4:
 
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.
 
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.
 
== Configuration ==
 
== Configuration ==
<!-- Is any configuration necessary? Describe it here! -->
 
== Usage ==
 
 
Comments come with the following extensions installed:  
 
Comments come with the following extensions installed:  
 
* User Avatars
 
* User Avatars
Line 13: Line 11:
  
 
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.*
 
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 <code>use Laravelista\Comments\Commentable;</code> to the top of your model
 +
*Add <code>use Commentable;</code> within the curly brackets (e.g Controller extends Controller <code>{ use Commentable;)</code>
 +
*Add <code>@comments([
 +
 +
    'model' => $modelvariable,
 +
    'approved' => true
 +
])</code> to your view
 
== Troubleshooting ==
 
== Troubleshooting ==
 
If you need support please @ me in the lorekeeper discord, Newt#7776.
 
If you need support please @ me in the lorekeeper discord, Newt#7776.

Revision as of 15:37, 12 September 2020

the extension's name
Description A short description
Author(s) Ne-wt, Preimpression
Status stable
Github branch
LK Version Unspecified
Contains a Migration
Uses a Package


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.

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.

See Also