Page 1 of 1

Adding Digg and Reddit To Entry Footer

Posted: Sun Jul 08, 2007 7:45 am
by celect
I was wondering how I would go about adding a Digg and reddit link/code to the footer of all my entries along side the author and date of the post. I would assume adding these codes to entries.tpl?

I want to add the digg code:

Code: Select all

<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
the reddit code:

Code: Select all

<script>reddit_url='[URL]'</script>
<script>reddit_title='[TITLE]'</script>
<script language="javascript" src="http://reddit.com/button.js?t=1"></script>
where or how would I add these into entries.tpl?

Re: Adding Digg and Reddit To Entry Footer

Posted: Sun Jul 08, 2007 8:17 pm
by garvinhicking
Hi!

Exactly, entries.tpl is the place to go. Search for "{$entry.body}" and add your code on top or after that, where you want it.

The Variables you need are {$entry.link} for the URL of your entry, and {$entry.title} for the title:

Code: Select all

<script>reddit_url='{$entry.link}'</script>
<script>reddit_title='{$entry.title}'</script>
<script language="javascript" src="http://reddit.com/button.js?t=1"></script>
Regards,
Garvin

Posted: Sun Jul 08, 2007 8:50 pm
by celect
garv you are the man