Adding ShareThis plugin to Advanced Typepad Templates
After looking for some answers and being very unsatisfied with the amount of information out there, I decided to share this.
What you need
1. You’ll need advanced template access in Typepad.
2. A Share This script for your registered blog.
3. Some HTML knowledge.
The Typepad foundation uses Moveable Type tags. You’ll see a tag called < MT Entries > that surrounds your posts. These tags are what list the posts on the page. There is an tag to close the post area. You’ll need to use these tags to place the ShareThis script in each post.
If you look in your Main Index Advanced Template, you will see a tag < $MTWeblogIncludeModule module=”entry-list-sticky”$ >. This is where your < MT Entries > ……. < /MT Entries > tag actually lives on the front page. In other pages (Individual, Date Archive, etc) we’ll be modifying a similar, but slightly different, entry list module. So it’s not going to be as obvious about where to place the script. We’ll need to do a teeny tiny hack to get it to display at each post.
1. Log in to your Advanced Templates and choose your current design. Feel free to create a backup copy of your current design and mess with that one. This has saved me several (hundred) times.
2. Go to the Create New Template Module. Name it something helpful and obvious. We’ll be making two new modules, one for the main index page and one for the individual entry pages. I’m naming my main page module entry-list-addthis-main.
3. Open a new tab (or window) and copy the Featured Post code.
4. Paste your code in to the new entry-list-addthis-main module.
5. Copy your Addthis Script and place it just below the < p class=”entry-footer-info” > < $MTEntryPostFooter$ > Tag.
6. Publish your template.
7. Open your Main Index Template and look for the original < $MTWeblogIncludeModule module=”entry-list-sticky”$ > and replace it with < $MTInclude module=”entry-list-addthis-main”$ > (be sure to put the name of your main module if you chose a different name! And there shouldn’t be any spaced in the tags.)
8. Save and Publish your templates.
(As an aside…. Feel free to place < p > tags (no spaces) around the script if you want it on its own line like this..)
Individual Archive Pages
Only slightly different since we’ll be using the Individual Entries tag, you’ll create another module (I called mine entry-lists-individual. Such Genius.) Copy and Paste the code from the individual entries tag in to the template. Place your script in the same location (under the < div class=”entry-footer” > < MTIfNonEmpty tag=”MTEntryPostFooter” > < p class=”entry-footer-info” > tags) placing a < br / > between them if you’d prefer. (Click Save) Go back to your Individual Archive template and replace < $MTWeblogIncludeModule module=”entry-individual”$ > with < $MTInclude module=”entry-list-individual”$ >. (Click Save)
Publish your posts.
(Special thanks to Asha for the module tips.)
(Created and originally posted on Mrs. Flinger)