CJBlog Social Sharing change: code added
CJBlog Social Sharing change: code added
Hi,
with the latest change in cjblog where the social sharing buttons are loaded asynch, it is now also possible to have the buttons on multiple locations displayed together.
Currently cjblog lets you add the social sharing button either on the TOP or BOTTOM position.
This change adds a BOTH location (displaying both on top and on bottom)
Would be nice if this change could be part of the release :)
you can see it in action here: https://www.lerendeleiders.nl/jezelfleiden/399-mijn-leiderschap-kantelmoment
Hope this helps :)
regards,
Ruud.
-------------
changes
file administrator/components/com_cjblog/config.xml
add yellow code
<field name="sharing_buttons_position" type="radio" class="btn-group" label="COM_CJBLOG_SHARING_POSITION_LABEL" ...
<option value="top">COM_CJBLOG_TOP</option>
<option value="bottom">COM_CJBLOG_BOTTOM</option>
<option value="both">COM_CJBLOG_BOTH</option>
</field>
file administrator/language/en-GB/en-GB.com_cjblog.ini
add yellow code
COM_CJBLOG_BOTTOM="Bottom"
COM_CJBLOG_TOP="Top"
COM_CJBLOG_BOTH="Both"
COM_CJBLOG_ENABLE_SOCIAL_SHARING_LABEL="Enable Social Sharing"
file plugins/content/cjblog/cjblog.php
replace '.($sharing_position == 'top' ? '<hr/>'.$social_buttons : '').' with
'.(($sharing_position == 'top' || $sharing_position == 'both') ? '<hr/>'.$social_buttons : '').'
and replace '.($sharing_position == 'bottom' ? $social_buttons.'<hr/>' : '').' with
'.(($sharing_position == 'top' || $sharing_position == 'both') ? '<hr/>'.$social_buttons : '').'