Pardon This Geek Moment

Mother will hate this post.

Last year, for the first time, I created a Season’s Greetings banner that popped up (using MediaboxAdv) when you first hit my blog.  This year, when I went to operationalize that same code, things were not very straight forward.  This post is to remind me next year how to do this€”sort of a note to me in the future.

WordPress Site
Under the wordpress — wp-content — themes folder on the server, select the current theme and modify the header.php file within that folder.  Immediately after the HTML header tag closes, this code should appear:




<body onload="Mediabox.open('http://timtyson.us/wordpress/wp-content/uploads/2010/12/HolidayGreeting.jpg', 'Happy Holidays', '480 520')">

Normally, without the forced load of the mediabox announcement, the code would read like this:





<body>

This single change in code will impact the loading of both the main index page as well as individual page archives.

MovableType Site
To accomplish the same thing, MovableType requires two file alterations: one for the index page and one for individual page archives.

For the main index page:
Under the template-link-files — my-template-link-files on the server, modify the Index.html file within that folder.  Immediately after the HTML header tag closes, this code should appear:




<body id="<$mt:BlogTemplateSetID$>" class="mt-entry-archive <$mt:Var name="page_layout"$>" onload="Mediabox.open('http://timtyson.us/wordpress/wp-content/uploads/2010/12/HolidayGreeting.jpg', 'Happy Holidays', '480 520')">

All of the index files would then have to be rebuilt for the change to take place.

Normally, without the forced load of the mediabox announcement, the code would read like this:





<body id="<$mt:BlogTemplateSetID$>" class="mt-entry-archive <$mt:Var name="page_layout"$>">

For the individual page archives:
Under the template-link-files — my-template-link-files on the server, modify the Entry.html file within that folder.  Immediately after the HTML header tag closes, this code should appear:




<body id="<$mt:BlogTemplateSetID$>" class="mt-entry-archive <$mt:Var name="page_layout"$>" onload="Mediabox.open('http://timtyson.us/wordpress/wp-content/uploads/2010/12/HolidayGreeting.jpg', 'Happy Holidays', '480 520')">

Get it right the first time, because “Only Entry Archives” files then have to be rebuilt for the change to take place€”that’s over 2,500 files and takes forever!

Normally, without the forced load of the mediabox announcement, the code would read like this:





<body id="<$mt:BlogTemplateSetID$>" class="mt-entry-archive <$mt:Var name="page_layout"$>">

My browser of choice continues to be Safari. However, a few months ago Apple pushed an update out the door that is making Safari do weird things when building a page with Flash embeds. This, at times, significantly impacts page display and, I suspect, is a result of Apple pushing HTML5 implementation. I don’t get those issues in Firefox. Hopefully Apple will correct this problem in the near future. I don’t know what IE does with any of this code. I gave up on that browser a long time ago. (My apologies to all of those who still use it.)

[Another note to self:  the directions for using the awesome but non-intuitive SyntaxhHighlighter used on this page are located at this link.

And that’s about it.

2 thoughts on “Pardon This Geek Moment”

Comments are closed.