How to display AddThis on announcements?

After my migration from v2 to v3, I can see that the AddThis plugin doesn’t insert the code in the Announcements (or at least, the Bootstrap template doesn’t).

Is there any option to add it? I suppose I need to edit the template.

Best regards,

Hi @Jorge,

What specific release of OJS are you using? (Please include this in your posts.)

Could you try switching briefly back to the default theme in order to check whether this is related to the Bootstrap plugin?

Alec Smecher
Public Knowledge Project Team

I’m on version, sorry for not mentioning it. However, I was mistaken about the AddThis plugin showing in the announcements, I’ve found out it was added manually there.

What I did was to find the appropriate template file:

And there I copied the code that is inserted by the plugin on article pages:

<!-- AddThis Button BEGIN -->
                        <div class="addthis_toolbox addthis_default_style ">
                        <a class="addthis_button_preferred_1"></a>
                        <a class="addthis_button_preferred_2"></a>
                        <a class="addthis_button_preferred_3"></a>
                        <a class="addthis_button_preferred_4"></a>
                        <a class="addthis_button_compact"></a>
                        <a class="addthis_counter addthis_bubble_style"></a>
                        <script type="text/javascript" src="//"></script>
 <!-- AddThis Button END -->

Is this the correct approach?

Hi @Jorge,

That should work, at a glance; the current AddThis plugin is coded to only add the AddThis tool to the article details page (OJS) or book details page (OMP). The plugin could of course be extended to support other areas, but that would take some coding.

Of course, template modifications will need to be maintained when upgrading.

Alec Smecher
Public Knowledge Project Team