Original ExistDifferently.com Weblog of David, a Christian Network and Systems Manager, with topics ranging from Apologetics to Worldview, and some crypto, open source, programming, opinion, and daily life thrown in between.

Sat, 2005-01-01 (Jan 01)

Blog Website Tweaked

Filed under: Blog,General,Tech (General),Web Development — David @ 08:14

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.

4 Comments

  1. Are you fluent in PHP? I used it once for a website that I was designing for a project in college, and the school’s web programmer helped me out with it, and I was happy because he was hot ;) So, PHP has happy memories for me.

    I took a quiz this morning that reminded me of you. I actually scored lower on it than I was expecting…

    Comment by Ruth — Tue, 2005-01-04 (Jan 04) @ 08:57

  2. I prefer Perl to PHP but they are very similar in syntax, and many functions are either the same or have similar ones that are just named differently. So it’s easy to learn one if you know the other, as long as you can keep similar differences straight! What quiz?

    Comment by David — Tue, 2005-01-04 (Jan 04) @ 10:20

  3. The quiz is in my Live Journal. I sold my Perl book after my class, because we all hated it (both Perl and the book). I think part of the problem was that we learned Perl in Linux, so I would have to figure out how to transfer that knowledge to a Windows based machine. I should dig a different book on Perl out and see what I remember sometime.

    Comment by Ruth — Tue, 2005-01-04 (Jan 04) @ 11:25

  4. Gee…I think perhaps I was being lazy asking where the quiz was…like I really needed to ask :-)

    Comment by David — Tue, 2005-01-11 (Jan 11) @ 22:14

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress