Social Media Buttons in Joomla 2.5
Upd: Русская версия статьи: Кнопки социальных сетей в Joomla 2.5. Плавающая панель от Share42.
In previous articles you learned how to insert a horizontal bar of social buttons into the article body. We now consider the option to hang vertical "floating" buttons panel to have it at any site page. The same service share42.com will help in this. Generate the panel template same way as in case of horizontal option, but the type of panel with icons choose this time - vertical "sticky".
The resulting piece of code in case of vertical panel came out as follows:
It remains only to insert the resulting fragment into the active site template. You can use the administrative panel, and you can open the file templates \ [active_template] \ index.php in your favorite text editor with code highlighting. I personally prefer the second option. Before making any changes, as always, it is highly desirable to make a backup copy of the file being edited.
Now the main point. In which part of the template file the code should be placed? First, it must be within the tag BODY. Typically, after the BODY tag all sorts of wrappers or containers are located, and they are often stretched to the full screen width. Therefore, insert code inside the last opening tag DIV immediately after the BODY, followed by a non-DIV tag. I will explain on an example of supplied with Joomla template Beez20, and also of my custom template. Here's the code:
<body> <div id="all"> <div id="back"> <div id="header"> <div class="logoheader"> <!-- =====> !!! Insert here --> <h1 id="logo"> <!-- ------------ More code..... ----------- -->
My custom template
<body> <div id="og-main"> <!-- =====> !!! Insert here --> <header class="og-header clearfix"><?php echo $view->position('header', 'og-nostyle'); ?> <!-- ------------ More code..... ----------- -->
Hopefully, the principle is clear. Now, choosing values
data-margin, set the location of the panel. The meaning of these parameters is explained on the website share42.com.
In conclusion the pros and cons of this option. Pros - looks pretty nice and imposing, and is always handy. It gives you the opportunity to share not only the article, but any other page of the site. But cons concern the case where the site uses responsive web design, ie, a separate version of the design for mobile devices with smaller screen resolution. In this case, the panel overlaps a portion of the content on smartphone or tablet, and it is not good . Therefore, the option of Share42 is an excellent alternative to the standard horizontal bar for sites that do not use responsive templates.
Friday, 27 June 2014 13:35
Joomla: Content filtering by articles, categories and components
Saturday, 14 June 2014 14:00
The structure of internal links within Joomla site
Tuesday, 03 December 2013 23:05
Using of menu item aliases in Joomla
Thursday, 28 November 2013 14:23
Joomla: Merge two sites into one using component J2XML
Thursday, 10 October 2013 23:50
Photoshop: Processing photos of paintings for online gallery
- Migrating from Joomla 1.5 to Joomla 2.5. Part 2-1. Transferring jDownloads and jComments
- Editing animated GIF-images in Photoshop CS3
- Social Media Buttons in Joomla 2.5
- Migrating from Joomla 1.5 to Joomla 2.5. Part 2-2. Template, editor, and other extensions
- Migrating from Joomla 1.5 to Joomla 2.5. Part 1. Transferring content