PRIMARY
POST-AREA
POST
DATE

Saturday

TITLE

Adding TipJoy Buttons To Movable Type 4

METADATA
by Brian Haven
@ 10:54 PM

TAGGED
, ,

CATEGORIES
» General

»
»

BODY

Thanks to our good friends Abby & Ivan for bringing us TipJoy! They are in alpha testing right now, but for those of you looking to 'tipify' (if that's not trademarked yet, I call dips) your Movable Type blog, here's what I've figured out so far.


For those of you using the standard MT templates, here's what you need to do to add the TipJoy button to the bottom of each post, and make sure that TipJoy knows each individual blog post that gets tipped.


I'll describe how to use MT tags to populate the TipJoy URL in their script, then I'll tell you in which template modules to place the code.


On the "earn money" page at TipJoy, the first section tells you how to add the button to your blog, but the instructions are platform agnostic. So, you'll need to modify the button code just a bit to look something like this:


<script language="javascript" src="http://tipjoy.com/buttonGen?targetUser=YOURUSERNAMEHERE&targetUrl=<$MTEntryPermalink$>&title=<$MTBlogName encode_html="1"$>%3A%20<$MTEntryTitle$>" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" hspace="0" vspace="0" allowtransparency="true"></script>


You'll notice the YOURUSERNAMEHERE, that's where you put your TipJoy username. Next I've replaced the fixed targetURL with <$MTEntryPermalink$>. For the title, I've added two elements. The one that's necessary is <$MTEntryTitle$> -- that's writes the URL for each entry. Right before that I put the <$MTBlogName encode_html="1"$>%3A%20 tag so my blog name, followed by a colon (%3A) and a space (%20) will appear ahead of the title on the TipJoy page.


Here's the rub. If you're looking to win the popularity contest on the TipJoy Most Popular list, this solution isn't going to work for you. You'll be spreading your tips out over many blog posts, rather than having them all assigned to just your main blog URL. So, if you're a jock or a cheerleader, just use your blog URL as the targetURL instead of <$MTEntryPermalink$> and just use <$MTBlogName encode_html="1"$> for the title. This will keep all of your tips assigned to one URL.


If you're president of the chess club or tuba section leader in the marching band, use the script code above and study the nuances of which posts people like most.


Now we need to place this code in the templates. If you use the default MT templates, you'll need to add the code to two modules: "Entry Summary" and "Entry Detail". If you use the Style Chooser to change the look of your blog, this solution still works fine. Entry Summary displays your post on your Main Index page. You'll want to paste the script just below <$MTEntryBody$> tag (about line 9). Save that and go to your Entry Detail module. This will place the TipJoy button on your individual archive pages. In this module, you'll want to place the code right after this code:


<MTIfNonEmpty tag="EntryMore" convert_breaks="0"> 
<div id="more" class="asset-more"> 
<$MTEntryMore$> 
</div> 
</MTIfNonEmpty> 
--> TipJoy script here.


Save this and the publish your blog and you should be good to go. To see an example of this in action, check out what we did at Wicked Flavory. This site uses the default MT templates with a style from the Style Chooser. If you do your own custom layout like I do here at birdahonk, you'll just want to place the script at the end of the code that renders your entry body text.


I'm sure somebody much more gifted in MT than I will come up with a more robust solution (and if you find one, let me know and I'll link to it). In the meantime, I hope this helps some of you.

 

SIDEBAR
SIDE-LEFT
Previous
11 Feb 2008
Pete passed along another meme. I'm several days late, but...
Colophon


 
This work on this site is licensed under a Creative Commons Attribution - Share Alike 3.0 Unported License.


Fancy quote box styling courtesy of Joomsayer for Movable Type.
SIDE-RIGHT
Next
18 Feb 2008
Many companies are delusional about their customer centricity. Many claim...
FEEDBACK
TRACKBACKS
COMMENTS
COMMENT-FORM
ENTRY-HEADER

Leave A Comment