ADBLOCK_MSG
Social Media Buttons in Joomla 2.5. Share42 horizontal panelPublished: Friday, 03 May 2013 17:55 Written by Ogri Hits: 13898
Social Media Buttons in Joomla 2.5
Where to embed?
Different types of button bars
Share42 horizontal panel
Share42 floating vertical panel
Selective placement
After localizing files and places where scripts of social button panels are inserted in their code, let's move on to the question of where to get the script. There are many services that can generate such a code in accordance with the needs of webmasters. Consider one of them.
There is a pretty nice solution called Share42 which allows both to just insert a horizontal bar in the article body or to hang vertical "floating" panel. In the second case buttons will be present on every page, and it will be discussed in the next article. Now we focus on the first version.
Go to the website share42.com and generate an appropriate layout of the panel. There is plenty of social services there, both Russian and international. Generator interface is simple and intuitive. Choose a size of the buttons, pick the relevant social services, optionally add buttons from the group Other - E-Mail, Print, etc. Select horizontal type of panel with icons.
After downloading generated script and uploading it to your hosting, proceed to its implementation in the content pages.
So, there are script file share42.js and image file icons.png. Place them into a folder js created in the site root.
Share42 also offers the code for embedding the script into our template:
<div class="share42init"></div>
<script src="http://site.name/share42/share42.js" type="text/javascript"></script>We edit the path to the JavaScript file:
<div class="share42init"></div>
<script src="<?php echo $this->baseurl; ?>/js/share42.js" type="text/javascript"></script>And finally, you can add style. Mine, for example, looks like this:
#share42 {padding: 0 20px 0;}
#share42 a {opacity: 0.75}
#share42:hover a {opacity: 0.85}
#share42 a:hover {opacity: 1}Basically, the style can be added to the template's stylesheet, but it's convenient to have everything in one place in case of subsequent changes.
Combine scripts in common block the following way: first, code style framed by tags style, and then div and script blocks. We get the following code:
<style type="text/css">
#share42 {padding: 0 20px 0;}
#share42 a {opacity: 0.75}
#share42:hover a {opacity: 0.85}
#share42 a:hover {opacity: 1}
</style>
<div class="share42init"></div>
<script src="<?php echo $this->baseurl; ?>/js/share42.js" type="text/javascript"></script>The resulting script is inserted according to the instructions from the previous article.
If you want to add the panel both before and after content (in the latter case as an option - to integrate with JComments), the resulting code snippet is entirely inserted just once - whether before or after. In the second place only block div is inserted. In this article, as you see, there are two Share42 panels to illustrate the implementation of this option.
Share42 also provides the ability to create a vertical panel. In this case, it is possible to set the appropriate style and "stick" the panel anywhere on the page without committing to an article body. This option will be considered separately in the next article.
Latest News
-
Tuesday, 21 July 2020 03:18
Joomla 3: Redirect to same page after successful login -
Saturday, 30 December 2017 16:11
Joomla: how to add your own language constants or override existing ones -
Thursday, 30 November 2017 23:27
Joomla: Integrate reCAPTCHA v2 (NO CAPTCHA) into JComments -
Saturday, 25 June 2016 15:33
Unified filtering of mod_jcomments_latest module's output -
Thursday, 17 September 2015 16:23
Post an illustrated Joomla-site article on Facebook using OG-tags
Articles Most Read
-
151597
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-1. Transferring jDownloads and jComments -
88278
Joomla: Integrate reCAPTCHA v2 (NO CAPTCHA) into JComments -
62689
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-2. Template, editor, and other extensions -
40786
Editing animated GIF-images in Photoshop CS3 -
40619
Custom 404 error page in Joomla 2.5
Login
Guest Column
Recent comments
-
Custom 404 error page in Joomla 2.5
-
Roseann
02.11.2020 08:17
-
-
Joomla: Merge two sites into one using component J2XML
-
www.cx5-forum.com
24.08.2020 03:52
you are in point of fact a excellent webmaster. The web site loading pace is incredible. It kind ...
-
-
Joomla: how to add your own language constants or override existing ones
-
Vouchersort
29.10.2020 11:33
Is this a free template that you are using as I really love it. As a website desugner myself I hope that ...
-
Voucher Sort
02.10.2020 00:07
Love this site keep up the good work!
-
-
Migrating from Joomla 1.5 to Joomla 2.5. Epilogue
-
Dewitt
11.02.2021 06:17
HELP. I can't write a comment without the page freezing.
-
-
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-1. Transferring jDownloads and jComments
-
Francine
14.12.2020 08:49
I cant stomach this person so sorry x
-
Vouchersort
30.10.2020 15:43
Once again, great resource for us newbs.
-
Voucher Sort
30.09.2020 12:58
Is commenting still open?
-
motivational quotes
21.08.2020 13:12
Hi, all is going perfectly here and ofcourse every one is sharing information, that's really excellent ...
-
-
Unified filtering of mod_jcomments_latest module's output
-
Фильмы 2022 онлайн
03.12.2021 21:37
This web site definitely has all of the info I wanted about this subject and didn't know who to ask.
-
Read more...