- Donate to the author
4. Install the script on your website:
- Unpack the archive.
- Upload the "share42" folder to your website via FTP or via web hosting control panel (if desired, you can rename the folder).
- Specify the path to this folder: , for example,
Click here to check: .
If you see the contents of the script, then the path is correct.
Select the most appropriate type of website:
Insert into the template of your website the following code (just before or just after the main text of the page):
<div class="share42init" data-url="<?php the_permalink() ?>" data-title="<?php the_title() ?>" data-url="<?php print $node_url ?>" data-title="<?php print $title ?>" data-url="[url]" data-title="[title]" data-top1="150" data-top2="20" data-margin="0"></div>
The parameters you can specify
||Example of usage
|link to a page
<div class="share42init" data-url="http://site.name/page-title/">
|title of a page
<div class="share42init" data-title="Заголовок страницы">
|link to an image
<div class="share42init" data-image="http://site.name/image.jpg">
|description of a page
<div class="share42init" data-description="Описание страницы">
|path to a folder containing icons.png file
<div class="share42init" data-path="http://site.name/share42/">
|The parameters for the vertical panel
|distance from the top of the page to the panel, in pixels
<div class="share42init" data-top1="150">
|distance from the top of the visible area of the page to the panel, in pixels
<div class="share42init" data-top2="20">
|horizontal displacement of the panel, in pixels (negative value - to the left, positive value - to the right)
<div class="share42init" data-margin="-70">
For styling the panel you can add the following code into a CSS file of your website (optional):
For styling the counter add the following CSS code:
Share42.com - is a free service that generates a script that allows your visitors to post links to your articles in social media (bookmarks, social networks).
You can read about the advantages of using this script in the appropriate tab.
Script allow to:
- Specify custom link, title, description and image for a page.
- Show share counters for the following services:
Advantages of the script:
- – Beautiful icons.
- All icons are made in the same style and look beautiful.
- – The small size.
- The code of the script is perfectly optimized. In addition, it will be cached by the browser.
- – Easy to install.
- Download the script, upload it to your website, connect it to the website.
- – No extra links.
- – No extra HTML code.
- – Without requests to third-party sites (exception - if the "Show share counters" option is active, script sends requests to the sharing services).
- There are many situations when the website opens too slowly, because the script is loaded from another website. Installation of the script on your website will allow to avoid this problem.
- – Can be added to almost any website.
- The script is universal, it will work on any type of a website which has a FTP access.
- – Uses only one image (sprite).
- It will reduce the number of requests to the server that hosts your website.
- – You choose the icons of social media that will be displayed on your website.
Donate to the author
If this site is useful to you, then you can thank the author with a small donation through PayPal.