Plugin: LMTwitterCards

Add Twitter Cards metadata to the items in your blog. Can also add Open Graph metadata.

General plugin info
Author:Leo
Current version:1.0.0
Download:NP_LMTwitterCards_v100.zip
Support: Plugin comments or forum thread
Compability:Nucleus CMS 3.60

Plugin overview

The NP_LMTwitterCards plugin adds Twitter Cards metadata to the items in your Nucleus blog. There is also an option to add Open Graph metadata.

Installation

  • Upload the NP_LMTwitterCard.php file and the lmtwittercard directory from the zip file to the Nucleus CMS plugins directory (nucleus/plugins) on your web server.
  • Go to the Plugins page in the admin area. You should be able to select the plugin in the dropdown list under the "Install New Plugin" section and press the "Install Plugin" button.

Upgrade

  • Take a backup of the current plugin files. You will need these if you want to rollback to the previous version after the upgrade.
  • Take a backup of the database used for you Nucleus installation.
  • Replace the old plugin files with the new ones. Do not uninstall the plugin.
  • If a plugin data upgrade is needed, will an upgrade plugin data option be available on the NP_LMOrdered plugin admin page. Choose this option to upgrade the plugin data.
  • After the plugin data upgrade has been performed may a rollback option and a commit option be available on the NP_LMOrdered plugin admin page. Not all upgrades support the rollback and commit option.
  • If you are not pleased with the new version of the plugin you may use the rollback option to rollback the plugin data upgrade. After the rollback of the plugin data upgrade you have to replace the new plugin files with the old plugin files.
  • If you are pleased with the new version of the plugin you should use the commit option to commit the plugin data upgrade. After the commit of the plugin data upgrade will any rollback and commit options disappear.

Configuration

The NP_LMTwitterCards plugin has the following plugin options:

  • Default card type - Twitter card type that should be the default type for all blogs.
  • Default Twitter @username of website - Twitter @username of the website that should be default for all blogs.
  • Default Twitter @username of content creator - Twitter @username of the content creator that should be default for all members.
  • Default image URL to use - URL to image to be default for all blogs.
  • Use Open Graph meta tags - Should the Open Graph compatible meta data for Twitter Cards be used. Will also include the obligatory Open Graph meta data that is not used by Twitter Cards if set to Yes.

The NP_LMTwitterCards plugin has the following blog options:

  • Card type to use for this blog - Twitter card type that should be used for this blog. If set to none will no Twitter Cards be added to items in this blog.
  • Twitter @username of website for this blog - Twitter @username of the website that should be used for this blog. If empty will the website @username set in the plugin options be used.
  • Default image URL to use for this blog - URL to image to be default for all items in this blog. If empty will the image URL set in the plugin options be used.

The NP_LMTwitterCards plugin has the following member options:

  • Twitter @username of content creator for this member - Twitter @username of the content creator that should be used for all items this member is author of. If empty will the content creator @username set in the plugin options be used.

The NP_LMTwitterCards plugin has the following items options:

  • Image URL to use for this item - URL to image to be used for this item. If empty will the image from the first <%image%> variable in the the item body or extended item body be used. If no <%image%> variable was found will the image URL set in the blog options be used.

Usage

After the plugin is installed and configured you need to add the TwitterCard skin variable to you item skin. This skin variable is described in the TwitterCard section in the help document.

The next step is to validate the Twitter Card for one of your blog items on the Twitter Card validator. If the validation is successful you will have the option to request approval from Twitter to use Twitter Cards for your sites. After the approval is given will Twitter show your Twitter Cards when you link items in your blog from your tweets.

It is recommended that you validate the Twitter Card of new items before you use links to the items in tweets.

TwitterCard metadata

The follwing TwitterCard metadata is inserted in each item:

  • twitter:card - Configured card type.
  • twitter:site - Configured Twitter @username of webside. Not inserted if configuration is empty.
  • twitter:creator - Configured Twitter @username of content creator. Not inserted if configuration is empty.
  • twitter:title - Item title. Shortened if the title is longer than 70 characters. If shortened will no partial words be included and a ... will be added.
  • twitter:description - The description is taken from the 200 first characters of the item body. If shortened will no partial words be included and a ... will be added.
  • twitter:image:src - Configured image URL or image URL from the first <%image%> variable used in the item body or extended item body.

TwitterCard skin variable

Skin variable used to insert the Twitter Card metadata into a blog item. Add this skin variable to the <head> section of your item skin. This skin variable is safe to use in all types of skins, but will only insert metadata in item skins.

<%LMTwitterCards(TwitterCard)%>

Support and Bug reports

For additional support and/or bug reports please use the Nucleus forum plugin announce thread or the plugin page comment section.

Compability

This version of the NP_LMTwitterCard plugin is tested against version 3.66 of LMNucleus CMS. The minimum version of Nucleus CMS needed for using this plugin is 3.60.

Version History

  • v1.0.0 2014-11-05: by Leo (http://nucleus.slightlysome.net/leo)
    • Initial release.

Download

Download NP_LMTwitterCards v1.0.0. The latest version of the NP_LMTwitterCards plugin can be downloaded from the NP_LMTwitterCards plugin page.


Add Comment

Spam and off topic comments will be deleted.

Allowed BBCode:[b] [i] [u] [s] [color=] [size=] [quote] [code] [email] [url]