2017 © Pedro Peláez
 

silverstripe-module silverstripe-fb-comments

Really simple FB comments for Silverstripe.

image

markguinn/silverstripe-fb-comments

Really simple FB comments for Silverstripe.

  • Thursday, February 18, 2016
  • by markguinn
  • Repository
  • 1 Watchers
  • 5 Stars
  • 139 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Simple Facebook Comments Module

A really simple module for adding Facebook comments to a silverstripe site. There are probably better ones out there, but this is meant to get you up and running in 5 minutes or so., (*1)

INSTALLATION:

  1. Create an app in the fb developers area.
  2. Either 'composer require markguinn/silverstripe-fb-comments' or download from github into an 'fb-comments' folder in your site root.
  3. Either install 'tractorcow/silverstripe-opengraph' module (recommended) or add an 'OGApplicationID' method to SiteConfig with your fb application ID. If you do the former, you'll need/want to add $OGNS to your html tag and probably set OpenGraphObjectExtension::$default_image in _config.php.
  4. Add 'FBCommentsExtension' to BlogEntry or Page (or whichever classes you want comments available). Probably something like:
BlogEntry::add_extension('FBComments');
  1. Add the following just after the opening body tag IF you're not already including the FB API for something else (like buttons, etc):
<% include OptionalFBAPI %>
  1. Add the following where you want comments to show up:
<% include FBComments %>

CONFIG OPTIONS:

The following configuration options are available on FBComments: * num_posts - The number of comments to show initially. Default is 3. * comment_width - The width of the comment area. Default is 600 * color_scheme - See FB documentation for details. Default is light. * notify - list of email addresses to notify if there's a comment * notify_from - address from which the notification should come * notify_subject - subject of the notification email, (*2)

By default, there is no notification when a new comment is posted, but if you set a list of addresses, the plugin will send an email to those people., (*3)

SAMPLE CONFIG FILE

---
name: 'fbcomments'
---
BlogEntry:
  extensions:
    0: 'FBComments'
FBComments:
  num_posts: 10
  comment_width: 600
  color_scheme: light
  notify:
    0: 'mark@adaircreative.com'
  notify_from: 'noreply@yoursite.com'
  notify_subject: 'New comment on yoursite.com'
---

DEVELOPERS:

  • Mark Guinn - mark@adaircreative.com

LICENSE (MIT):

Copyright (c) 2013 Mark Guinn, (*4)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*5)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*6)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*7)

The Versions

18/02 2016

dev-master

9999999-dev

Really simple FB comments for Silverstripe.

  Sources   Download

MIT

The Requires

 

comments facebook silverstripe