August 2009 Archives

I have been getting a lot of things out the way lately, lots of little stuff that will make my life so much easier down the road.
  • Setup Error Documents in MT, aliased across all domains
  • Setup .htaccess files in MT for all domains, subdomains
  • Setup robots.txt files in MT for all domains
Like I said, little stuff, but very helpful to have them inside MT.
Picture 11.png
Richard Benson has updated his YUI Editor plugin (one of my favorite Movable Type plugins), and it has two great changes/additions. First, and not so exciting for most people, is the configurable options, normally handled in a configure.js file, has been moved into Plugin Preferences. But hey, that does make it easier to change things.

The thing that people will notice most of all is the new Tag button which will analyze the current text and suggest tags for the article. This is great for people who don't know what they should use as tags. It does a really good job, and works on the text in the Body and Extended field without having to save the document first.
Thanks to the WebmasterWorld forums, my Tweet This script opens in a new window now. I am pretty happy with it. I am not very happy with Safari though. Firefox warns you when an onClick action tries to run window.open, Safari just plays dumb and does nothing.

Download Script
I have added Related Entries, based on similar tagging, to both the normal Entry templates and the Mobile (iPhone) Entry templates. Check it out here and here.

So far this is live on this Developer Blog and on the Sports Blog. Soon it will be live on all the other blogs.
Now that we have bgnews.com transferred over to our server, which in itself took a while to get released from mtvU, I can start publishing content to it. Our staff blogs will live at blogs.bgnews.com, and this weekend I setup a new index page to include the most recent posts from all of our staff blogs. I have moved the Pulse Blog over to the new address, but still need to move our Food Blog, Green Gab, and this Dev blog over.

Like any change I make, there is a good reason for these blogs not living on the bgviewsnetwork.com domain, and that is for SEO and more specifically, statistics. The BG News Staff Blogs should be tracked as part of the BG News site, because they are.

As for the Index template in Movable Type, it is simply using the MultiBlog tag, which is a cornerstone of making everything in the BG Views Network fit together.
Even though I just wrote about using ShareThis, I am not in love with the service. I would much rather have the buttons embedded into the page itself, that means more to me than having ShareThis track the stats. One of my biggest complaints about ShareThis is once you have completed sharing to XYZ network, it asks you to sign up for ShareThis, and you have to click the close (X) to get rid of the layer.

Picture 15.png

Yesterday (or was that this morning) I posted about adding your own "Tweet This" button to your blog. Today I will explain how you can better control the ShareThis button, and use some Movable Type template tags to do your bidding. This uses the ShareThis API and could easily be used with any CMS, not just Movable Type. Hit the jump for all the scary code.
I have not made up my mind yet, so far we have been using ShareThis for social bookmarking links, for submitting to sites such as Twitter, Delicious, Digg, etc. I think I would rather pick the few that are the most important and write them myself into the site.

I am going to start by doing that with Twitter. Thanks to a post on the MT.org forums, posts now have a quicker way to add links to Twitter. It uses the bit.ly API. You just need to signup for an account to get an API key. Hit the jump to see my modified code.

Another option is to use TweetMeme but their badge is pretty big, and I wanted something less obtrusive.
I am adding .htaccess RewriteRules for all the domains we have so we have pretty clean URLs like this one:

http://bgviewsnetwork.com/profile/meancode

That is done by doing this:

RewriteEngine on
RewriteRule ^profile/(.*)$ /mt/mt-cp.cgi?__mode=view&blog_id=49&username=$1 [P,L]

Add a new RewriteRule for each domain you have. Just change the BlogID. Note I am not making a /profile/ RewriteRule for each blog, just one per domain. This also makes the profile_view_url template variable of no use anymore.  Now, to modify the Entry Metadata template module, use this for your link:

<a href="/profile/<mt:EntryAuthorUsername>"><$mt:EntryAuthorDisplayName$></a>

Next on the list of pretty looking URLs are tags. I have both of these changes live on the Sports Blog. It will be live on every blog once I get the RewriteRules done, of which there are a lot - one for each blog in the system, no matter the domain. So now we have URLs such as this:

http://bgnewssports.com/tag/curtmiller

That is done by doing this:

RewriteEngine on
RewriteRule ^dev/tag/(.*)$ /mt/mt-search.fcgi?blog_id=41&tag=$1 [P,L]
RewriteRule ^tag/(.*)$ /mt/mt-search.fcgi?blog_id=49&tag=$1 [P,L]

Add a new RewriteRule for each blog you have. Just change the BlogID and path. Now, to modify the Tag Cloud widget, use this for your link:

<a href="<$mt:BlogURL$>tag/<$mt:TagName normalize="1"$>" rel="tag"><$mt:TagName$></a>

It is worth noting that even tags that have spaces, such as "movable type" or "curt miller" work with the normalize attribute (which takes out spaces). Pretty slick.
iMT is the iPhone interface for Movable Type. Thankfully the CSS has been updated for iPhone OS 3.0, but alas, it won't work with FastCGI. This seems to be the same issue I am having with the Photo Gallery template set I am having, dynamically changing files don't work when the MT app is cached.

In this instance, the CSS and templates for the new entry screen will stay as the "mobile" version if they are accessed on an iPhone, even when viewing it on a desktop browser.  So no more iMT for BG Views Network. Oh well.


About This Blog

Ken Edwards (and hopefully other project members) will be blogging here — a place to keep up on what is happening on the BG Views project. You will find bits of code, project updates, and random technical information aimed at confusing the hell out of you. More »

Subscriptions

Mobile Edition

Mobile EditionAccess the BG Views Developer Blog on your iPhone or other mobile device. Read more about our mobile site »
Powered by Movable Type 4.261

 

Also powered by:

  • Caffeine (Dr. Pepper)
  • Cup Cakes (Hostess)
  • Pizza (Pisanello's)