Does you web presence lack style?

The definition of Swank is: Imposingly fashionable or elegant; grand. It is our desire to offer you elegant and affordable solutions for your blog or website. Take a look around and let us know what we can do to take your site to perfection.

Adding ShareThis plugin to Advanced Typepad Templates

May 6, 2008 | Filed under: Tutorials

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.

Basics

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.

The Hack

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.

Viola!

(Special thanks to Asha for the module tips.)

(Created and originally posted on Mrs. Flinger)

TAGS: , , , ,


RELATED POSTS:
Posted by Leslie @ 12:01 pm   

PerformancingAds

Comments

One Response
RSS feed for comments on this post | TrackBack this post


  1. Jeremy Says:

    Hi Leslie,

    Thanks for the great post! Your readers may also benefit from our ShareThis API (STAPI). If you could inject the code you get in this procedure into the header you can, use the SHARETHIS.addEntry code to further customize your ShareThis button. See: http://support.sharethis.com/developers for more details. I’m happy to answer any questions anyone may have about the STAPI at feedback@sharethis.com.

    Thanks again!


Leave a Reply


Mail (will not be published) (required)



RSS


Get Paid To Write Online
Advertise Here
PerformancingAds

Recommended Sites

Your Ad Here
       Ads from Adbrite


Recommended Books

Interested in Web Design or Blogging? These are the books we recommend to get you started.

  • The IT Girl's Guide to Blogging with Moxie
  • WordPress For Dummies (For Dummies (Computer/Tech))
  • Designing with Web Standards (2nd Edition)
  • CSS Mastery: Advanced Web Standards Solutions
  • Bulletproof Web Design: Improving flexibility and protecting against worst-case scenarios with XHTML and CSS (2nd Edition) (Voices That Matter)
  • HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide)
  • The Zen of CSS Design: Visual Enlightenment for the Web (Voices That Matter)
  • Transcending CSS: The Fine Art of Web Design (Voices That Matter)