Skip to main content

Adds a Facebook Like-button viewlet to Plone content pages. Because everybody loves Facebook (and mFabrik).

Project description

Introduction

This Plone CMS add-on product adds the standard Facebook Like-button and Like boxes to Plone pages.

Features

There are several kind of like features

  • Like box a.k.a. fan box. Enlists clickers as the fan of your Facebook product page. This is available as an addable portlet. (This is the modern “Become a fan” button.)

  • Like button allows users to share the current content item URL in their Facebook news feed. This can be enabled on selected content types or pages using Zope marker interfaces.

Other features

  • Facebook content is localized by mapping Plone language to Facebook locale (add your own languages to locales.py)

  • Asynchronous Facebook Connect API Javascript loader is used to optimize the page loading time

Installation

Installing the code

Add the following to your buildout.cfg:

eggs
        ...
        mfabrik.like

Rerun buildout.

Restart Plone.

Enabling Like-button

Like-button is enabled on normal Page content type by default.

You can edit these settings by going Site control panel -> Facebook Like-button settings.

You can also explicitly enable Like-button on some content items by applying mfabrik.like.interfaces.IFacebookLikeEnabler marker interface on them through Zope Management Interface.

Adding Like box portlet

  • Add Facebook application id to Site control panel -> Facebook Like-button settings

  • Create new portlet

  • Add Facebook page id in the portlet settings (this is the long number which you can pick from Facebook page URL)

  • Show either full Like box or just “Become a fan” text

Plone 3 and beta components

This add-on product uses software components which are not yet officially deployed for Plone 3 (and maybe never will) like plone.app.registry. To make these components work correctly you probably need to use “good-py version pindowns” in your buildout.cfg.

For more information, see

Example sites

Customization

  • Subclass viewlet or portlet rendere classes

  • Override necessary methods

  • Customize template

  • Use a browser layer specific to your customization add-on product to override the default viewlet / portlet renderer

Changing the location of the Like-button viewlet

You want to do this in your site theming add-on product.

  • Use @@manage-viewlets to hide the default instance

  • Use ZCML to bind viewlet to a new location

Source code

More information

Author

mFabrik Research Oy - Python and Plone professionals for hire.

Changelog

1.0 - 2.0

  • Added control panel to configure [miohtama]

  • Added Like box portlet [miohtama]

  • Added connect.js version [miohtama]

  • Localize Like-button for the current Plone language [miohtama]

1.0

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mfabrik.like-2.0.tar.gz (21.1 kB view details)

Uploaded Source

File details

Details for the file mfabrik.like-2.0.tar.gz.

File metadata

  • Download URL: mfabrik.like-2.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mfabrik.like-2.0.tar.gz
Algorithm Hash digest
SHA256 1f2ebd8aa777a819c746907a524e477dbd71ccde0549235e4634ff50e9f84061
MD5 b9e4b8d4b8c643eae59a4943d7630402
BLAKE2b-256 0041b6f08f2219c169a5a0739903e82a9e1cf0194aaeb8f8b102d03e14230864

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page