AddThis Code Around The Forum

468

Wed Nov 22, 2017 2:10 pm
Blabbing Noob
85 Posts
Hi

i have some code that i want to be used around the forum
i have to add this code
<!-- Go to
Please login to see this link
Get registered or Log in
to customize your tools --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5a091028dd00bb60"></script>
 

i have to add it between head and body
Expand


i know were to add this code on my splash html page but i want to add it also so it shows around the forums

is this possible i think i remember dooing this a while ago but i cant remember how

any help greatly appreciated
Thu Nov 23, 2017 10:00 am
Clan Leader
Top Dog
2630 Posts
coRpSE
In-Game
State of Decay 2

Most Played:
This week: 90.9hrs.
Total Played: 136hrs.
  
The closing body tag is in the public_html/footer.php .
Just do a search for the word body and put your code before it.

If you want that code to only show up when someone is in the forums, then you would code it something like this;

PHP:  [ Select all ]

global $name;
if (
$name == 'Forums')
 {
 
¬†echo '<!-- Go to www.addthis.com/dashboard to customize your tools --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-513caca04af12d8f"></script>';
 } 

 
With it written like that, it will only show on the forums and nowhere else. Once you have that in place, you would just put the rest of the code into your theme wherever your want it to show up. This is all a personal thing. At one time, we had this in our forums, and at first, it use to be attached to every post, but then I decided that I preferred it just attached to the topic and not the post, and that is all coded into your theme.

Hope this helps a little.


Expand
Fri Nov 24, 2017 1:45 pm
Original Poster
Blabbing Noob
85 Posts
it didnt work for me corpse

when i added it i also lost the right side blocks

some weird things were happening it also didnt show addthis either


 
Fri Nov 24, 2017 4:07 pm
Clan Leader
Top Dog
2630 Posts
coRpSE
In-Game
State of Decay 2

Most Played:
This week: 90.9hrs.
Total Played: 136hrs.
  
well, if you like me to take a look, then I can.
What program do you use to edit your files?


 
Sun Nov 26, 2017 6:01 am
Original Poster
Blabbing Noob
85 Posts
hi corpse

i used notepad ++ to do the edits

you still have access to my site if you want to try

no rush though i will have to remove the twitter google and facebook top right of each theme but i know were that is

this is the code i want added
<!-- Go to
Please login to see this link
Get registered or Log in
to customize your tools --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5a091028dd00ba74"></script>


thanks

edit
meant to say i would like it so its on all pages around the forums and index thanks


 
Sun Nov 26, 2017 6:44 am
Original Poster
Blabbing Noob
85 Posts
forget this corpse

i managed to get it working

/themes/XMAS_Multi/theme.php had addthis code in it i changed it to the new code

sorry for any inconveniance i knew i seen it somewere

thanks anyways


 
Forums ©