-2

I want to add the ShareThis buttons for every topic on my forum. I have already modified the overall header and added the code to the head tag.

How can i modify the templates so they appear for each topic? Also is there anyway to add them to the footer of or under each topics first post rather than besides the title?

I am using PHPBB 3.1.10

Many thanks

zeddex
  • 1,260
  • 5
  • 21
  • 38
  • Why did someone down vote this and request a close without giving a valid reason why? – zeddex Oct 19 '16 at 19:02
  • You asked a question and didn't post any code that you have tried. Read this how do I aska good question? http://stackoverflow.com/help/how-to-ask BTW I wasnt the one who voted – mlegg Oct 19 '16 at 20:06

1 Answers1

0

I don't know which code fragment you are trying to inject, but I assume you have already included a link to a javascript script in your header (you can also include it in your footer instead) and now you need to add the html element of the button that triggers this script.

If you want to show something only in the topics page, then you should change the styles/your_style/template/viewtopic_body.html file. You can choose where to insert it and, depending on your style and the place, you may need to do some small modifications (e.g. using the inline style="" attribute).

If you want to show it on the footer of each post, you can try putting your element just before or after the line <!-- EVENT viewtopic_body_postrow_post_after --> in your viewtopic_body.html file. The events are like "interesting points" in the styles and you can see a list of them here.

In any case, make sure that you don't make any syntax errors (and always keep a backup). You can validate your page using the W3C validator.

MakisH
  • 967
  • 1
  • 9
  • 23