Results tagged “Template Sets”

Edit 2010-04-20: A year and a half after implementing Mid Century, while playing with Byrne Reese's Mid Century 2.0 I was having these same issues. I let him know and he tells me that the Mid Century AJAX requires the option "Use Comment Confirmation Page" to be turned on under commenting preferences. Bingo! Now everything works. Probably would have fixed it here too, so if you're having commenting issues with Mid Century, try that first.

Edit 2008-11-26: I added a download file to make it easier and clarified the instructions.

When I changed over to Mid-Century, I had some goofy things happening with commenting. It seemed related to the AJAX that powered commenting in Mid-Century.

In theory, the AJAX is pretty cool. When a comment is posted, the entire page doesn't get rebuilt, only the comment section. The new comment is then highlighted in yellow, which is neat. In practice, it didn't work at all on my site and adding my Google Analytics code really messed it up. I decided the AJAX magic wasn't worth it, so I went looking for ways to de-AJAX.

Help wasn't very forthcoming from the MT Forums or Jim Ramsey, the developer of Mid-Century (hey, people are busy), so I did some detective work.

I created a test blog and loaded the Classic Blog template set to compare Mid-Century to the default templates. I found that the two template sets to be very similar, with Mid-Century having a few more template modules and an additional javascript index template. Of course, the template content is very different, but the template listings are similar. The problem was in the 'Comments' template module.

I loaded each into EditPad Pro and hitting 'compare files' I found a lot of differences. Digging further, I found that most were due to Mid-Century using old syntax for some MT tags and Mid-Century having an 'Individual Comment' module that was included into the 'Comments' module. Reconciling those differences revealed a couple additional div tags and two script tag differences. The script tags was what I was looking for.

Mid-Century has a long additional script tag just after the 'Comment Greeting' div and before the form tag. It's also missing the script from the end of the Classic Blog 'Comments' template, just before the closing 'mt:IfCommentsAccepted' tag. Fixing this removed the AJAX and made commenting worked as expected again.

While that worked, commenting was fine and the page loaded fine, I did notice that it generated a JavaScript error related to the 'mtEntryOnUnload' function. The JavaScript is generated by an index template named, cleverly, 'JavaScript'. After comparing the Mid-Century JavaScript template to the Classic Blog JavaScript template, I found several variations (the template is 800+ lines), at least one relating to the 'mtEntryOnUnload' function. I don't know JavaScript, but I figured I could replace the Mid-Centurry file with the lassic Blog file and see what happens, backing up the original first. I gave it a shot and it worked, no more JavaScript errors.

So, removing AJAX is fairly easy. I made a duplicate of my original JavaScript & Comments templates in MT before I started, just in case. Here are the changes you need to make:


  1. In your Mid-Century 'Comments' template module, comment or delete the long script tag just before the form tag.

  2. Also in your Mid-Century 'Comments' template module, add the short, 6 line script tag from the Classic Blog 'Comments' template module, just before the closing 'mt:IfCommentsAccepted' tag.

  3. Swap out the contents of the MidCentury JavaScript template for the contents of the Classic Blog JavaScript template.

So you don't have to create a new blog to get the Classic Blog template content, you can find the added content in this text file.

That's it, now your Mid-Century comment system is de-AJAX'ed.

Ta-Da! [Redux]

Welcome to the refreshed salguod.net, again. After doing a little digging, I'm trying again with the new template set. I found a way to work around the change in URLs, more on that later. Comments are still broken, but I'll work on that soon, but maybe not until Monday. They're working again, but I'm trying a new anti-spam plugin. We'll see how it goes.

One of the neat things about MT4 is there are finally some neat template sets available. There were some in MT 3.x, but the Stylecatcher plugin was, for me anyway, impossible to get to work. Then, all the styles relied on you having pretty much the default templates, meaning your layout was pretty standard. Not that I broke any ground here stylistically, but I did want to play with the layout some.

With MT4, there's now something called template sets which you can apply to you blog. These include both style and layout, giving a lot more flexibility. This one is called Mid Century, and it's pretty popular on MT4 blogs right now. There are others as well, and I may give them a try later. I like this clean look.

If you're reading right after its application,there are likely some things a little broken, the big one being comments. I've got to add in my anti-spam code to the template to re-enable them. I've got to figure out where to do that first.

1


Recent Comments

  • Testing commenting ... again....

  • I've looked at your code as compared to my own (also using Mid-Century) and the only difference I can see is that you're referencing theme-javascript and not actually using it (this is for the gallery). Try deleting that...

  • Test...

    tweezerman
    Ta-Da! [Redux]
  • Test comment...

  • OK, here goes in IE 7. So far, same as FF....

Close