Skip Navigation

Reason 4.4 - Social Sharing and Accounts

August 15, 2013 at 5:59 pm
By Nathan White

At the July, 2013 Reason Hack/Doc we identified a few priorities for Social Sharing features in Reason CMS. Some have been implemented in Reason 4.4 - specifically:

Social Accounts

The new social account type lets you create social accounts in the Master Admin site that can then be associated with sites. A new social account module will display icons and links for any associated social accounts that implement the display of profile links. The module is really barebones, and uses Reason's MVC class to grab data from a model and pass it to a view.

It could be used as is, but it is also quite trivial to plug in different models or views by specifying them in the page type, or to just setup your social icons directly in a template (or some other module) using code like this:

/** include the model and view you want to use **/

/** instantiate and setup the model **/
$model = new ReasonSocialProfileLinksModel;

$model->config('site_id', $this->site_id);

/** instantiate the view **/
$view = new

/** setup and run the controller **/
$controller = new ReasonMVCController($model, $view);
$my_social_html = $controller->run();

The framework for social accounts is quite flexible - an integration class for a particular service might integrate one or many interfaces. Code can then ask a helper class for social integrators that implement a particular interface. I've written social account integrator classes for these services:

They all support these interfaces:

  • SocialAccountContentManager - allows for custom setup in content manager
  • SocialAccountProfileLinks - allows display of links to profile
  • SocialSharingLinks - allows display of links to share something
Social Sharing

Publications now have a checkbox to "enable social sharing." When enabled, a toolbar shows up above and below news/post items that allows you to share it with any service that implements the SocialSharingLinks interface.

This is fairly basic at the moment, but a good starting point.

Social Accounts - Possible Next Steps
  • Add integration with Pinterest
  • Add integration with LinkedIn
  • New integration interface for SocialSharingImages
  • Module to allow Site Admins to add social accounts
  • Generic social media directory module powered by social account entity info


  • September 19 2013 at 11:30 am

    We've really enjoyed this new feature! If I could add a possible next step, it would be adding an integration with YouTube.

  • September 19 2013 at 12:41 pm

    Glad to hear it! Tell me more about YouTube integration - are you talking about just a link a YouTube profile page or something more?

Add a comment

The following fields are not to be filled out. Skip to Submit Button.
(This is here to trap robots. Don't put any text here.)
(This is here to trap robots. Don't put any text here.)
(This is here to trap robots. Don't put any text here.)