-
Notifications
You must be signed in to change notification settings - Fork 71
Installing the Wordpress plugin
This page serves as a guide to developers who want to install the SBTK Wordpress plugin. Note that this is an experimental plugin.
This plugin requires the PHP mcrypt extension.
There are two ways of installing the plugin; the first (and more tedious) method is described below, and involves you cloning this repository and then manually copying the needed files into place. The second method is easier; just download the latest build and copy the plugin into your Wordpress plugins directory.
Step 1: Clone the SocialSDK repository.
Step 2: Under the Wordpress plugins directory (PATH TO INSTALL DIR/wp-content/plugins/) create a folder called ibm-sbtk. Inside this folder, create a sub folder called core. Inside core, create a sub folder called system.
Step 3: Copy the contents of SocialSDK/php/php-core-1.0/src/ into wordpress/wp-content/plugins/ibm-sbtk/core (exclude /php-core-1.0/src/models/SBTKSettings.php, /php-core-1.0/src/samples/* and /php-core-1.0/src/views/*).
Step 4: Now we deploy the plugin. Copy the contents of SocialSDK/php/wordpress-plugin-1.0/src/ to wordpress/wp-content/plugins/ibm-sbtk/. Replace files if prompted.
Step 5: Copy the views into the core: Copy the views folder from SocialSDK/php/wordpress-plugin-1.0/src/views/ into wordpress/wp-content/plugins/ibm-sbtk/core/views
Step 6: Copy the JS SDK from SocialSDK//home/benjamin/SDKWorkspace/SocialSDK/sdk/com.ibm.sbt.web/src/main/webapp into wordpress/wp-content/plugins/ibm-sbtk/core/system/libs/js-sdk
Step 7: Log into your Wordpress administrator page and go to "Plugins" -> "Installed Plugins". Activate the plugin called Social Business Toolkit integration plugin.
Step 8: Go to "Settings" -> "IBM Connections Toolkit". Ensure that your endpoint is configured correctly. Click "Save".
Step 9: Go to "Appearance" -> "Widgets". Drag the desired SBTK widget onto your page.
Step 10: Done.
The most common issue is that PHP's cryptography extension is not enabled or installed. Error: Fatal error: Call to undefined function mcrypt_encrypt() in /home/benjamin/PHPWorkspace/wordpress2/wp-content/plugins/ibm-sbtk/core/models/CredentialStore.php on line 96
Solution: Find the location of your php.ini using php -i |grep "php.ini" Open the file. Allow the php mcrypt extension by removing the “;” from ;extension=php_mcrypt
If the entry does not exist, install php mcrypt using sudo apt-get install php5-mcrypt
Restart apache: sudo service apache2 restart