Well, instead of writing a post about how great the New Year’s Eve parties I went to were (they were great), since 2:30 am (when I got home) I’ve been hacking away at this website, getting some plugins added, upgraded, and some manual tweaks set up. I won’t bore you with too many details, but indulge me for a minute as I’m rather proud and it was fun.
First thing I did was add a couple of behind-the-scenes plugins, and I also upgraded the “Post Teaser”:http://turnipspatch.com/projects/post-teaser/ plugin that I enabled the other day, from version 1 to version 2, and I tweaked some settings. Then I wrote some added functionality that I’ll probably submit back to the author! Basically the (wow that was some cat screech I just heard outside the window!) new version fixes some bugs and stuff, and is more efficient.
The settings I changed had to do with how the “number of words, approx. reading time, link to post” text read, and also how many words (approximately) to have each post show before cutting it off and sending it to the post page to finish. I think I ended up setting it at 400 words, which seems to show a lot of posts in their entirety and the others it gives a nice, long preview of. Keep in mind that 400 words is a “suggestion” and not a cutoff point, it actually auto-cuts off after a full paragraph, never in mid-sentence, it just chooses the paragraph closest to leaving 400 words in the main preview.
Then I saw that some posts had a “more” link already manually hard-coded (such as the “‘isn’t it time someone saved you?'”:http://www.existdifferently.com/archives/2004/12/25/isnt-it-time-someone-saved-you/ post, but you can’t tell what I mean except by viewing it in the “December Archives”:http://www.existdifferently.com/archives/2004/12/, 4th post down), and it was kind’ve weird to have it say “okay that’s the whole post with x words” right below where it said “click for more”! So I grabbed the “PHP”:http://www.php.org/ source code for that plugin, figured out how it worked (I’ve never worked with the “WordPress(WordPress Blog Software)”:http://www.wordpress.org/ “Plugin(WordPress Plugins Information Wiki)”:http://wiki.wordpress.org/?pagename=Plugin%2FAPI “API(Application Programming Interface)”:http://wiki.wordpress.org/?pagename=Plugin%2FAPI before), and modified it to show a third possibility where a post already has a “more” link manually added by the author. In that case it just shows a summary of the “intro word count and reading time” with a link to the more page and a reminder that there’s more to read. It was a simple little hack, but I really like it considering that I don’t know much PHP (“Perl(Practical Extraction and Report Language)”:http://www.perl.org/ is my language all the way. Go Perl!) and I wasn’t familiar with the plugin or the API previously.
Then, I happened upon a little hack that I set up so that when you view a post on it’s own page, it has “next post”, “home”, and “last post” links, complete with titles, showing up at the top. I wanted to do that originally, because before he switched to WordPress I saw “Robert”:http://robert.accettura.com/ doing it (I think MoveableType does it automatically). But I couldn’t figure out how, and now I did. And I like it, so it’s staying. Try it out.
Then my challenge was to set up a “Live Preview”:http://www.chrisjdavis.org/index.php/2004/03/15/live-preview-for-comments/ plugin I’d seen the other day that let commenters actually see a preview of the post as they were typing it, keystroke-by-keystroke. I saw this in action on the plugin’s demo site, and it rocks! Go ahead and try it out on a post…I did find a small bug in that if you use the “blockquote” HTML tag, Internet Explorer stops showing the preview at that point. Stupid IE. But “Firefox”:http://www.getfirefox.com/ does just fine with it and looks great. Everything else seems to work in IE all right though.