Archive: Technical

One of the biggest challenges in moving away from College Publisher has been the 10 years of archives we have had online. As I am sure you are aware, those were abruptly taken down in January.

Simply put, there was no other way to switch from their servers to ours.

We are working tirelessly to get the archive back online, and today I would like to share (a new) update on that. I sent out an update on our Facebook Fan Page on Feb. 8, and I wish I could say we have made progress since then.

Hit the jump to hear the (somewhat condensed) updated info.
The launching of a web site is a stressful one, but the re-launching of one can be enough to kill you. Lucky for me things went smoothly in the wee hours of January 12 (and I am not typing this from the grave).

I would like to say the transition away from College Publisher has been a smooth one, but it in fact has not. Just today the domain name was finally transferred into our account, and it is still not resolving all over the Internets yet. And we do not have our database of past archives, last I talked to CP it looked like I would have them by Friday.

So if you are just tuning in, the entire BG Views Network of sites is running under Movable Type, including The BG News, which was previously partnered with College Publisher. We are by far not the first school to leave College Publisher in recent months, and no doubt won't be the last.

But this post is not about College Publisher, it is about Movable Type, and how we are using it to produce a daily newspaper online.
It seemed like forever between the time MT5 was released in Japan at the end of November until it was just released in the U.S. We found out the day after, because of a security update to both MT 4.33 and MT 5, but they wouldn't tell us that.

Telling us it was due to "wanting more time for coordination of the release and associated documentation" was frankly bull shit. Sorry guys. There still is hardly any documentation, scouring FogBugz seems to have offered the best loot so far. MT5 was released 4 days ago, and I still cannot lookup information on mt:Websites tag or the parent/child/sibling modifiers, for example. The mt:BlogParentWebsite is another tag I would like to know more about, too.

Come on guys, I thought you were putting a big effort into developing better documentation.
It is hard to imagine, but I have been blogging for close to seven years now, and I have seen comment spam of varying degrees. It used to be pretty easy to spot. Services like Akismet and now TypePad AntiSpam are there to help - and they do - but even trained computers fail at finding spam. Both Akismet and TPAS have been failing me lately, let me show you why:

Picture 113.png
If you read that, it is actually mostly literate English. This is one of dozens of spam comments we have been getting. They usually do not put links in the body of the comment, that is so yesterday's tactic, but do use the Author URL to link to their spam site. And some of the spam sites don't even look like spam site - they actually take a careful eye.

Spam is getting smarter. This is scary.

One solution is to use a CAPTCHA source, such as ReCAPTCHA, but these can be defeated, I have seen it happen. The drastic answer to this problem is to just turn off anonymous comments altogether, but for us, that is not an option. We want people to comment, and registration drives some people away.

The only good answer is that it takes a lot of hard work to combat comment spam, and having good policies in place help, too. See our Privacy Policy, Terms of Use, and Comments Policy. You may think that is a lot of mumbo jumbo - and it is - but it is very important for our users to know where they stand.

Such policies are required to provide a safe, engaging place for the community to not only consume, but create and share content.
On October 1st, can't remember now, I tried moving all databases including the one used for Movable Type from /var to /home, as it is a much bigger volume. Movable Type kept sending me to an infinite loop to the mt-upgrade.cgi script, then telling me everything was upgraded.

So I had to move everything back to /var and wait until the weekend. I moved it the second time, and everything is working again. I am glad I did not have to restore from a backup, I thought I had hosed the MT database. For what its worth, the Six Apart support could not give me any advice or answers to why I was getting the "Time to Upgrade" and then immediately "Your Movable Type installation is already up to date." endless loop.
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
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.


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)