Skip to main content

CJBlog Social Sharing change: code added

1.2K Views
0 Replies
2 min read

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 : '').'

2 Likes

0 Replies

No Replies Yet

Topic Author

R

ruud

@ruud

Topic Stats

Created Sunday, 30 August 2015 08:57
Last Updated Sunday, 30 August 2015 08:57
Replies 0
Views 1.2K
Likes 2

Share This Topic