adding social media share icons

adding social media share icons

by Dominick Inglese -
Number of replies: 5

can anyone help me to add social media share icons on moodle?

I am using Zebra theme with moodle 2.3.2

I am not expert at coding but I can stumble my way through with some guidance.

I can get the code from the "share this" official Web site,

* see here: http://sharethis.com/publishers/get-sharing-tools

but I don't know where to put the code because the custom html blocks in moodle always strips the code.

Also, I don't know where to put the javascript code that goes along with the "share this" function.

 

Average of ratings: -
In reply to Dominick Inglese

Re: adding social media share icons

by Miriam Laidlaw -

I answered this when you asked it in a different thread here.

So here is my answer again:

I've copied and pasted the code we used on the front page of FreeMoodle.org to make our Facebook Like and Tweet buttons into my wiki HERE, with further instructions for checking filters you may have enabled on your Moodle site that could be stripping code.

In reply to Miriam Laidlaw

Re: adding social media share icons

by Dominick Inglese -

Oh! Thanks Miriam. I didn't know that you replied because I hadn't check back in a while.  

I made sure HTML tidy was disabled and I put the code into a HTML block and it worked well. 

I have a question about the code on your wiki:

data-url="http://www.YOURURL.com"

should I put my moodle URL here or my twitter URL? probably my moodel URL, right?

Also, I am a big fan of stumbleupon because it is not blocked in schools like Facebook sometimes is. 

Where would I put this code (taken from the official stumbleupon badge page http://www.stumbleupon.com/dt/badges/create )?

Would this go in a HTML block?

<!-- Place this tag where you want the su badge to render -->
<su:badge layout="2" location="%PERMALINK%"></su:badge>

I don't know where to put the code below. Make a new .js file?

<!-- Place this snippet wherever appropriate -->
<script type="text/javascript">
(function() {
var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
})();
</script>

 

(I subscribed so I will get your response this time smile )

In reply to Dominick Inglese

Re: adding social media share icons

by Miriam Laidlaw -

Hello Dominick,

Yes, that is your Moodle URL that goes where it says YOURURL

I would need to look at the stumbleupon ones, but usually it is more difficult to put in ones that require javascript. If you can get an iframe badge, it would be better, but I will test it out later. I cannot test it out right now, sorry.

In reply to Miriam Laidlaw

Re: adding social media share icons

by Dominick Inglese -

Thanks for testing it out in the future. I am newborn with javascript. I paid for tutorials on Udemy but I haven't watched them all yet.

I can do it with a little guidance.

In reply to Dominick Inglese

Re: adding social media share icons

by Miriam Laidlaw -

I have not been able to test it yet. This time of year gets crazy!