• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Integrating Tweetmeme and Digg into threads

#1
Not that hard to do, and it could probably be done a bit better, but here's a quick way to do this. A couple of notes:
#1 - this uses the compact version of both services
#2 - you will need to change your twitter username.

Step 1: Open up the thread_view template and look for
Code:
		<xen:if is="{$canWatchThread}">
			<a href="{xen:link 'threads/watch-confirm', $thread}" class="OverlayTrigger" data-cacheOverlay="false">{xen:if $thread.thread_is_watched, '{xen:phrase unwatch_thread}', '{xen:phrase watch_thread}'}</a>
		</xen:if>

	</div>
and AFTER this, add:


Code:
<!-- Tweetmeme Button -->

<script type="text/javascript">
tweetmeme_source = 'YOURUSERNAMEGOESINHERE';
tweetmeme_style = 'compact';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
<!-- Digg Button -->
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>
<a class="DiggThisButton DiggCompact"></a>
	<xen:require css="share_page.css" />
Step 2: Change your twitter username
Step 3: Save

Just a small bit of stuff there. These can be customized further I'm sure, but they work excellent for me right now. See the image below for an example of how they look.
tweetmeme.jpg