Kunena forum allows to display social share buttons that includes various social media resources. This feature is a part of the component, but there is a way to replace social share buttons on custom solution using shortcode. It might be useful if you want to use external service or to add custom snippet.
1. Enable Custom Tag
Now we need to enable Custom Tag parameter. Proceed to Administrator Panel > Components > Kunena Forum - open RoundTheme template and proceed to Features tab and find the following params:
- Display Social Share - select Custom Tag value
- Social Share Custom Tag - add your macros. E.g. [social share /]
2. Prepare Custom Script for Social Share
Now it's time to decide on custom solution. It might be a snippet taken from any tutorial site or external service widget. We will consider ShareThis service. After signing up at this site, you can construct the widget by adding social media buttons and play with its size & appearance.
On next step you will get source code and instructions like that:
Step 1. Install sharethis.js on your website. Copy and paste the code below into the <head> tag of your website.
Step 2. Copy and paste this code wherever you'd like your inline share buttons to appear:
So, let's complete Step 1. There are various solutions: to include sharethis.js code via system plugin, to modify the Joomla template or just to paste the code in macros (that is not the best way, but it works sa demo example).
Copy the tag from Step 2 to clipboard.
Step 3. Add Macros
There are various solutions for Joomla releasing short code conception. In this example we will use RokCandy. Let's create new macros:
- Macro: [social share /]
- Html: paste the HTML tag from clipboard.
Save the macros and enjoy the result!
Nice responsive buttons with social media which you can manage via ShareThis user panel.