We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Twitter button | Forum

Topic location: Forum home » Support » General Questions
Dee
Dee Oct 30 '13
I have already asked this but I am new to all this,


how can I add this to our main page, I already have the code from twitter but not sure where to install this and I dont want to damage site.


thanks

Attachments:
  hello.JPG (7.02Kb)
dave Leader
dave Oct 30 '13

in your ow_themes folder open your theme folder and you should see another folder something like master_pages   open that folder and you should see to html files, dndindex and general. Add the code in there and then refresh your cache.

 

the dndindex is the index page and the general is all other general pages

 

if the code comes in two parts js and then the html you will need to put the js part in the header section of the admin settings

 

why don't you post the code and take out any personal data and let us see what  you need

 

 

The Forum post is edited by dave Oct 30 '13
Dee
Dee Oct 30 '13

<a href="https://twitter.com/USERNAME" class="twitter-follow-button" data-show-count="false">Follow @USERNAME</a>

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

dave Leader
dave Oct 30 '13

when you post that you will need to do it this way in the dndindex if you want it on the index.,

 

{script}
{literal}

!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');

{/literal}
{/script}

 

and then post your html normally as is

 

<a href="https://twitter.com/USERNAME" class="twitter-follow-button" data-show-count="false">Follow @USERNAME</a>

 

 

I have not done this with twitter so it is not tested but that should work.

 

dave Leader
dave Oct 30 '13

also if you want it on the bottom put it right after this line

 

<div class="ow_footer">

Dee
Dee Nov 1 '13
Thank you worked straight away!!


If I want closer to the top how would I do that?


Many thanks tho!

dave Leader
dave Nov 1 '13

it would be better if you just made a screen shot and show me where you want it.   Or if you don't want to do that then you just have to play around with it.  maybe right after the header div and so on.